> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Marketing Consent

> Retrieve marketing consent status for a person (email and SMS).

## Method

`GET` `/v1/people/:id/consent`

## Path Parameters

<ParamField path="id" type="string" required>The person ID.</ParamField>

## Headers

<ParamField header="Authorization" type="string" required>Bearer token (requires `customers:read`).</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.voyantcloud.com/v1/people/people_01HZYPM2QF2R8X9SZQ0J9SYBCN/consent" \
    -H "Authorization: Bearer $VOYANT_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const personId = "people_01HZYPM2QF2R8X9SZQ0J9SYBCN"
  const res = await fetch(
    `https://api.voyantcloud.com/v1/people/${personId}/consent`,
    {
      headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
    }
  )
  const consent = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  person_id = "people_01HZYPM2QF2R8X9SZQ0J9SYBCN"
  resp = requests.get(
    f"https://api.voyantcloud.com/v1/people/{person_id}/consent",
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  consent = resp.json()
  ```
</RequestExample>

## Response Fields

* `email` – Boolean indicating if email marketing consent is granted.
* `sms` – Boolean indicating if SMS marketing consent is granted.
* `email_details` – Detailed consent record for email (or null if none).
* `sms_details` – Detailed consent record for SMS (or null if none).

Each details object contains:

* `status` – Consent status (`granted` or `revoked`).
* `granted_at` – ISO timestamp when consent was granted.
* `revoked_at` – ISO timestamp when consent was revoked.
* `source` – How consent was captured (`api`, `form`, `import`, etc.).

## Response Example

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "email": true,
    "sms": false,
    "email_details": {
      "status": "granted",
      "granted_at": "2025-01-15T10:30:00.000Z",
      "revoked_at": null,
      "source": "form"
    },
    "sms_details": {
      "status": "revoked",
      "granted_at": "2025-01-10T08:00:00.000Z",
      "revoked_at": "2025-01-20T14:00:00.000Z",
      "source": "api"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "Person not found"
  }
  ```
</ResponseExample>

<Note>
  If a person has never had consent recorded for a channel, the details object for that channel will be `null` and the boolean will be `false`.
</Note>
