AgentMessage
Consent

List the history of a consent record

GET
/v1/consent/{id}/history

Page over the history of one consent record, newest first. Each entry carries the event (opt_in, opt_out, reconfirm, or expired), the source, and the evidence captured by the relevant flow. Double-opt-in records the consent method only; hosted-form adds IP, user-agent, and form URL; attested capture carries the full bundle.

Cursor pagination surfaces the next-page cursor in meta.next_cursor.

Requests for a record outside your organization return 404 NOT_FOUND.

Requires the consent:read scope.

AuthorizationBearer <token>

Authenticate by sending your API key as a bearer token: Authorization: Bearer am_live_.... Every request is automatically scoped to the organization that owns the key and to the scopes granted to that key.

In: header

Path Parameters

id*string
Formatuuid

Query Parameters

cursor?string
limit?integer
Default20
Range1 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/consent/497f6eca-6276-4993-bfeb-53cbbbba6f08/history"
{
  "success": true,
  "data": [
    {
      "id": "0190a1b2-c3d4-e5f6-a7b8-c9d0e1f2a3c1",
      "consent_id": "0190a1b2-c3d4-e5f6-a7b8-c9d0e1f2a3b6",
      "event": "opt_out",
      "keyword": "STOP",
      "source": "inbound_reply",
      "raw_event_id": "0190a1b2-c3d4-e5f6-a7b8-c9d0e1f2a3c2",
      "occurred_at": "2026-04-26T13:00:00Z",
      "evidence_ip": null,
      "evidence_user_agent": null,
      "evidence_agreement_text_hash": null,
      "evidence_form_url": null,
      "evidence_consent_method": null
    },
    {
      "id": "0190a1b2-c3d4-e5f6-a7b8-c9d0e1f2a3c0",
      "consent_id": "0190a1b2-c3d4-e5f6-a7b8-c9d0e1f2a3b6",
      "event": "opt_in",
      "keyword": null,
      "source": "api",
      "raw_event_id": null,
      "occurred_at": "2026-04-26T12:00:00Z",
      "evidence_ip": "203.0.113.42",
      "evidence_user_agent": "Mozilla/5.0",
      "evidence_agreement_text_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
      "evidence_form_url": "https://example.com/signup",
      "evidence_consent_method": "checkbox"
    }
  ],
  "meta": {
    "total": 0,
    "limit": 20,
    "offset": 0,
    "next_cursor": null
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "validation failed",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM",
    "details": {
      "to": "must be E.164",
      "body": "must be 1..1600 chars"
    }
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "authentication failed",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "missing required scope",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "not found",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "validation failed",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM",
    "details": {
      "to": "must be E.164",
      "body": "must be 1..1600 chars"
    }
  }
}