Skip to main content
POST
Assume role with web identity

Body

application/json

The exchange a federated caller sends. It carries no signature — the token is the credential — so every field is read from the body and nothing is inferred from the request context.

web_identity_token
string
required

The identity token to exchange, as a signed JWT. It is verified before any role is read: the signature must chain to a key the trusted provider publishes, the audience must be the one this platform was configured to accept, and exp must be in the future.

Example:

"eyJhbGciOiJSUzI1NiIsImtpZCI6..."

role_id
string<uuid>
required

The role to assume. Its trust policy has to admit this token — see the operation description.

Example:

"7c9e6679-7425-40de-944b-e07fc1f90ae7"

account_id
string<uuid>
required

The account the resulting credentials act in — the ownership scope stamped on the session, the same scope a signed request selects with X-Account-Id. Mind the difference in form: the header carries the account handle, this field carries the account's id. Naming an account does not widen the session; the role's own policies remain the ceiling.

Example:

"550e8400-e29b-41d4-a716-446655440000"

session_name
string

A label recorded on the session and in the audit trail. Defaults to the token's sub claim, so an unnamed session still records which identity it came from.

Example:

"reports-exporter"

duration_seconds
integer
default:3600

Credential validity duration (15 min to 12 hours). A value above the role's own max_session_duration is rejected rather than clamped.

Required range: 900 <= x <= 43200
Example:

3600

Response

Role assumed successfully

access_key_id
string
Example:

"AKIA..."

secret_access_key
string
Example:

"wJalrXUtnFEMI..."

session_token
string
Example:

"FwoGZXIvYXdzE..."

expiration
string<date-time>
Example:

"2026-01-15T09:30:00Z"