# Create consent session

Creates a hosted consent session for an embedded account's consumer and returns the link to send them; the consumer signs spending rules capped by the template. Console session or API key with connect:manage; expires after 24 hours.

`POST /v1/connect/consent-sessions`

Creates a hosted consent session for an embedded account's consumer and returns the link to send them; the consumer signs spending rules capped by the template. Console session or API key with connect:manage; expires after 24 hours.

Requires permission `connect:manage`.

## Request body

```json
{
  "account_id": "acc_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "redirect_url": "https://example.com/resource"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **403**: Authenticated but not allowed: missing permission, passkey step-up required, or denied by policy.

Example 200 response:

```json
{
  "session": {
    "id": "cns_01m7dpsy0x5gpy62518jpd1gwq",
    "account_id": "org_01m7dp82ahrx3etfr7q467pxvm",
    "operator_org_id": "org_01m7dmxxa29hvn42was65jge7z",
    "status": "pending",
    "consumer_email": "riley@example.com",
    "template": {
      "name": "Consumer spending rules",
      "scope": {
        "all_agents": true,
        "agent_ids": [],
        "team_ids": []
      },
      "limits": {
        "auto_threshold": 100000,
        "hard_cap": 500000,
        "plan_hard_cap": 1500000,
        "unknown_merchant_limit": 100000,
        "card_hard_cap_cents": 2500,
        "card_auto_threshold_cents": 500
      },
      "allowed": {
        "rails": [
          "x402",
          "wdk_direct"
        ],
        "chains": [
          "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
          "eip155:84532"
        ],
        "assets": [
          "USDC",
          "USDT"
        ],
        "categories": [
          "data",
          "ai"
        ],
        "tiers": [
          "UNKNOWN",
          "KNOWN"
        ]
      },
      "chain_priority": [
        "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
        "eip155:84532"
      ],
      "expires_at": "2026-11-28T23:59:59Z",
      "notes": ""
    },
    "redirect_url": "https://app.52-28-238-205.sslip.io/done",
    "mandate_id": null,
    "expires_at": "2026-11-15T18:58:34.142775Z",
    "completed_at": null,
    "created_at": "2026-11-14T18:58:34.143026Z"
  },
  "url": "https://app.52-28-238-205.sslip.io/consent/GR5ip6VtEqOr_OQSKBVH0TjgwK7UBmTI"
}
```
