Skip to content
Dashboard
Theme
Theme

Invite an end user by email

POST /v1/invites: Invite an end user by email.

View Markdown

POST /v1/invites

Scope
users:write
Auth
Secret key (sk_…)
Since
1.0
  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • email string Required

    min length 3 · max length 320

  • organization string

  • role string

    The role’s slug in the developer’s app.

  • inviter string

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/invites" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@acme.com"
}'
Response 201
{
"id": "uinv_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "invite",
"email": "jane@acme.com",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"role": "admin",
"state": "pending",
"expires_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"token": "sk_test_example"
}