For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • GETList Workspaces
      • POSTCreate Workspace
      • GETGet Workspace
      • DELDelete Workspace
      • PATCHUpdate Workspace
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceworkspaces

Create Workspace

POST
/api/v1/workspaces
POST
/api/v1/workspaces
$curl -X POST https://api.onepin.ai/api/v1/workspaces \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Creative Studio"
>}'
1{
2 "data": {
3 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "name": "Creative Studio",
5 "slug": "creative-studio",
6 "color_idx": 4,
7 "created_by": "9b2d7f3e-8c4a-4f1a-9d2e-1a2b3c4d5e6f",
8 "created_at": "2024-01-15T09:30:00Z",
9 "updated_at": "2024-01-15T09:30:00Z"
10 },
11 "meta": {
12 "request_id": "7f8e9d6c-1234-4b56-8a9b-0c1d2e3f4a5b",
13 "timestamp": "2024-01-15T09:30:00Z"
14 }
15}

Create a new workspace owned by the current user.

POD-301: gated by workspaces_per_owner plan limit. Free=1, Creator=1, Studio=2, Enterprise=bespoke. Owner soft-deletes don’t free up quota until purge — keeps the gate honest against rapid create/delete cycles.

Was this page helpful?
Previous

Get Workspace

Next
Built with

Authentication

AuthorizationBearer
Clerk JWT token

Request

This endpoint expects an object.
namestringRequired1-200 characters
slugstring or nullOptional
color_idxintegerOptionalDefaults to 0

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error