Skip to content

REST API endpoints for Organizations

POST /orgs

Create a new organization owned by the authenticated user.

Authentication

Authentication is required.

Access token must have org:create scope.

Learn more about authentication

Request Body Content-Type: application/json
slugstringRequired

The slug of the organization, used for vanity URLs. Case-insensitive.
Regex: /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i

namestringRequired

The display name of the organization.
Regex: /^[\p{L}\p{N} _\-()]+$/u

biostring

Optional short description of the organization. Maximum 256 characters.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

idstringRequired

The unique identifier of the organization.

namestringRequired

The display name of the organization.

slugstringRequired

The slug of the organization, used for vanity URLs.

biostring

The short description of the organization.

icon_urlstring

URL to the organization avatar, derived from the icon API.

created_atstringRequired

ISO 8601 timestamp for when the organization was created.

last_slug_updated_atstring

ISO 8601 timestamp of the last organization slug update.

member_countnumber

The number of accepted members in the organization.

GET /orgs/{orgId}
Path Parameters
orgIdstringRequired

The slug or ID of the organization.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

idstringRequired

The unique identifier of the organization.

namestringRequired

The display name of the organization.

slugstringRequired

The slug of the organization, used for vanity URLs.

biostring

The short description of the organization.

icon_urlstring

URL to the organization avatar, derived from the icon API.

created_atstringRequired

ISO 8601 timestamp for when the organization was created.

last_slug_updated_atstring

ISO 8601 timestamp of the last organization slug update.

member_countnumber

The number of accepted members in the organization.

GET /users/{userId}/organizations

Alias: GET /users/{userId}/orgs.

Authentication

Authentication may enable this endpoint return more information.

If the authenticated user is the target user, pending membership will also be included.

Learn more about authentication

Path Parameters
userIdstringRequired

The ID or username of the user. Use @me for the current authenticated user.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

arrayRequired

Organizations joined by the user.

idstringRequired

The unique identifier of the organization.

namestringRequired

The display name of the organization.

slugstringRequired

The slug of the organization, used for vanity URLs.

biostring

The short description of the organization.

icon_urlstring

URL to the organization avatar, derived from the icon API.

created_atstringRequired

ISO 8601 timestamp for when the organization was created.

last_slug_updated_atstring

ISO 8601 timestamp of the last organization slug update.

member_countnumber

The number of accepted members in the organization.

PATCH /orgs/{orgId}
Authentication

Authentication is required.

Access token must have org:update scope and the authenticated user must be the owner of the organization.

Learn more about authentication

Path Parameters
orgIdstringRequired

The slug or ID of the organization.

Request Body Content-Type: application/json

Only the provided fields will be updated. Fields are optional but not nullable.

slugstring

The slug of the organization. It can be updated only after the slug update cooldown.
Regex: /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i

namestring

The display name of the organization.
Regex: /^[\p{L}\p{N} _\-()]+$/u

biostring

Optional short description of the organization. Maximum 256 characters.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

idstringRequired

The unique identifier of the organization.

namestringRequired

The display name of the organization.

slugstringRequired

The slug of the organization, used for vanity URLs.

biostring

The short description of the organization.

icon_urlstring

URL to the organization avatar, derived from the icon API.

created_atstringRequired

ISO 8601 timestamp for when the organization was created.

last_slug_updated_atstring

ISO 8601 timestamp of the last organization slug update.

member_countnumber

The number of accepted members in the organization.