curl -sS -X POST "$BMA_BASE_URL/v1/sessions/ses_agray4o575ytrcguudsrm73sbq/resources/sesrsc_agray4o575y2tf6tmq6q5dsobq" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{
"authorization_token": "ghp_..."
}'{
"type": "file",
"id": "sesrsc_agray4o575y2tf6tmq6q5dsobq",
"file_id": "file_agray4o575y2dgcykoagz7tdfy",
"mount_path": "/mnt/session/uploads/data/q3.csv",
"created_at": "2026-11-24T07:12:03.418211Z",
"updated_at": "2026-11-24T07:12:03.418211Z"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}Update Session Resource
Not supported on BMA: Always 400 invalid_request once the session and the resource are found: BMA mounts no github_repository resources, the only kind with a token to rotate.
Rotates the authorization token of a session resource, which the official API offers for github_repository resources only. BMA mounts no github_repository resources, so once the session and the resource are found this endpoint always answers 400 invalid_request and changes nothing. The request body is not read.
Authorization: Organization API key (x-api-key: bma_org_v1_…), personal access token (Authorization: Bearer bma_pat_v1_…), OAuth access token or signed-in dashboard session; a user credential names its organization with bma-organization-id. The request acts in one workspace: the one named by bma-workspace-id (or anthropic-workspace-id; when both are sent they must agree), else the credential’s default workspace (an API key’s own workspace, else its organization’s Default workspace), else the only workspace the credential can use. Every workspace role may call it (viewer included); organization owners and admins act as workspace admins in every workspace of their organization.
Limits:
- No limits specific to this endpoint.
- Rate limit: one request of the organization’s write budget (Rate limits).
Errors (besides the common errors (401 authentication, 429 rate_limited, 500)):
| Status | error.type | error.code | Cause | Fix |
|---|---|---|---|---|
| 400 | invalid_request_error | invalid_request | Always, once the session and the resource exist; only github_repository resources support token rotation. | Do not call this endpoint on BMA; there is no token to rotate. |
| 400 | invalid_request_error | organization_required | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the bma-organization-id header. |
| 400 | invalid_request_error | project_required | The credential can use several workspaces and the request names none. | Name the workspace with the bma-workspace-id header. |
| 400 | invalid_request_error | workspace_id_conflict | bma-workspace-id and anthropic-workspace-id name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |
| 404 | not_found_error | resource_not_found | The session has no resource with this ID. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |
curl -sS -X POST "$BMA_BASE_URL/v1/sessions/ses_agray4o575ytrcguudsrm73sbq/resources/sesrsc_agray4o575y2tf6tmq6q5dsobq" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{
"authorization_token": "ghp_..."
}'{
"type": "file",
"id": "sesrsc_agray4o575y2tf6tmq6q5dsobq",
"file_id": "file_agray4o575y2dgcykoagz7tdfy",
"mount_path": "/mnt/session/uploads/data/q3.csv",
"created_at": "2026-11-24T07:12:03.418211Z",
"updated_at": "2026-11-24T07:12:03.418211Z"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}Path Parameters
Body
Response
Never returned on BMA; the endpoint always answers with an error.
- Option 1
- Option 2
- Option 3
The updated session resource.