Create organization

Creates a new organization. The calling user becomes the founding owner. The slug is optional — if omitted, it is auto-generated from the name. If provided, it is normalized and must be unique.

Permissions
Key type Accepted Permission required Notes
Org API key no (403) User-level endpoint — org keys have no user identity and cannot create orgs
Personal API key yes org:create X-Org-ID is not required; the calling user becomes the founding owner
Error Codes
Code HTTP Description
authorize.unauthenticated 401 No valid auth credentials
authorize.forbidden 403 Missing org:create permission or org key used
org.create.user_required 401 An authenticated user is required for this request
org.request.decode_failed 400 Malformed JSON body
org.request.conform_failed 400 Request normalization failed
org.request.validation_failed 400 Missing or invalid fields
org.slug.invalid 400 Slug fails format or length validation
org.slug.taken 409 Slug already in use by another organization
org.slug.generation_failed 500 Auto-generation from name failed
org.user.lookup_failed 500 Could not resolve calling user
org.create.restricted_by_domain 403 User's email domain is claimed by an org with creation restrictions
org.create.domain_check_failed 500 Could not complete domain restriction check
org.create_failed 500 Organization provisioning failed
Body·OrgCreateRequest
required
application/json

Organization to create

Request to create a new organization

  • name
    Type: string
    required

    Human-readable organization name

  • slug
    Type: string

    URL-safe slug for bookmarkable organization URLs. Optional — auto-generated from name if omitted.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/orgs
curl https://api.nametrust.com/orgs \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "",
  "slug": ""
}'
{
  "object": "org",
  "id": "org_01h455vb4pex5vsknk084sn02q",
  "name": "Acme Corp",
  "slug": "acme-corp",
  "created_at": "2025-06-01T12:00:00Z",
  "updated_at": "2025-06-15T09:30:00Z"
}