Create Service Account
api/admin/service_accounts/create
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/create Changed · +20 / -15 lines
# Create Service Account ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Create Service Account ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
---- -title: Create Service Account -url: https://platform.claude.com/docs/en/api/admin/service_accounts/create ---- +# Create Service Account -## Create Service Account +**POST** `/v1/organizations/service_accounts` -**post** `/v1/organizations/service_accounts` - Create a service account. A service account is a named workload identity that federation rules
an interactive credential (a user OAuth token or a Console session) — a workload may only create `developer`-role service accounts. -### 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. -### Body Parameters +## Body parameters - `name: string` Slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. + maxLength: 255, minLength: 1 + - `description: optional string or null` Optional free-text description. + maxLength: 2000 + - `organization_role: optional "admin" or "developer"` Org-level role. Defaults to `developer`.
- `"developer"` -### Returns +## Returns -- `ServiceAccount object { id, archived_at, archived_by_actor_id, 8 more }` +- `ServiceAccount object` Named non-human identity within the caller's organization.
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. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/organizations/service_accounts \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +### Response (200) ```json {