> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get regulatory requirements

> Get the regulatory information needed to buy a phone number, for one specific number or for a country and number type. Prefer `phoneNumber`: the response is then exactly the list the purchase of that number validates against. Pass each `requirementTypes[].id` back as `requirementType` in `regulatoryRequirements` on `POST /v1/phone-numbers`.

For `phoneNumber`, the requirements of that exact number are returned. When they cannot be resolved for the number itself, the list for its country and `type` is returned instead, and the purchase uses the same list. An empty `items` array means the number needs no regulatory information. If the requirements cannot be retrieved at all, the response is `502 requirements_unavailable`, never an empty list.

URL-encode the `+` of `phoneNumber` as `%2B`. An unencoded `+` is also accepted.



## OpenAPI

````yaml /openapi.json get /v1/phone-numbers/requirements
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    location requests, and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url,
    location_request, reaction, template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram/Messenger)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/phone-numbers/requirements:
    get:
      summary: Get regulatory requirements
      description: >-
        Get the regulatory information needed to buy a phone number, for one
        specific number or for a country and number type. Prefer `phoneNumber`:
        the response is then exactly the list the purchase of that number
        validates against. Pass each `requirementTypes[].id` back as
        `requirementType` in `regulatoryRequirements` on `POST
        /v1/phone-numbers`.


        For `phoneNumber`, the requirements of that exact number are returned.
        When they cannot be resolved for the number itself, the list for its
        country and `type` is returned instead, and the purchase uses the same
        list. An empty `items` array means the number needs no regulatory
        information. If the requirements cannot be retrieved at all, the
        response is `502 requirements_unavailable`, never an empty list.


        URL-encode the `+` of `phoneNumber` as `%2B`. An unencoded `+` is also
        accepted.
      operationId: getPhoneNumberRequirements
      parameters:
        - name: countryCode
          in: query
          required: false
          schema:
            type: string
            minLength: 2
            maxLength: 2
          example: DE
          description: Two-letter ISO country code. Required unless `phoneNumber` is given.
        - name: type
          in: query
          schema:
            $ref: '#/components/schemas/PhoneNumberType'
          description: >-
            Type of phone number (local, national, mobile, tollFree). Defaults
            to `local`. With `phoneNumber`, used only when the number's own
            requirements cannot be resolved and the country list is returned.
        - name: phoneNumber
          in: query
          required: false
          schema:
            type: string
          example: '+4930123456'
          description: >-
            E.164 number from `GET /v1/phone-numbers/available`, with `+`
            encoded as `%2B`. Returns the requirements the purchase of that
            number checks. Takes precedence over `countryCode`.
      responses:
        '200':
          description: Requirements for the number, or for the country and type.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Requirement'
              example:
                items:
                  - id: '+4930123456'
                    countryCode: DE
                    phoneNumberType: local
                    action: ordering
                    requirementTypes:
                      - id: 8c5b1a2e-0f3d-4f5b-9a61-2c7e4d9b1f10
                        name: Address
                        description: An address in Germany
                        type: address
                      - id: 3f9e2d41-7b6a-4c1e-8d52-9a0b1c2d3e4f
                        name: Identity document
                        description: A copy of an identity document
                        type: document
        '400':
          description: >-
            Neither `countryCode` nor `phoneNumber` was given, one is malformed,
            or the requirements cannot be looked up for this input
            (`invalid_request`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            The requirements could not be retrieved right now. Retry; do not
            treat this as "no requirements".
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: requirements_unavailable
                message: >-
                  Regulatory requirements could not be retrieved right now.
                  Retry shortly; do not treat this as no requirements.
      security:
        - bearerAuth: []
components:
  schemas:
    PhoneNumberType:
      type: string
      enum:
        - local
        - national
        - tollFree
        - mobile
      description: >-
        Type of phone number. `mobile` is stocked in countries where no
        geographic (`local`) or non-geographic (`national`) inventory exists,
        and in several markets it is the only type that can receive SMS.
    Requirement:
      type: object
      description: >-
        The requirements for ordering a number: for a country and number type,
        or for one specific number when requested with `phoneNumber` (then `id`
        is that phone number and `countryCode` is taken from it).
      required:
        - id
        - countryCode
        - phoneNumberType
        - action
        - requirementTypes
      properties:
        id:
          type: string
        countryCode:
          type: string
          example: DE
        phoneNumberType:
          type: string
          example: local
        action:
          type: string
          example: ordering
        requirementTypes:
          type: array
          items:
            $ref: '#/components/schemas/RequirementType'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    RequirementType:
      type: object
      description: A specific requirement type within a requirement group.
      required:
        - id
        - name
        - description
        - type
      properties:
        id:
          type: string
          description: >-
            Send this as `requirementType` in `regulatoryRequirements` when
            purchasing.
        name:
          type: string
        description:
          type: string
        type:
          $ref: '#/components/schemas/RequirementFieldType'
        example:
          type: string
          nullable: true
        acceptanceCriteria:
          $ref: '#/components/schemas/RequirementAcceptanceCriteria'
    RequirementFieldType:
      type: string
      description: Type of requirement field.
      enum:
        - textual
        - address
        - document
        - action
    RequirementAcceptanceCriteria:
      type: object
      description: Acceptance criteria for a requirement.
      properties:
        minLength:
          type: integer
          nullable: true
        maxLength:
          type: integer
          nullable: true
        allowedValues:
          type: array
          items:
            type: string
          nullable: true
        regexPattern:
          type: string
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````