---
title: "Create Consent"
method: POST
path: "/consents"
tags: ["Consents"]
---

# Create Consent

`POST /consents`

Registers a consent for an identifier. Accepts an 18-char CURP (individual) or a 12-char RFC (business). The payload is the same in both cases.

## Request body

- ConsentCreationRequest
  - `identifier` string, required — Identifier of the data owner: 18-char CURP for individuals or 12-char RFC for businesses.
  - `ip_address` string, required — IP address of the user giving consent. Must be a valid IPv4 (e.g., 192.168.2.74) or IPv6 (e.g., 2001:db8::1) address.
  - `privacy_notice_url` string, uri, required — URL to the privacy notice accepted by the user.

## Response `201`

Consent created successfully.

- ConsentResponse
  - `id` string, uuid — Unique identifier for the created consent.
  - `identifier` string — The CURP (individual, 18 chars) or RFC (business, 12 chars) associated with the consent.
  - `ip_address` string — The IP address of the user who gave consent. Returned as either an IPv4 or IPv6 address.
  - `privacy_notice_url` string, uri — URL of the privacy notice accepted by the user.
  - `created_at` string, date-time — Timestamp of when the consent was created.
  - `expires_at` string, date-time — Timestamp of when the consent expires (365 days after creation).

## Other responses

- `400` — Bad Request - Invalid input parameters, such as missing required fields or invalid field values.
- `401` — Unauthorized - Invalid or missing API key.

---

[API](https://skmtc.net/burodeingresos/apis/bur-de-ingresos-api.md) · [All operations](https://skmtc.net/burodeingresos/apis/bur-de-ingresos-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/burodeingresos/bur-de-ingresos-api/versions/59e48cdbdd84/schema)
