Organizations
5 operations.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/organizations | List organizations |
| POST | /api/v1/organizations | Create an organization |
| GET | /api/v1/organizations/{organizationIdOrSlug} | Get an organization |
| PATCH | /api/v1/organizations/{organizationIdOrSlug} | Update an organization |
| DELETE | /api/v1/organizations/{organizationIdOrSlug} | Request organization deletion |
List organizations
GET/api/v1/organizations
Parameters
query
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | optional | Sets the maximum number of resources returned in this page. Applies to List organizations. |
| cursor | string | optional | Opaque cursor returned by the previous page; omit it to read the first page. Applies to List organizations. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Response for status 200 | application/json object
|
| 400 | The request is malformed or cannot be processed. | application/json PublicApiError
|
| 401 | Authentication failed. Possible reasons: - Authorization header is not provided - Invalid API key - Session expired | application/json PublicApiError
|
| 403 | Access denied. The authenticated user does not have permission to perform this action. | application/json PublicApiError
|
| 422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json PublicApiError
|
| 500 | The server could not complete the request. | application/json PublicApiError
|
Create an organization
POST/api/v1/organizations
Parameters
header
| Name | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | optional |
Request body
required — Request body for: Create an organization.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | |
| slug | string | required |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Response for status 200 | application/json object
|
| 400 | The request is malformed or cannot be processed. | application/json PublicApiError
|
| 401 | Authentication failed. Possible reasons: - Authorization header is not provided - Invalid API key - Session expired | application/json PublicApiError
|
| 403 | Access denied. The authenticated user does not have permission to perform this action. | application/json PublicApiError
|
| 422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json PublicApiError
|
| 500 | The server could not complete the request. | application/json PublicApiError
|
Get an organization
GET/api/v1/organizations/{organizationIdOrSlug}
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
| organizationIdOrSlug | one of 2 types | required | Identifies the organization by its stable identifier or slug. Applies to Get an organization. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Response for status 200 | application/json object
|
| 400 | The request is malformed or cannot be processed. | application/json PublicApiError
|
| 401 | Authentication failed. Possible reasons: - Authorization header is not provided - Invalid API key - Session expired | application/json PublicApiError
|
| 403 | Access denied. The authenticated user does not have permission to perform this action. | application/json PublicApiError
|
| 404 | Resource not found. | application/json PublicApiError
|
| 422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json PublicApiError
|
| 500 | The server could not complete the request. | application/json PublicApiError
|
Update an organization
PATCH/api/v1/organizations/{organizationIdOrSlug}
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
| organizationIdOrSlug | string | required | Identifies the organization by its stable identifier or slug. Applies to Update an organization. |
Request body
required — Request body for: Update an organization.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | optional | |
| slug | string | optional |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Response for status 200 | application/json object
|
| 400 | The request is malformed or cannot be processed. | application/json PublicApiError
|
| 401 | Authentication failed. Possible reasons: - Authorization header is not provided - Invalid API key - Session expired | application/json PublicApiError
|
| 403 | Access denied. The authenticated user does not have permission to perform this action. | application/json PublicApiError
|
| 404 | Resource not found. | application/json PublicApiError
|
| 409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json PublicApiError
|
| 422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json PublicApiError
|
| 500 | The server could not complete the request. | application/json PublicApiError
|
Request organization deletion
DELETE/api/v1/organizations/{organizationIdOrSlug}
Queues asynchronous Organization deletion for a team Organization. Paid contracts must be fully canceled first; this operation does not automatically cancel or refund them and does not synchronously stop active runs.
Parameters
path
| Name | Type | Required | Description |
|---|---|---|---|
| organizationIdOrSlug | string | required | Identifies the organization by its stable identifier or slug. Applies to Request organization deletion. |
header
| Name | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | optional |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Response for status 202 | application/json object
|
| 400 | The request is malformed or cannot be processed. | application/json PublicApiError
|
| 401 | Authentication failed. Possible reasons: - Authorization header is not provided - Invalid API key - Session expired | application/json PublicApiError
|
| 403 | Access denied. The authenticated user does not have permission to perform this action. | application/json PublicApiError
|
| 404 | Resource not found. | application/json PublicApiError
|
| 409 | Request conflicts with current state of the resource, including safe deployment conflict classifications. | application/json PublicApiError
|
| 422 | Request validation failed. Check the request body, query parameters, or path parameters. | application/json PublicApiError
|
| 500 | The server could not complete the request. | application/json PublicApiError
|
| 503 | Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff. | application/json PublicApiError
|