Skip to main content
POST
/
v1
/
organizations
Create organization
curl --request POST \
  --url https://api.cnap.tech/v1/organizations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>"
}
'
{
  "id": "j572abc123def456",
  "name": "Code Zero",
  "slug": "code-zero",
  "created_at": 123
}

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Body

application/json
name
string
required
Required string length: 2 - 50
Pattern: ^[\p{L}\p{N}](?:[\p{L}\p{N}\s\-'&.]*[\p{L}\p{N}])?$/u
slug
string
Required string length: 3 - 39
Pattern: ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

Response

Organization created

id
string
required
Example:

"j572abc123def456"

name
string
required
Example:

"Code Zero"

slug
string | null
required
Example:

"code-zero"

created_at
number
required

Unix timestamp (seconds)