Skip to content
Svanja

Docs API reference

Spaces

List, read and create Spaces, the folders for each client or project.

A Space holds the notes and files for a single client or project, and the assistant reads it when you work on that client. You can view them in Spaces. Use these endpoints to list your Spaces with their IDs, or to create a new Space when you add a client in another tool.

To read Spaces, your API key needs the Spaces area, which is included in Full access and Read-only. Creating a Space requires Full access or Spaces set to Read and write. If a key is limited to specific Spaces, it can only see those and can’t create new ones. For more background, see Spaces, notes and files.

GET /spaces returns all the Spaces your key can access, and GET /spaces/{space} returns a single one.

POST /spaces creates a new Space. Set kind to project or client, and set language to the Space’s language, such as en-US or de-DE. Because a client Space belongs to a company, it also needs either mail_account_public_id (the ID of an existing company from CRM) or new_company_name to create a new one:

{
  "name": "Example Ltd",
  "kind": "client",
  "language": "en-US",
  "new_company_name": "Example Ltd"
}

If you need to update a Space later, such as renaming or archiving it, use the older Projects endpoints under /projects. They modify the same Spaces under their previous name. To work with the notes and files inside a Space, see Files and notes. You can also manage Spaces from your terminal with svanja space.

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.

project.create Changes data in Svanja

Create a project.

POST /projects

project.delete Changes data in Svanja

Delete a project.

DELETE /projects/{project}

project.read Reads only

List and inspect legacy projects.

GET /projects GET /projects/{project}

project.update Changes data in Svanja

Update a project.

PATCH /projects/{project}

space.create Changes data in Svanja

Create a Space.

POST /spaces

space.read Reads only

Read Spaces.

GET /spaces GET /spaces/{space}

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 /spaces List Spaces

Lists Spaces visible to the key visibility user.

Status codes: 200, 401, 403, 429

POST /spaces Create a Space

Creates a project or client Space and starts repository preparation.

Parameter In Type Required Notes
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.
Body field Type Required Notes
kind one of client, project no
name string yes
description string or null no
language string no
mail_account_public_id string or null no

Status codes: 201, 400, 401, 403, 422, 429

GET /spaces/{space} Show a Space

Shows one Space visible to the key visibility user.

Parameter In Type Required Notes
space path string yes Space public ULID or slug.

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

GET /projects List projects

Lists projects visible to the authenticated key. Selected-project keys receive only their selected projects for project-backed reads.

Parameter In Type Required Notes
page query integer no Page number. Defaults to 1.
per_page query integer no Page size. Defaults to 25 and is capped at 100.
status query one of active, paused, archived no Filter projects by status.
q query string no Search project name and description.
sort query one of created_at, -created_at, updated_at, -updated_at, name, -name, status, -status no Sort projects. A leading dash means descending.

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

POST /projects Create a project

Creates a project from JSON body fields only. Project-backed creation requires a Projects write-capable key with all-projects scope.

Parameter In Type Required Notes
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.
Body field Type Required Notes
name string yes
description string or null no
url string or null no
status one of active, paused, archived no
timezone one of UTC, America/New_York, America/Los_Angeles, Europe/London, Europe/Berlin, Asia/Tokyo no
language one of en-US, en-GB, en-AU, en-CA, de-DE, de-AT, de-CH, es-ES, es-MX, es-AR, fr-FR, fr-CA, fr-BE, fr-CH no
limit integer no
automate boolean no

Status codes: 201, 400, 401, 403, 409, 422, 429

GET /projects/{project} Show a project

Shows one project by public ID. Missing, malformed, cross-team, soft-deleted, and selected-project scope misses return the same public not-found error.

Parameter In Type Required Notes
project path string yes Project public ULID. This is not the legacy numeric project id.

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

PATCH /projects/{project} Update a project

Partially updates a project from JSON body fields only. Selected-project keys may update selected projects when they have Projects write access.

Parameter In Type Required Notes
project path string yes Project public ULID. This is not the legacy numeric project id.
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.
Body field Type Required Notes
name string no
description string or null no
url string or null no
status one of active, paused, archived no
timezone one of UTC, America/New_York, America/Los_Angeles, Europe/London, Europe/Berlin, Asia/Tokyo no
language one of en-US, en-GB, en-AU, en-CA, de-DE, de-AT, de-CH, es-ES, es-MX, es-AR, fr-FR, fr-CA, fr-BE, fr-CH no
limit integer no
automate boolean no

Status codes: 200, 400, 401, 403, 404, 409, 422, 429

DELETE /projects/{project} Delete a project

Soft-deletes a project and returns a public acknowledgement. Selected- project keys may delete selected projects when they have Projects write access.

Parameter In Type Required Notes
project path string yes Project public ULID. This is not the legacy numeric project id.
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.

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

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

Try Svanja with your own mailbox

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