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

# Send contact code

> ⚠️ **This call is real**: it **sends a real verification code** to the holder's contact on that channel (a WhatsApp message or an e-mail).

Sends a new code on a required channel of the current verification and answers **200** with the state. The new code replaces the previous one. No body. The first codes are sent by `POST /v1/phone-lines/verification` itself: call this for a code that expired (10 minutes), was locked (5 wrong attempts), or did not arrive.

At most **one code per channel every 60 seconds**, counting the one the submit sent (429 `CONTACT_CODE_COOLDOWN`). Only while the verification is `PENDING_CONTACT` (409 `VERIFICATION_WRONG_STATE` afterwards), and only on a channel in `requiredChannels` (400 `CONTACT_CODE_NOT_REQUIRED`). 503 `SUPPLIER_UNAVAILABLE`: the code could not be queued for sending; nothing counts against the cooldown — try again. No `Idempotency-Key`: a send is limited by its cooldown. Requires a **tenant-scoped** key, like every `/v1/phone-lines` endpoint (a number-scoped key gets `403 NUMBER_SCOPE_NOT_ALLOWED`). Permission `phone_lines:purchase`, the same as buying: with an OAuth/MCP token only the workspace **OWNER** may call it (`403 PERMISSION_DENIED` otherwise). It is the same verification as the dashboard's (**Phone lines** → **Buy phone lines**): whichever you use, the other sees the result. The response is the verification state object, sent with `Cache-Control: no-store`; the document number and the contacts come back masked.

> [!NOTE]
>
> This sends a real code to the contact you registered in the verification.


## OpenAPI

