Workspaces
Create Workspace
post /v1/organizations/workspaces
Create Workspace
Header Parameters
-
"anthropic-beta": optional array of stringOptional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like
beta1,beta2or specify the header multiple times for each beta.
Body Parameters
-
name: stringName of the Workspace.
-
data_residency: optional object { allowed_inference_geos, default_inference_geo, workspace_geo }Data residency configuration for the workspace. If omitted, defaults to workspace_geo=
"us", allowed_inference_geos="unrestricted", and default_inference_geo="global".-
allowed_inference_geos: optional array of string or "unrestricted"Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: optional stringDefault inference geo applied when requests omit the parameter. Defaults to 'global' if omitted. Must be a member of allowed_inference_geos unless allowed_inference_geos is
"unrestricted". -
workspace_geo: optional stringGeographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.
-
-
tags: optional map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic.
Returns
-
Workspace object { id, archived_at, created_at, 5 more }-
id: stringID of the Workspace.
-
archived_at: stringRFC 3339 datetime string indicating when the Workspace was archived, or
nullif the Workspace is not archived. -
created_at: stringRFC 3339 datetime string indicating when the Workspace was created.
-
data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }Data residency configuration.
-
allowed_inference_geos: array of string or "unrestricted"Permitted inference geo values. 'unrestricted' means all geos are allowed.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: stringDefault inference geo applied when requests omit the parameter.
-
workspace_geo: stringGeographic region for workspace data storage. Immutable after creation.
-
-
display_color: stringHex color code representing the Workspace in the Anthropic Console.
-
name: stringName of the Workspace.
-
tags: map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic. -
type: "workspace"Object type.
For Workspaces, this is always
"workspace"."workspace"
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY" \
-d '{
"name": "x",
"tags": {
"env": "prod",
"team": "platform"
}
}'
Response
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
Get Workspace
get /v1/organizations/workspaces/{workspace_id}
Get Workspace
Path Parameters
-
workspace_id: stringID of the Workspace.
Returns
-
Workspace object { id, archived_at, created_at, 5 more }-
id: stringID of the Workspace.
-
archived_at: stringRFC 3339 datetime string indicating when the Workspace was archived, or
nullif the Workspace is not archived. -
created_at: stringRFC 3339 datetime string indicating when the Workspace was created.
-
data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }Data residency configuration.
-
allowed_inference_geos: array of string or "unrestricted"Permitted inference geo values. 'unrestricted' means all geos are allowed.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: stringDefault inference geo applied when requests omit the parameter.
-
workspace_geo: stringGeographic region for workspace data storage. Immutable after creation.
-
-
display_color: stringHex color code representing the Workspace in the Anthropic Console.
-
name: stringName of the Workspace.
-
tags: map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic. -
type: "workspace"Object type.
For Workspaces, this is always
"workspace"."workspace"
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
List Workspaces
get /v1/organizations/workspaces
List Workspaces
Query Parameters
-
after_id: optional stringID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
-
before_id: optional stringID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
-
include_archived: optional booleanWhether to include Workspaces that have been archived in the response
-
limit: optional numberNumber of items to return per page.
Defaults to
20. Ranges from1to1000.
Returns
-
data: array of Workspace-
id: stringID of the Workspace.
-
archived_at: stringRFC 3339 datetime string indicating when the Workspace was archived, or
nullif the Workspace is not archived. -
created_at: stringRFC 3339 datetime string indicating when the Workspace was created.
-
data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }Data residency configuration.
-
allowed_inference_geos: array of string or "unrestricted"Permitted inference geo values. 'unrestricted' means all geos are allowed.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: stringDefault inference geo applied when requests omit the parameter.
-
workspace_geo: stringGeographic region for workspace data storage. Immutable after creation.
-
-
display_color: stringHex color code representing the Workspace in the Anthropic Console.
-
name: stringName of the Workspace.
-
tags: map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic. -
type: "workspace"Object type.
For Workspaces, this is always
"workspace"."workspace"
-
-
first_id: stringFirst ID in the
datalist. Can be used as thebefore_idfor the previous page. -
has_more: booleanIndicates if there are more results in the requested page direction.
-
last_id: stringLast ID in the
datalist. Can be used as theafter_idfor the next page.
Example
curl https://api.anthropic.com/v1/organizations/workspaces \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"data": [
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}
Update Workspace
post /v1/organizations/workspaces/{workspace_id}
Update Workspace
Path Parameters
workspace_id: string
Body Parameters
-
data_residency: optional object { allowed_inference_geos, default_inference_geo }Data residency configuration for the workspace.
-
allowed_inference_geos: optional array of string or "unrestricted"Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list of specific geos.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: optional stringDefault inference geo applied when requests omit the parameter. Must be a member of allowed_inference_geos unless allowed_inference_geos is
"unrestricted".
-
-
name: optional stringName of the Workspace.
-
tags: optional map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic.
Returns
-
Workspace object { id, archived_at, created_at, 5 more }-
id: stringID of the Workspace.
-
archived_at: stringRFC 3339 datetime string indicating when the Workspace was archived, or
nullif the Workspace is not archived. -
created_at: stringRFC 3339 datetime string indicating when the Workspace was created.
-
data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }Data residency configuration.
-
allowed_inference_geos: array of string or "unrestricted"Permitted inference geo values. 'unrestricted' means all geos are allowed.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: stringDefault inference geo applied when requests omit the parameter.
-
workspace_geo: stringGeographic region for workspace data storage. Immutable after creation.
-
-
display_color: stringHex color code representing the Workspace in the Anthropic Console.
-
name: stringName of the Workspace.
-
tags: map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic. -
type: "workspace"Object type.
For Workspaces, this is always
"workspace"."workspace"
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY" \
-d '{
"tags": {
"env": "prod",
"team": "platform"
}
}'
Response
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
Archive Workspace
post /v1/organizations/workspaces/{workspace_id}/archive
Archive Workspace
Path Parameters
workspace_id: string
Returns
-
Workspace object { id, archived_at, created_at, 5 more }-
id: stringID of the Workspace.
-
archived_at: stringRFC 3339 datetime string indicating when the Workspace was archived, or
nullif the Workspace is not archived. -
created_at: stringRFC 3339 datetime string indicating when the Workspace was created.
-
data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }Data residency configuration.
-
allowed_inference_geos: array of string or "unrestricted"Permitted inference geo values. 'unrestricted' means all geos are allowed.
-
array of string -
"unrestricted""unrestricted"
-
-
default_inference_geo: stringDefault inference geo applied when requests omit the parameter.
-
workspace_geo: stringGeographic region for workspace data storage. Immutable after creation.
-
-
display_color: stringHex color code representing the Workspace in the Anthropic Console.
-
name: stringName of the Workspace.
-
tags: map[string]User-defined tags as string key-value pairs. Keys may not begin with
anthropic. -
type: "workspace"Object type.
For Workspaces, this is always
"workspace"."workspace"
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/archive \
-X POST \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"data_residency": {
"allowed_inference_geos": "unrestricted",
"default_inference_geo": "default_inference_geo",
"workspace_geo": "workspace_geo"
},
"display_color": "#6C5BB9",
"name": "Workspace Name",
"tags": {
"env": "prod",
"team": "platform"
},
"type": "workspace"
}
Members
Create Workspace Member
post /v1/organizations/workspaces/{workspace_id}/members
Create Workspace Member
Path Parameters
-
workspace_id: stringID of the Workspace.
Body Parameters
-
user_id: stringID of the User.
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or "workspace_admin"Role of the new Workspace Member. Cannot be "workspace_billing".
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin"
-
Returns
-
WorkspaceMember object { type, user_id, workspace_id, workspace_role }-
type: "workspace_member"Object type.
For Workspace Members, this is always
"workspace_member"."workspace_member"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or 2 moreRole of the Workspace Member.
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin" -
"workspace_billing"
-
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY" \
-d '{
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_role": "workspace_user"
}'
Response
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
Get Workspace Member
get /v1/organizations/workspaces/{workspace_id}/members/{user_id}
Get Workspace Member
Path Parameters
-
workspace_id: stringID of the Workspace.
-
user_id: stringID of the User.
Returns
-
WorkspaceMember object { type, user_id, workspace_id, workspace_role }-
type: "workspace_member"Object type.
For Workspace Members, this is always
"workspace_member"."workspace_member"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or 2 moreRole of the Workspace Member.
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin" -
"workspace_billing"
-
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
List Workspace Members
get /v1/organizations/workspaces/{workspace_id}/members
List Workspace Members
Path Parameters
-
workspace_id: stringID of the Workspace.
Query Parameters
-
after_id: optional stringID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
-
before_id: optional stringID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
-
limit: optional numberNumber of items to return per page.
Defaults to
20. Ranges from1to1000.
Returns
-
data: array of WorkspaceMember-
type: "workspace_member"Object type.
For Workspace Members, this is always
"workspace_member"."workspace_member"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or 2 moreRole of the Workspace Member.
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin" -
"workspace_billing"
-
-
-
first_id: stringFirst ID in the
datalist. Can be used as thebefore_idfor the previous page. -
has_more: booleanIndicates if there are more results in the requested page direction.
-
last_id: stringLast ID in the
datalist. Can be used as theafter_idfor the next page.
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"data": [
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}
Update Workspace Member
post /v1/organizations/workspaces/{workspace_id}/members/{user_id}
Update Workspace Member
Path Parameters
-
workspace_id: stringID of the Workspace.
-
user_id: stringID of the User.
Body Parameters
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or 2 moreNew workspace role for the User.
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin" -
"workspace_billing"
-
Returns
-
WorkspaceMember object { type, user_id, workspace_id, workspace_role }-
type: "workspace_member"Object type.
For Workspace Members, this is always
"workspace_member"."workspace_member"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or 2 moreRole of the Workspace Member.
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin" -
"workspace_billing"
-
-
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
-H 'Content-Type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY" \
-d '{
"workspace_role": "workspace_user"
}'
Response
{
"type": "workspace_member",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"workspace_role": "workspace_user"
}
Delete Workspace Member
delete /v1/organizations/workspaces/{workspace_id}/members/{user_id}
Delete Workspace Member
Path Parameters
-
workspace_id: stringID of the Workspace.
-
user_id: stringID of the User.
Returns
-
type: "workspace_member_deleted"Deleted object type.
For Workspace Members, this is always
"workspace_member_deleted"."workspace_member_deleted"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"type": "workspace_member_deleted",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}
Domain Types
Workspace Member
-
WorkspaceMember object { type, user_id, workspace_id, workspace_role }-
type: "workspace_member"Object type.
For Workspace Members, this is always
"workspace_member"."workspace_member"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
-
workspace_role: "workspace_user" or "workspace_developer" or "workspace_restricted_developer" or 2 moreRole of the Workspace Member.
-
"workspace_user" -
"workspace_developer" -
"workspace_restricted_developer" -
"workspace_admin" -
"workspace_billing"
-
-
Member Delete Response
-
MemberDeleteResponse object { type, user_id, workspace_id }-
type: "workspace_member_deleted"Deleted object type.
For Workspace Members, this is always
"workspace_member_deleted"."workspace_member_deleted"
-
user_id: stringID of the User.
-
workspace_id: stringID of the Workspace.
-
Rate Limits
List Workspace Rate Limits
get /v1/organizations/workspaces/{workspace_id}/rate_limits
List rate-limit overrides configured for a workspace.
Returns only the groups and limiter types that have a workspace-level
override. Groups without overrides inherit the organization limits and
are not listed; use GET /v1/organizations/rate_limits to see those.
Path Parameters
-
workspace_id: stringThe ID of the workspace.
Query Parameters
-
group_type: optional "model_group" or "batch" or "token_count" or 3 moreFilter by group type.
-
"model_group" -
"batch" -
"token_count" -
"files" -
"skills" -
"web_search"
-
-
page: optional stringOpaque cursor from a previous response's
next_page.
Returns
-
data: array of object { group_type, limits, models, type }Rate-limit entries for the workspace, one per group that has at least one override.
-
group_type: "model_group" or "batch" or "token_count" or 3 moreThe kind of rate-limit group this entry represents.
model_groupentries apply to a family of models (listed inmodels); other values apply to an API-surface category and havemodelsset tonull.-
"model_group" -
"batch" -
"token_count" -
"files" -
"skills" -
"web_search"
-
-
limits: array of object { org_limit, type, value }The limiter values overridden for this group in this workspace. Limiter types without a workspace override are omitted and inherit the organization value.
-
org_limit: numberThe organization-level value for the same limiter type, for reference.
nullwhen the organization has no limit configured for this limiter type. -
type: stringThe limiter type (for example,
requests_per_minuteorinput_tokens_per_minute). -
value: numberThe workspace-level override value for this limiter type.
-
-
models: array of stringModel names this entry's limits apply to, including aliases.
nullwhengroup_typeis not"model_group". -
type: "workspace_rate_limit"Object type. Always
workspace_rate_limitfor workspace rate-limit entries."workspace_rate_limit"
-
-
next_page: stringToken to provide in as
pagein the subsequent request to retrieve the next page of data.
Example
curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/rate_limits \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
Response
{
"data": [
{
"group_type": "model_group",
"limits": [
{
"org_limit": 0,
"type": "type",
"value": 0
}
],
"models": [
"string"
],
"type": "workspace_rate_limit"
}
],
"next_page": "next_page"
}
Domain Types
Rate Limit List Response
-
RateLimitListResponse object { data, next_page }-
data: array of object { group_type, limits, models, type }Rate-limit entries for the workspace, one per group that has at least one override.
-
group_type: "model_group" or "batch" or "token_count" or 3 moreThe kind of rate-limit group this entry represents.
model_groupentries apply to a family of models (listed inmodels); other values apply to an API-surface category and havemodelsset tonull.-
"model_group" -
"batch" -
"token_count" -
"files" -
"skills" -
"web_search"
-
-
limits: array of object { org_limit, type, value }The limiter values overridden for this group in this workspace. Limiter types without a workspace override are omitted and inherit the organization value.
-
org_limit: numberThe organization-level value for the same limiter type, for reference.
nullwhen the organization has no limit configured for this limiter type. -
type: stringThe limiter type (for example,
requests_per_minuteorinput_tokens_per_minute). -
value: numberThe workspace-level override value for this limiter type.
-
-
models: array of stringModel names this entry's limits apply to, including aliases.
nullwhengroup_typeis not"model_group". -
type: "workspace_rate_limit"Object type. Always
workspace_rate_limitfor workspace rate-limit entries."workspace_rate_limit"
-
-
next_page: stringToken to provide in as
pagein the subsequent request to retrieve the next page of data.
-