Skip to main content
POST
/
orgs
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/orgs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "clerkOrgId": "<string>",
  "tier": "FREE",
  "settings": {}
}
'
{
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "clerkOrgId": "<string>",
  "keyRotatedAt": "2023-11-07T05:31:56Z",
  "settings": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "masterKey": "<string>"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Request body for creating a new organization

name
string
required

Display name of the organization

Required string length: 2 - 120
slug
string
required

URL-friendly identifier using lowercase letters, digits, and hyphens

Required string length: 2 - 64
Pattern: ^[a-z0-9-]+$
clerkOrgId
string

External Clerk organization ID for SSO linkage

Required string length: 1 - 128
tier
enum<string>
default:FREE

Subscription tier for the organization

Available options:
FREE,
STARTER,
GROWTH,
SCALE,
ENTERPRISE
settings
object

Arbitrary key-value settings for the organization

Response

200 - application/json

OK

Newly-minted organization with one-time master key disclosure

id
string
required

Unique identifier for the organization

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
name
string
required

Display name of the organization

slug
string
required

URL-friendly identifier for the organization

clerkOrgId
string | null
required

External Clerk organization ID, null if not linked

tier
enum<string>
required

Current subscription tier

Available options:
FREE,
STARTER,
GROWTH,
SCALE,
ENTERPRISE
keyRotatedAt
string<date-time> | null
required

ISO 8601 timestamp of the last master-key rotation, null if never rotated

settings
object
required

Arbitrary key-value settings for the organization

createdAt
string<date-time>
required

ISO 8601 timestamp when the organization was created

updatedAt
string<date-time>
required

ISO 8601 timestamp when the organization was last modified

masterKey
string
required

Master API key for the organization. Returned ONCE on creation — store it securely.