Skip to content
Dashboard
Theme
Theme

Add an end user to an organization

POST /v1/organizations/{org}/memberships: Add an end user to an organization.

View Markdown

POST /v1/organizations/{org}/memberships

Scope
users:write
Auth
Secret key (sk_…)
Since
1.0
  • org string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • user string Required

  • role string

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

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/organizations/org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/memberships" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user": "usr_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
}'
Response 201
{
"id": "om_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "organization_membership",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"user": "usr_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"role": "admin",
"state": "active",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}