v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

Update Session Resource

post/v1/sessions/{session_id}/resources/{resource_id}?beta=true

Path parameters

session_idstring required

Path parameter session_id

resource_idstring required

Path parameter resource_id

Headers

anthropic-versionstring
anthropic-betastring

Request body

authorization_tokenstring required

New authorization token for the resource. Currently only github_repository resources support token rotation.

Example request

{
  "authorization_token": "ghp_exampletoken"
}

Response

Successful response (OK)

OR
OR

Example response

{
  "type": "github_repository",
  "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu",
  "url": "https://github.com/example-org/example-repo",
  "mount_path": "/workspace/example-repo",
  "checkout": {
    "type": "branch",
    "name": "main"
  },
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z"
}