---
title: "Insert consent records"
method: POST
path: "/v1/projects/{project_id}/consents"
tags: ["Consents"]
---

# Insert consent records

`POST /v1/projects/{project_id}/consents`

Insert consent records for multiple identifications in a single request. If the request fails, none or only some of the records may be inserted. Retry the batch later to try again.

## Request body

- InsertConsentsRequest
  - `app_id` string, required — The ID of the Conversation API app under which the consent records are to be stored.
  - `consent_records` object[], required — A list of consent records to create. Each record must include an `identification` field, which uniquely identifies the subject (e.g., phone number or contact ID), and a `consent_type`.
    - `identification` string, required — Unique identifier for the subject of the consent (e.g., phone number, contact ID).
    - `consent_type` 'OPT_OUT_ALL' | 'OPT_OUT_NOTIFICATION' | 'OPT_OUT_MARKETING' — The type of consent being inserted.

## Response `200`

OK

- InsertConsentsResponse
  - `batch_id` string — The unique ID for the batch of consent records created.

## Other responses

- `401` — Invalid credentials
- `403` — Permission denied. The specified project may not be allowed to use the batch endpoint.
- `500` — Internal error

---

[API](https://skmtc.net/sinch/apis/conversation-api-batch-api-sinch.md) · [All operations](https://skmtc.net/sinch/apis/conversation-api-batch-api-sinch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sinch/conversation-api-batch-api-sinch/revisions/c4c26e52b406/schema)
