List Service Accounts
api/admin/service_accounts/list
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/admin/service_accounts/list Changed · +19 / -14 lines
# List Service Accounts ## Query parameters ## Headers ## Returns ## Example ### Response (200) ## List Service Accounts ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: List Service Accounts -url: https://platform.claude.com/docs/en/api/admin/service_accounts/list ---- +# List Service Accounts -## List Service Accounts +**GET** `/v1/organizations/service_accounts` -**get** `/v1/organizations/service_accounts` - List service accounts in the caller's organization. Results are ordered by creation time, newest first. Use `limit` and the
`next_page` cursor to paginate; set `include_archived=true` to include archived service accounts. -### Query Parameters +## Query parameters - `include_archived: optional boolean` Include archived resources. Defaults to false. + default: false + - `limit: optional number` Number of results per page. + default: 20, maximum: 100, minimum: 1 + - `page: optional string` Opaque cursor from a previous response's `next_page`. -### Header Parameters +## Headers - `"anthropic-beta": optional array of string`
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta. -### Returns +## Returns - `data: array of ServiceAccount`
If set, this service account is archived. + format: date-time + - `archived_by_actor_id: string or null` Tagged ID (`user_`/`svac_`) of the actor that archived this service account.
When this service account was created. + format: date-time + - `created_by_actor_id: string or null` Tagged ID (`user_`/`svac_`) of the actor that created this service account.
- `type: "service_account"` - - `"service_account"` + default: service_account - `updated_at: string` When this service account was last updated. + format: date-time + - `updated_by_actor_id: string or null` Tagged ID (`user_`/`svac_`) of the actor that last updated this service account.
Opaque cursor for the next page, or null if no more results. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/organizations/service_accounts \ -H 'anthropic-version: 2023-06-01' \ -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +### Response (200) ```json {