Skip to content
Svanja

Docs Command reference

Document and publishing commands

Work with the documents tasks made, and publish them with a link.

The command line calls a document an artifact, such as a PDF or a chart created by a task. In the app, you can find them under Skills, Documents. Use svanja artifact to list and update them, and svanja publish to share one with a link. These commands let you fetch a finished report or publish it for a client. Reading them requires the Artifacts and Publications areas, which are included in Full access and Read-only keys. Every publish also waits for someone to approve it in the app. See Skills, tools and templates and Publishing and sharing for more details.

svanja artifact list and svanja artifact show print documents along with their versions. The other svanja artifact commands modify a document, such as saving an edit or saving it to a Space. Because they work on a single version, you need to pass its version_id.

svanja publish create publishes a document version or files from a Space. You need to pass the source, such as source_type=artifact with an artifact_id and version_id, along with an audience. Start by requesting approval:

svanja authorization request --body '{"operation":"publication.publish","input":{"source_type":"artifact","artifact_id":"ARTIFACT_ID","version_id":"VERSION_ID","audience":"link"}}' --json

Open the approval_url returned by that command and approve the request. Then run the publish command with the same fields and the approval’s id:

svanja publish create --field source_type=artifact --field artifact_id=ARTIFACT_ID \
  --field version_id=VERSION_ID --field audience=link \
  --field authorization_request_id=AUTHORIZATION_REQUEST_ID

Changing who can open a publication or attaching a document to an email draft requires approval in the same way. See Capabilities and approvals.

svanja artifact attach

Prepare an artifact attachment action.

svanja artifact attach <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact create-chart

Create a chart from a sheet artifact.

svanja artifact create-chart <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact list

List artifacts.

svanja artifact list [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja artifact list --json
svanja artifact list --plain
svanja artifact list --jq .
svanja artifact list --template '{{.}}'
svanja artifact list --json --include-meta
Details

This command calls GET /artifacts on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact restore

Restore an artifact version as current.

svanja artifact restore <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact save-chart

Save chart artifact revisions.

svanja artifact save-chart <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact save-csv

Save artifact CSV edits.

svanja artifact save-csv <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact save-source

Save an artifact source revision.

svanja artifact save-source <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact save-to-space

Save an artifact version to a Space.

svanja artifact save-to-space <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /artifacts/{artifact}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact show

Show an artifact.

svanja artifact show <artifact-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja artifact show <artifact-id> --json
svanja artifact show <artifact-id> --plain
svanja artifact show <artifact-id> --jq .
svanja artifact show <artifact-id> --template '{{.}}'
svanja artifact show <artifact-id> --json --include-meta
Details

This command calls GET /artifacts/{artifact} on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja artifact

Manage generated artifacts.

svanja artifact [flags]

Works without a key.

svanja artifact --help
Details

Use this family to call native Svanja public API operations with the active team API key. The server owns validation, access checks, authorization, receipts and domain-specific behavior; the CLI supplies product identity, explicit arguments, stable output modes and safe local request handling.

svanja publish audience

Change publication audience.

svanja publish audience <publication-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /publications/{publication}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish create

Publish artifact or folder content.

svanja publish create [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
svanja authorization request --body '{"operation":"publication.publish","input":{"source_type":"artifact","artifact_id":"<artifact-id>","version_id":"<version-id>","audience":"link"}}' --json
svanja publish create --field source_type=artifact --field artifact_id=<artifact-id> --field version_id=<version-id> --field audience=link --field authorization_request_id=<authorization-request-id>
Details

This command calls POST /publications on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish list

List publications.

svanja publish list [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja publish list --json
svanja publish list --plain
svanja publish list --jq .
svanja publish list --template '{{.}}'
svanja publish list --json --include-meta
Details

This command calls GET /publications on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish make-live

Make a publication version live.

svanja publish make-live <publication-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /publications/{publication}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish revoke-recipient

Revoke publication access for one recipient.

svanja publish revoke-recipient <publication-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /publications/{publication}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

This command is destructive and requires confirmation. Use --force for an explicit noninteractive yes, or --no-prompt to fail instead of prompting.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish show

Show a publication.

svanja publish show <publication-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja publish show <publication-id> --json
svanja publish show <publication-id> --plain
svanja publish show <publication-id> --jq .
svanja publish show <publication-id> --template '{{.}}'
svanja publish show <publication-id> --json --include-meta
Details

This command calls GET /publications/{publication} on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish unpublish

Unpublish content.

svanja publish unpublish <publication-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /publications/{publication}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

This command is destructive and requires confirmation. Use --force for an explicit noninteractive yes, or --no-prompt to fail instead of prompting.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja publish

Manage publications and audiences.

svanja publish [flags]

Works without a key.

svanja publish --help
Details

Use this family to call native Svanja public API operations with the active team API key. The server owns validation, access checks, authorization, receipts and domain-specific behavior; the CLI supplies product identity, explicit arguments, stable output modes and safe local request handling.

This page as plain Markdown, for AI tools: artifacts-and-publishing.md

Try Svanja with your own mailbox

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