---
title: "POST /v1/{sid}/consent"
method: POST
path: "/v1/{sid}/consent"
tags: ["1. Consent Update"]
---

# POST /v1/{sid}/consent

`POST /v1/{sid}/consent`

## Request

- Base URL: `api.in.kaleyra.io` (relative, and the document’s source URL is not known)
- URL: `api.in.kaleyra.io/v1/{sid}/consent`
- Auth: API key in header `api-key`

The Kaleyra platform allows you to grant or revoke consent options to an end-customer based on channel and sender ID. This API allows you to send the option to your end-users to provide consent to your sender ID either using Opt-In or Opt-Out, based on regional regulations.

## Path parameters

- `sid` string, required

## Headers

- `api-key` string, required

## Request body

- object
  - `channel` string, required: Channel name for which you want to update the consent. Example - sms.
  - `sender_identifier` string, required: Inbound Sender ID. In case of SMS, it’s the short code for customers.
  - `contact_identifier` string, required: Contact identifier of the end-user or end-user's mobile number.
  - `consent_category` string: Consent category. Example - Marketing, Transactional, or Promotional.
  - `consent_topic` string: Consent topic. Example - Offers, Loan, or Insurance.
  - `source` string, required: Source of the consent request or source of opt-in or opt-out. Example - API.
  - `source_identifier` string: Unique identifier for the source request. Example - MO_id. The MO_id is the identifier stored on the SMS database.
  - `timestamp` string, date-time: Timestamp when the event occurred in ISO Date format (YYYY-MM-DDThh:mm:ss).
  - `consent_status` string, required: Status of consent. Example - OPT_IN or OPT_OUT.
  - `inbound_message_identifier` string: Inbound sender_id to which end-user is sending opt-in or opt-out message to. It will be the sender ID of the incoming MO.
  - `request_identifier` string: Unique request ID from Kaleyra from where the consent API is triggered.
  - `x_callback_url` string: Callback URL to receive updates on processing.

## Response `202`

Accepted

- object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server Error

---

[API](https://skmtc.dev/kaleyra/apis/consent-apis.md) - [All operations](https://skmtc.dev/kaleyra/apis/consent-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/kaleyra/apis/consent-apis/revisions/95f4a7eb5aae?raw)