````yaml openapi.json POST /v1/phone-lines/verification/contact/{channel}/send
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    Public REST API for Pilot Status. Authenticate with the `x-api-key: ps_...`
    header (or `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/phone-lines/verification/contact/{channel}/send:
    post:
      tags:
        - Phone Lines
      summary: Send a new contact code
      description: >-
        ⚠️ **This call is real**: it **sends a real verification code** to the
        holder's contact on that channel (a WhatsApp message or an e-mail).


        Sends a new code on a required channel of the current verification and
        answers **200** with the state. The new code replaces the previous one.
        No body. The first codes are sent by `POST /v1/phone-lines/verification`
        itself: call this for a code that expired (10 minutes), was locked (5
        wrong attempts), or did not arrive.


        At most **one code per channel every 60 seconds**, counting the one the
        submit sent (429 `CONTACT_CODE_COOLDOWN`). Only while the verification
        is `PENDING_CONTACT` (409 `VERIFICATION_WRONG_STATE` afterwards), and
        only on a channel in `requiredChannels` (400
        `CONTACT_CODE_NOT_REQUIRED`). 503 `SUPPLIER_UNAVAILABLE`: the code could
        not be queued for sending; nothing counts against the cooldown — try
        again. No `Idempotency-Key`: a send is limited by its cooldown. Requires
        a **tenant-scoped** key, like every `/v1/phone-lines` endpoint (a
        number-scoped key gets `403 NUMBER_SCOPE_NOT_ALLOWED`). Permission
        `phone_lines:purchase`, the same as buying: with an OAuth/MCP token only
        the workspace **OWNER** may call it (`403 PERMISSION_DENIED` otherwise).
        It is the same verification as the dashboard's (**Phone lines** → **Buy
        phone lines**): whichever you use, the other sees the result. The
        response is the verification state object, sent with `Cache-Control:
        no-store`; the document number and the contacts come back masked.
      operationId: post_phone_lines_verification_contact_channel_send
      parameters:
        - name: channel
          in: path
          required: true
          schema:
            type: string
            enum:
              - whatsapp
              - email
          example: email
          description: >-
            The contact channel, **lowercase**: `whatsapp` or `email`. It must
            be in `verification.contact.requiredChannels` (there in upper case).
            Anything else → 400 `INVALID_CONTACT_CHANNEL`.
      responses:
        '200':
          description: New code sent; the verification state
          headers:
            Cache-Control:
              description: Always `no-store`.
              schema:
                type: string
                enum:
                  - no-store
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - NONE
                      - PENDING_CONTACT
                      - IN_REVIEW
                      - APPROVED
                      - NEEDS_DOCUMENT
                      - REJECTED
                    description: >-
                      `NONE` (never started), `PENDING_CONTACT` (waiting for the
                      contact codes and, if `document.status` says so, a better
                      document), `IN_REVIEW` (finished, waiting for a person —
                      purchase allowed), `APPROVED` (verified — purchase
                      allowed), `NEEDS_DOCUMENT` (the reviewer asked for another
                      document) or `REJECTED` (final — talk to support). The
                      `phone_line.verification_updated` webhook uses the same
                      values for the last four.
                  canPurchase:
                    type: boolean
                    description: >-
                      Whether `POST /v1/phone-lines` is allowed now: `true` for
                      `APPROVED` and `IN_REVIEW`.
                  verification:
                    type: object
                    nullable: true
                    description: '`null` for `NONE`.'
                    properties:
                      id:
                        type: string
                        description: >-
                          Identifies the verification — the `verificationId` of
                          the webhook event, and what support will ask for.
                      documentType:
                        type: string
                        enum:
                          - CNPJ
                          - CPF
                      documentNumber:
                        type: string
                        description: >-
                          **Masked**: `**.***.333/0001-**` (CNPJ) or
                          `***.456.789-**` (CPF). The full number is never
                          returned.
                      legalName:
                        type: string
                        nullable: true
                        description: >-
                          The company name from the public registry (CNPJ).
                          `null` for a CPF, and when the registry could not be
                          consulted.
                      contact:
                        type: object
                        properties:
                          email:
                            type: string
                            description: The contact e-mail, masked (`a***@example.com`).
                          whatsapp:
                            type: string
                            nullable: true
                            description: The contact WhatsApp, masked (`+5511****0000`).
                          requiredChannels:
                            type: array
                            items:
                              type: string
                              enum:
                                - WHATSAPP
                                - EMAIL
                            description: >-
                              `WHATSAPP` and/or `EMAIL`: the codes this
                              verification needs. Frozen when the verification
                              starts. Through the API `EMAIL` is always
                              required.
                          confirmedChannels:
                            type: array
                            items:
                              type: string
                              enum:
                                - WHATSAPP
                                - EMAIL
                            description: The required channels already confirmed.
                          pendingChannels:
                            type: array
                            items:
                              type: string
                              enum:
                                - WHATSAPP
                                - EMAIL
                            description: >-
                              The required channels still waiting for their
                              code.
                      document:
                        type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - RECEIVED
                              - UNREADABLE
                              - UNCLEAR
                              - REQUESTED
                              - MISSING
                            description: >-
                              `RECEIVED` (the document is in), `UNREADABLE` (we
                              found no number in the file), `UNCLEAR` (we found
                              numbers, but none we could trust), `REQUESTED`
                              (the reviewer asked for another document) or
                              `MISSING` (no document yet). For the last four,
                              send a new document with `POST
                              /v1/phone-lines/verification/document`.
                      reviewReason:
                        type: string
                        nullable: true
                        enum:
                          - REGISTRY_UNAVAILABLE
                          - DOCUMENT_CHECK
                          - null
                        description: >-
                          Only while `IN_REVIEW`: `REGISTRY_UNAVAILABLE` (the
                          CNPJ registry could not be consulted) or
                          `DOCUMENT_CHECK` (the document needs a look). `null`
                          otherwise.
                      reviewNote:
                        type: string
                        nullable: true
                        description: >-
                          The reviewer's message, on `REJECTED` and
                          `NEEDS_DOCUMENT` only. `null` otherwise, and it may be
                          `null` there too.
                      createdAt:
                        type: string
                        format: date-time
                        description: ISO 8601 — when this verification was submitted.
                      updatedAt:
                        type: string
                        format: date-time
                        description: ISO 8601 — its last change.
              example:
                status: PENDING_CONTACT
                canPurchase: false
                verification:
                  id: cmg5k0v3r0000vf8example7k
                  documentType: CNPJ
                  documentNumber: '**.***.333/0001-**'
                  legalName: ACME LTDA
                  contact:
                    email: a***@example.com
                    whatsapp: +5511****0000
                    requiredChannels:
                      - WHATSAPP
                      - EMAIL
                    confirmedChannels:
                      - WHATSAPP
                    pendingChannels:
                      - EMAIL
                  document:
                    status: RECEIVED
                  reviewReason: null
                  reviewNote: null
                  createdAt: '2026-10-01T13:55:02.000Z'
                  updatedAt: '2026-10-01T13:56:40.000Z'
        '400':
          description: >-
            `INVALID_CONTACT_CHANNEL`: `{channel}` is not `whatsapp` or `email`.
            `CONTACT_CODE_NOT_REQUIRED`: the channel is not in
            `requiredChannels`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                invalidChannel:
                  summary: Unknown channel
                  value:
                    error: >-
                      The channel in the path must be "whatsapp" or "email". | O
                      canal no caminho deve ser "whatsapp" ou "email".
                    code: INVALID_CONTACT_CHANNEL
                notRequired:
                  summary: Channel not required
                  value:
                    error: >-
                      This channel does not need a code. | Este canal não
                      precisa de código.
                    code: CONTACT_CODE_NOT_REQUIRED
        '401':
          description: >-
            Missing or invalid `x-api-key` / `x-api-key-id` header (or OAuth
            Bearer token). No `code` in this body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Invalid API key
        '403':
          description: >-
            Number-scoped key or per-number OAuth grant
            (`NUMBER_SCOPE_NOT_ALLOWED` — use the tenant-scoped key); OAuth/MCP
            token whose user is not the workspace OWNER (`PERMISSION_DENIED`) or
            no longer an active member (`WORKSPACE_MEMBERSHIP_REQUIRED`);
            archived workspace (`WORKSPACE_ARCHIVED`). The scope and role errors
            carry an English-only `error`.. `TENANT_REQUIRED`: credential not
            bound to any workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                numberScope:
                  summary: Number-scoped key
                  value:
                    error: This endpoint requires a tenant-scoped API key
                    code: NUMBER_SCOPE_NOT_ALLOWED
                permission:
                  summary: OAuth/MCP user is not the OWNER
                  value:
                    error: >-
                      Your workspace role does not allow this action
                      (phone_lines:purchase).
                    code: PERMISSION_DENIED
                membership:
                  summary: OAuth/MCP user no longer an active member
                  value:
                    error: >-
                      The user behind this token is not an active member of this
                      workspace.
                    code: WORKSPACE_MEMBERSHIP_REQUIRED
                archived:
                  summary: Archived workspace
                  value:
                    error: >-
                      This workspace has been archived and its API is closed. |
                      Este workspace foi arquivado e sua API está encerrada.
                    code: WORKSPACE_ARCHIVED
                tenantRequired:
                  summary: Credential not bound to a workspace
                  value:
                    error: This credential is not bound to a workspace.
                    code: TENANT_REQUIRED
        '404':
          description: '`VERIFICATION_NOT_FOUND`: nothing was submitted in this workspace.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Verification not found. | Verificação não encontrada.
                code: VERIFICATION_NOT_FOUND
        '409':
          description: >-
            `VERIFICATION_WRONG_STATE`: the verification is no longer
            `PENDING_CONTACT`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  The verification is not in a state that allows this. | A
                  verificação não está em um estado que permita isso.
                code: VERIFICATION_WRONG_STATE
        '429':
          description: >-
            `CONTACT_CODE_COOLDOWN`: a code was sent on this channel less than
            60 seconds ago.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  Wait a moment before requesting another code. | Aguarde um
                  pouco antes de pedir outro código.
                code: CONTACT_CODE_COOLDOWN
        '500':
          description: Unexpected failure. Retry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unexpected error. | Erro inesperado.
                code: INTERNAL_ERROR
        '503':
          description: >-
            `SUPPLIER_UNAVAILABLE`: the code could not be queued for sending.
            Nothing counts against the cooldown — try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  Phone lines are temporarily unavailable. Try again in a few
                  minutes. | As linhas estão temporariamente indisponíveis.
                  Tente de novo em alguns minutos.
                code: SUPPLIER_UNAVAILABLE
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ps_ API key
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: API key id (alternative to x-api-key)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.