Skip to content
Svanja

Docs API reference

Publications

Publish documents and files with a link, change who can open them, and unpublish.

A publication is a document or a set of files from a Space that people can open with a link. You can use these endpoints to publish a finished report for a client, change who can open it, or take it down.

Reading publications requires the Publications area, which Full access and Read-only both include. Publishing requires Full access or Publications set to Read and write. Every time you publish something or change who can open it, a person has to approve the change in the app, even if it is only for your own team. For more details, see Publishing and sharing.

Use GET /publications and GET /publications/{id} to read existing publications. Use POST /publications to publish one of two things:

  • A version of a document: set source_type to artifact, and pass the artifact_id and version_id from Artifacts.
  • Files from a Space: set source_type to folder, and pass the space_id along with the paths you want to include.

Include an audience to control who can open the link: private, team, space, link, named_recipients, or public, depending on what your plan allows. You can also call POST /publications/{id}/actions with make_live, audience, revoke_recipient, or unpublish, which waits for the same approval in the app.

For general API details, see The REST API. If you prefer working from a terminal, see svanja publish.

Operations

An operation is one thing you can do, like reading a task or starting one. Its effect says what it changes. Some operations that act outside Svanja or change access wait for a person's approval; the approval flow is on the API overview.

publication.audience Acts outside Svanja

Change publication audience.

POST /publications/{id}/actions

publication.publish Acts outside Svanja

Publish content.

POST /publications

publication.read Reads only

Read publication status.

GET /publications GET /publications/{id}

Endpoints

Paths start at https://app.svanja.com/api/v1. Every endpoint needs an API key unless it says otherwise. A required Idempotency-Key header is listed with the parameters.

GET /publications List publications

Status codes: 200, 401, 403, 429

POST /publications Publish content

Status codes: 202, 401, 403, 422, 429

GET /publications/{id} Read a publication
Parameter In Type Required Notes
id path string yes

Status codes: 200, 401, 403, 404, 429

PATCH /publications/{id} Update a publication
Parameter In Type Required Notes
id path string yes

Status codes: 202, 401, 403, 404, 422, 429

POST /publications/{id}/actions Run a publication action
Parameter In Type Required Notes
id path string yes

Status codes: 202, 401, 403, 404, 422, 429

This page as plain Markdown, for AI tools: publications.md

Try Svanja with your own mailbox

Sign up now, and you get an email when your account is ready.