---
title: "Record consent"
method: POST
path: "/api/v2/connect/consent"
tags: ["Connect"]
---

# Record consent

`POST /api/v2/connect/consent`

Records that the user authorized your platform to act on their behalf. Safe to retry — it's idempotent per user, so a repeat call updates the same record instead of creating a duplicate.

## Request body

- object
  - `user_id` string, required — The `user.id` from `/connect/verify`.
  - `terms_version` string — Optional. The version of your terms the user accepted, stored for your audit trail.

## Response `201`

The consent record.

- Consent
  - `object` 'consent'
  - `id` string
  - `user_id` string
  - `terms_version` string, nullable
  - `created_at` string, date-time

## Other responses

- `400` — `invalid_request` — missing `user_id`. `client_credentials_required` — the token wasn't minted from client credentials.
- `401` — `unauthorized` — the platform access token is missing or expired. Exchange your client credentials for a fresh one.
- `404` — `connection_not_found` — no connection exists for that user under your client.

---

[API](https://skmtc.dev/agentcard/apis/agentcard-api.md) · [All operations](https://skmtc.dev/agentcard/apis/agentcard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentcard/agentcard-api/revisions/638d12c8303f/schema)
