Skip to main content
POST
/
organizations
Create organization
curl --request POST \
  --url https://app.usechar.ai/api/organizations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "avatar_url": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "role": "<string>"
}

Authorizations

Authorization
string
header
required

WorkOS JWT token. Obtain via WorkOS AuthKit authentication flow. The token must include organization_id claim for organization-scoped endpoints.

Body

application/json

Input for creating a new organization. The organization ID comes from WorkOS after creation.

Required fields:

  • name: Human-readable name for the organization (1-100 characters)
name
string
required
Required string length: 1 - 100

Response

OK

Organization with the requesting user's role

id
string
required

WorkOS organization ID (e.g., org_01ABC...)

name
string
required

Organization name displayed in the dashboard.

slug
string
required

URL-friendly slug for routing and sharing.

avatar_url
string | null
required

URL to the organization logo or avatar, if set.

created_at
string<date-time>
required

Timestamp when the organization was created.

updated_at
string<date-time>
required

Timestamp when the organization was last updated.

role
string
required

User's role in this organization (e.g., 'admin', 'member')