---
title: "Record that one person opted in, opted out or was suppressed for one purpose. Hive refuses to send where consent is not live, so this is what decides whether that person can be messaged again."
method: POST
path: "/api/v1/tools/set_contact_consent"
---

# Record that one person opted in, opted out or was suppressed for one purpose. Hive refuses to send where consent is not live, so this is what decides whether that person can be messaged again.

`POST /api/v1/tools/set_contact_consent`

## Request

- Base URL: `https://hivepublish.com`
- URL: `https://hivepublish.com/api/v1/tools/set_contact_consent`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `contactId` string, required: The Hive contact identity.
  - `purpose` 'conversation' | 'marketing' | 'email' | 'sms' | 'whatsapp', required: What the consent covers.
  - `status` 'opted_in' | 'opted_out' | 'suppressed', required: What was recorded.
  - `note` string: Why, in the words a teammate would use.
  - `occurredAt` string: When it happened, as an ISO date. Defaults to now.

## Response `200`

Tool result

- ToolResult
  - `data` unknown, required
  - `meta` object, required
    - `tool` string
    - `workspaceId` string, uuid

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid credential
- `403`: Missing workspace scope, role permission, or plan entitlement
- `409`: Idempotency conflict, replay, or request still in progress
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hivepublish/apis/hive-developer-api.md) · [All operations](https://skmtc.dev/hivepublish/apis/hive-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hivepublish/apis/hive-developer-api/revisions/b440c763583e?raw)
