POST
/v2/organizationsCreate an organization
Creates a new organization. Provide a name; you can also set its description and slug, subject to the slug's length and character constraints. A 200 response returns the created organization's details and base permissions.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
The organization's name and optional description and slug.
descriptionstringoptional
A description of the organization.
namestringrequired
The organization name. Must be between 3 and 50 characters.
slugstringoptional
The organization slug. Must be between 3 and 60 characters and contain lowercase letters, digits, or hyphens, with at least one lowercase letter.
200Returns the created organization, including its ID, name, slug, description, base permissions, and current user's organization role.
avatarobjectoptional
basePermissionsobjectrequired
currentUserRolestringoptional
The role of currently authorized user.
Can be null when user has direct access to one of the projects owned by the organization.
descriptionstringoptional
idintegerrequired
namestringrequired
slugstringrequired
400Returned when a required field is missing or a field value fails validation, such as an invalid name length or slug.
codestringrequired
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
paramsarray<object>optional
403Returned when access is forbidden.
codestringrequired
paramsarray<object>optional
404Returned when a requested resource is not found.
codestringrequired
paramsarray<object>optional
Error handling
name is required and must be 3 to 50 characters long. If provided, slug must be 3 to 60 characters and match the lowercase letter, digit, and hyphen pattern; a 400 is returned for invalid input. A 401 indicates an unauthenticated request, a 403 indicates access is forbidden, and a 404 indicates a requested resource was not found.