# Session grants (/docs/swivy/api-reference/session-grants)

<Callout type="warn" title="Testnet preview">
Staging uses software custody. Use your environment’s API base URL and test assets only.
</Callout>

5 operations from the November 1, 2026 deployed contract. [Full OpenAPI schema](/swivy/openapi.json) · [Live interactive reference](https://swivy.swopme.co/docs#reference).

## List delegated session grants [#list-delegated-session-grants]

<EndpointHeader method="GET" path="/v1/runtime/session-grants" base={false} />

**Auth:** `x-swivy-app-id` + `x-swivy-publishable-key` + `Authorization: Bearer token (BearerSession)` **or** `x-swivy-app-id` + `x-swivy-secret-key` + `Authorization: Bearer token (BearerSession)`

**Responses:** `200` Delegated session grants · `401` Invalid runtime session or environment credentials

## Create a delegated session grant [#create-a-delegated-session-grant]

<EndpointHeader method="POST" path="/v1/runtime/session-grants" base={false} />

**Auth:** `x-swivy-app-id` + `x-swivy-publishable-key` + `Authorization: Bearer token (BearerSession)` **or** `x-swivy-app-id` + `x-swivy-secret-key` + `Authorization: Bearer token (BearerSession)`

**Request body:** required. Delegated session-grant payload

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `accountId` | string | Yes |  |
| `label` | string | No |  |
| `challengeId` | string | No |  |
| `publicKey` | string | Yes |  |
| `expiresInSeconds` | integer | No |  |
| `scope` | object | No |  |

Nested schemas and constraints are in the [OpenAPI document](/swivy/openapi.json).

**Responses:** `200` Created session grant · `400` Session grant payload is invalid · `401` MFA required or invalid runtime session · `403` Session grant not allowed · `404` Managed account not found · `409` Client reconstruction required

## Revoke a delegated session grant [#revoke-a-delegated-session-grant]

<EndpointHeader method="POST" path="/v1/runtime/session-grants/{grantId}/revoke" base={false} />

**Auth:** `x-swivy-app-id` + `x-swivy-publishable-key` + `Authorization: Bearer token (BearerSession)` **or** `x-swivy-app-id` + `x-swivy-secret-key` + `Authorization: Bearer token (BearerSession)`

| Parameter | Location | Required | Description |
|---|---|---|---|
| `grantId` | path | Yes | Session grant identifier |

**Responses:** `200` Revoked session grant · `401` Invalid runtime session or environment credentials · `404` Session grant not found

## Create a signing intent with a delegated session grant [#create-a-signing-intent-with-a-delegated-session-grant]

<EndpointHeader method="POST" path="/v1/runtime/session-grants/{grantId}/intents/signing" base={false} />

**Auth:** `x-swivy-app-id` + `x-swivy-publishable-key` **or** `x-swivy-app-id` + `x-swivy-secret-key`

| Parameter | Location | Required | Description |
|---|---|---|---|
| `grantId` | path | Yes | Session grant identifier |

**Request body:** required. Delegated signing intent payload

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `payload` | object | Yes |  |
| `authorization` | object | Yes |  |

Nested schemas and constraints are in the [OpenAPI document](/swivy/openapi.json).

**Responses:** `200` Queued or completed signing intent · `400` Unsupported signing payload · `401` Invalid session grant, authorization, or environment credentials · `403` Signing kind or network not allowed · `404` Session grant or managed account not found · `409` Client reconstruction required or nonce reused

## Create a transaction intent with a delegated session grant [#create-a-transaction-intent-with-a-delegated-session-grant]

<EndpointHeader method="POST" path="/v1/runtime/session-grants/{grantId}/intents/transactions" base={false} />

**Auth:** `x-swivy-app-id` + `x-swivy-publishable-key` **or** `x-swivy-app-id` + `x-swivy-secret-key`

| Parameter | Location | Required | Description |
|---|---|---|---|
| `grantId` | path | Yes | Session grant identifier |

**Request body:** required. Delegated transaction intent payload

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `payload` | object | Yes |  |
| `authorization` | object | Yes |  |

Nested schemas and constraints are in the [OpenAPI document](/swivy/openapi.json).

**Responses:** `200` Queued or completed transaction intent · `400` Unsupported transaction payload · `401` Invalid session grant, authorization, or environment credentials · `403` Execution, network, or value not allowed · `404` Session grant or managed account not found · `409` Client reconstruction required or nonce reused
