Skip to main content
POST
/
spaces
TypeScript SDK
import { Orchata } from '@orchata/sdk';

const client = new Orchata({ apiKey: 'oai_your_api_key' });

const { space } = await client.spaces.create({
  name: 'Documentation',
  description: 'Product documentation and guides',
  icon: 'book'
});
{
  "space": {
    "id": "<string>",
    "orgId": "<string>",
    "name": "<string>",
    "slug": "<string>",
    "icon": "folder",
    "description": "<string>",
    "isArchived": true,
    "archivedAt": "2023-12-25",
    "createdAt": "2023-12-25",
    "updatedAt": "2023-12-25"
  }
}

Authorizations

Oai-Api-Key
string
header
required

Body

application/json

Space creation data

name
string
required
Required string length: 1 - 100
icon
enum<string>
required
Available options:
folder,
book,
file-text,
database,
package,
archive,
briefcase,
inbox,
layers,
box
description
string
required
Required string length: 1 - 500
isArchived
boolean
archivedAt
string<date> | null

Response

Space created successfully

space
object
required