{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/getsmileapi/main/json-schema/getsmileapi-schemas-social-security-post-request-schema.json",
  "title": "schemas-SocialSecurityPostRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsmileapi-smile-api-openapi.yml#/components/schemas/schemas-SocialSecurityPostRequest",
  "type": "object",
  "required": [
    "fullName",
    "mobileNumber",
    "curp",
    "templateId",
    "consent"
  ],
  "properties": {
    "emailAddress": {
      "type": "string",
      "format": "email",
      "description": "Email address to receive the report."
    },
    "fullName": {
      "type": "string",
      "description": "Full name of the person"
    },
    "mobileNumber": {
      "type": "string",
      "description": "Subject's mobile number. `Required`. Must start with country code i.e. 529178912345, and no leading zeros. MD5‑encrypted input is accepted with the format `MD5(countryCode + mobileNumber)` i.e. `MD5(529559991234)`."
    },
    "curp": {
      "type": "string",
      "description": "CURP (Clave Única de Registro de Población)"
    },
    "nss": {
      "type": "string",
      "description": "Mexico's social security number (NSS). Required for MX template."
    },
    "templateId": {
      "type": "string",
      "description": "The template ID to use for the request."
    },
    "consent": {
      "$ref": "#/$defs/Consent"
    }
  },
  "$defs": {
    "Consent": {
      "type": "object",
      "required": [
        "consentedAt",
        "consentedWith"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The internal name of your consent document (e.g. \"Terms and Conditions\" or \"Privacy Policy\"); your own reference label"
        },
        "version": {
          "type": "string",
          "description": "Your internal version identifier for this consent document (e.g. \"1.0.0\")"
        },
        "consentedAt": {
          "allOf": [
            {
              "$ref": "#/$defs/RefDateTime"
            }
          ],
          "description": "The date and time the subject accepted your consent document, typically when they tapped \"I agree\" in your app. Not the time of this API call. Use ISO 8601 format, e.g. \"2024-04-14T09:30:24Z\""
        },
        "consentedWith": {
          "type": "string",
          "description": "The exact text of the button or checkbox the user clicked to give consent, e.g. \"I agree to the Terms and Conditions\""
        },
        "consentTemplateId": {
          "type": "string",
          "description": "ID of a stored Consent Template. Retrieve from the Developer Portal or GET /consentTemplates. Overrides any inline fields above when provided."
        }
      }
    },
    "RefDateTime": {
      "type": "string",
      "title": "Date and Time string",
      "format": "date-time",
      "description": "Date and time"
    }
  }
}