Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Create a workspace

POST/v1/workspacesCreate a workspace

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Creates a new free-plan workspace owned by the authenticated user. For agent tokens the workspace is created for the agent's sponsor, and the agent's permission policy treats this as an admin action — under the default policy the sponsor approves it first.

Request body

application/json
object
displayNamestring

maxLength 100 · minLength 1

Example request
{
  "displayName": "string"
}

Responses

201The created workspace.application/json
object
dataobjectrequired
Show child attributes
createdAtstring · date-timerequired
idstringrequired

pattern ^(wksp_)([cC][^\s-]{8,}|[a-z0-9]+)$

namestringrequired
typestringrequired

const "workspace"

urlstring · urirequired
Example response
{
  "data": {
    "createdAt": "2026-06-09T00:00:00Z",
    "id": "string",
    "name": "string",
    "type": "workspace",
    "url": "https://example.com"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Workspace integration tokens cannot create workspaces; a user-attributable actor is required.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu