---
updatedAt: 2026-04-21T17:01:30.000Z
agentTools:
  projectIndex: https://developers.burodeingresos.com/llms.txt
---

# Create Consent

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.

A consent expires 365 days after creation. After that, `POST /verifications` for the identifier returns `consent_expired` until you create a new consent. Data from verifications already completed can still be read.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Buró de Ingresos API",
    "version": "v1.2.17",
    "description": "Verify income and employment data with just a CURP. Made with ❤️ in Mexico 🇲🇽"
  },
  "servers": [
    {
      "url": "https://api.burodeingresos.com",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Consents",
      "description": "Endpoints for managing consents, including bulk creation. Same payload (identifier, ip_address, privacy_notice_url) for both Individual (18-char CURP) and Business (12-char RFC) identifiers. All consents expire 365 days after creation. An expired consent blocks new verifications for that identifier (`POST /verifications` returns `consent_expired`), but not reading the data from verifications already completed."
    }
  ],
  "paths": {
    "/consents": {
      "post": {
        "tags": [
          "Consents"
        ],
        "summary": "Create Consent",
        "description": "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.\n\nA consent expires 365 days after creation. After that, `POST /verifications` for the identifier returns `consent_expired` until you create a new consent. Data from verifications already completed can still be read.",
        "operationId": "createConsent",
        "x-readme": {
          "slug": "create-consent"
        },
        "requestBody": {
          "description": "Consent payload. Same shape for individual (18-char CURP) and business (12-char RFC) identifiers.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentCreationRequest"
              },
              "examples": {
                "individual": {
                  "summary": "Individual - Consent with CURP",
                  "value": {
                    "identifier": "CUAI911021MOCRQS09",
                    "ip_address": "192.168.2.74",
                    "privacy_notice_url": "https://palenca.com/privacy"
                  }
                },
                "business": {
                  "summary": "Business - Consent with RFC",
                  "value": {
                    "identifier": "MNT850612KR4",
                    "ip_address": "192.168.2.74",
                    "privacy_notice_url": "https://palenca.com/privacy"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Consent created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentResponse"
                },
                "examples": {
                  "successfulConsentIndividual": {
                    "summary": "Successful consent creation (Individual)",
                    "value": {
                      "id": "01993593-23bf-7447-a3c5-bbe3211fc3f8",
                      "identifier": "CUAI911021MOCRQS09",
                      "ip_address": "192.168.2.74",
                      "privacy_notice_url": "https://palenca.com/privacy",
                      "created_at": "2025-09-10T21:40:59.455261701Z",
                      "expires_at": "2026-09-11T03:40:59.454660011Z"
                    }
                  },
                  "successfulConsentBusiness": {
                    "summary": "Successful consent creation (Business)",
                    "value": {
                      "id": "01993593-23bf-7447-a3c5-bbe3211fc3f8",
                      "identifier": "MNT850612KR4",
                      "ip_address": "192.168.2.74",
                      "privacy_notice_url": "https://palenca.com/privacy",
                      "created_at": "2025-09-10T21:40:59.455261701Z",
                      "expires_at": "2026-09-11T03:40:59.454660011Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input parameters, such as missing required fields or invalid field values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missingIpAddress": {
                    "summary": "Missing IP Address",
                    "value": {
                      "error": {
                        "code": "validation_error",
                        "message": "Invalid input for consent creation.",
                        "details": "Field 'ip_address' is required."
                      }
                    }
                  },
                  "invalidPrivacyNoticeUrl": {
                    "summary": "Invalid Privacy Notice URL format",
                    "value": {
                      "error": {
                        "code": "validation_error",
                        "message": "Invalid input for consent creation.",
                        "details": "Field 'privacy_notice_url' must be a valid URL."
                      }
                    }
                  },
                  "invalidIpFormat": {
                    "summary": "Invalid IP Address Format",
                    "value": {
                      "error": {
                        "code": "validation_error",
                        "message": "Invalid input for consent creation.",
                        "details": "Field 'ip_address' must be a valid IPv4 or IPv6 address."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Invalid API key",
                    "value": {
                      "error": "Unauthorized",
                      "message": "Invalid X-API-Key"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConsentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the created consent."
          },
          "identifier": {
            "type": "string",
            "description": "The CURP (individual, 18 chars) or RFC (business, 12 chars) associated with the consent."
          },
          "ip_address": {
            "type": "string",
            "description": "The IP address of the user who gave consent. Returned as either an IPv4 or IPv6 address."
          },
          "privacy_notice_url": {
            "type": "string",
            "format": "uri",
            "description": "URL of the privacy notice accepted by the user."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the consent was created."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the consent expires (365 days after creation). After it, new verifications for the identifier need a new consent; data already obtained can still be read."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "A machine-readable error code."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a summary of the error."
          },
          "details": {
            "type": "string",
            "description": "Additional details about the error, which can help in debugging."
          }
        }
      },
      "ConsentCreationRequest": {
        "type": "object",
        "required": [
          "identifier",
          "ip_address",
          "privacy_notice_url"
        ],
        "properties": {
          "identifier": {
            "type": "string",
            "description": "Identifier of the data owner: 18-char CURP for individuals or 12-char RFC for businesses.",
            "minLength": 12,
            "maxLength": 18,
            "example": "CUAI911021MOCRQS09"
          },
          "ip_address": {
            "type": "string",
            "description": "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.",
            "example": "192.168.2.74"
          },
          "privacy_notice_url": {
            "type": "string",
            "format": "uri",
            "description": "URL to the privacy notice accepted by the user.",
            "example": "https://mycompany.com/privacy-policy"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "API Key for authenticating requests."
      }
    }
  }
}
```