Hyperscale docs Sign in Start building

Revoke one of the calling end customer's sessions

customer.session.revoke

Revokes a single session belonging to the end customer making the request, such as the sign-in on a lost phone, ended from the laptop they still have. A session id that belongs to anyone else is not found rather than refused, so the operation cannot be used to discover that a session exists. Idempotent: revoking an already-revoked session succeeds with status already_revoked.

POST /v1/customer-identity/sessions/{customerSessionId}/revoke

Principal customer_session. Idempotency required. Environment either.

Input

FieldInTypeDescription
customerSessionId requiredpathstringHyperscale end-customer session ID
X-Hyperscale-Environmentheadersandbox | live
Idempotency-Key requiredheaderstring
X-Hyperscale-Rehearsalheader"true"`true` runs the request through admission and execution, keeps nothing, and answers OperationRehearsal with 200 in place of the operation's own output. Needs a signed-in caller. Identity operations, such as sign-in, sessions, team members and agent grants, refuse it with invalid_request.

Request sample

curl --request POST 'https://hyperscale0.ai/v1/customer-identity/sessions/csess_sandbox_aisha0002/revoke' \
  --header "Authorization: Bearer $HYPERSCALE_API_KEY" \
  --header 'X-Hyperscale-Environment: sandbox' \
  --header "Idempotency-Key: $(uuidgen)"

Errors

CodeHTTPCause
environment_mismatch403The session was issued for sandbox or live and the request targets the other environment.
idempotency_conflict409The request reused an Idempotency-Key for a different logical mutation.
idempotency_required400The operation is a mutation and Hyperscale requires a replay key before executing it.
internal_error500Hyperscale hit an unexpected server-side condition and hid internal implementation details from this audience.
invalid_request400The request does not match the API reference.
missing_required_scope403The credential is valid but does not grant one or more operation scopes.
not_found404No Hyperscale route matched the requested path and method.
product_access_suspended403The Product is disabled or closed, so its credentials are suspended in every environment.
product_activation_required403The live Product or required live capability is not active yet.
rate_limited429The credential sent more than its limit in the current 60-second window: 600 requests per API key or session, 1,200 per IP address. Every response carries `x-ratelimit-limit`, `x-ratelimit-remaining` and `x-ratelimit-reset` (Unix seconds).
request_body_too_large413The JSON request body exceeded Hyperscale's accepted payload size.
resource_not_found404The requested resource does not exist in the credential's visible scope.
state_conflict409The operation conflicts with the current durable state of the resource.
state_constraint_failed422The request is syntactically valid but violates a business-state constraint.
tenant_mismatch403The request mixed tenant-owned identifiers across tenant boundaries.
tenant_not_found404The credential resolved to a tenant Hyperscale cannot find.
unauthorized403The request did not include a valid Hyperscale bearer credential for this environment.
instrument_instance_not_found404No record of this instrument matches the `instanceId` in this Product, company and environment. `details.instrumentId` and `details.instrumentInstanceId` name what was looked up.
operation_not_finalized409The operation in `details.operationId` has started but has no final receipt. It is still running, or its outcome is unknown after a failure past the point where it may have committed. `details.error` carries the underlying failure when there is one.
session_not_found404No session matches the `sessionId` in this company and environment. For `customer.session.revoke`, the `customerSessionId` must also belong to the calling customer.
session_required401This operation needs a person signed in through the browser or the `hyperscale` CLI. A Product API key cannot call it. The request carried no session, or its token matched no live session.
tenant_status_forbidden409The company is suspended or closed, so every credential bound to it is refused, reads included. `details.tenantId` names the company.

All operations