> ## Documentation Index
> Fetch the complete documentation index at: https://developer.omni.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Verificar números

> Verifica en lote si cada número tiene WhatsApp

## Concepto

Verifica en lote si cada número tiene WhatsApp.

> [!NOTE]
>
> De 1 a 50.000 números por llamada (fuera de eso, `400` `field` `contacts`), con un cuerpo de hasta 10 MiB (por encima, `413` `payload_too_large`). Si la respuesta del canal es demasiado grande, responde `502` `provider_response_too_large`.


## OpenAPI

````yaml es/contacts/openapi.json POST /v1/channels/{channelId}/contacts/check
openapi: 3.1.0
info:
  title: Omni Z-API - Contactos
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/contacts/check:
    post:
      tags:
        - Contatos
      summary: Verificar números
      description: Verifica, en lote, si cada número tiene WhatsApp.
      operationId: checkContacts
      parameters:
        - name: channelId
          in: path
          required: true
          description: Channel id
          schema:
            type: string
            example: 58907809F0964E998D36C87F10EBA60C
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - contacts
              properties:
                contacts:
                  type: array
                  items:
                    type: string
                  description: >-
                    Números a verificar (solo dígitos, con código de país y de
                    área). De 1 a 50.000 elementos; fuera de eso, responde 400
                    con `field` `contacts`.
                  minItems: 1
                  maxItems: 50000
            example:
              contacts:
                - '554497294996'
                - '5511900000001'
      responses:
        '200':
          description: Resultado por número
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckResult'
              example:
                results:
                  - contact: '554497294996'
                    exists: true
                    phone: '554497294996'
                    lid: 123330724110591@lid
                  - contact: '5511900000001'
                    exists: false
                    phone: null
                    lid: null
        '400':
          description: Parámetro fuera de formato
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: invalid_request
                field: contacts
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/InstanceNotFound'
        '413':
          description: Cuerpo por encima del límite (hasta 10 MiB)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: payload_too_large
        '422':
          description: >-
            Instancia no aprovisionada, suscripción inactiva, workspace
            bloqueado u operación no admitida en el canal, verificados en este
            orden (el `404` de canal inexistente viene antes que todos). Solo el
            422 de operación no admitida trae `message`, y es para lectura:
            trátalo por el `error`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                instanceNotProvisioned:
                  summary: Instancia no aprovisionada
                  value:
                    error: instance is not provisioned
                subscriptionInactive:
                  summary: Suscripción inactiva
                  value:
                    error: instance subscription is not active
                blockedWorkspace:
                  summary: Workspace bloqueado
                  value:
                    error: You are blocked, contact support.
                operationNotSupportedMeta:
                  summary: Canal WhatsApp Oficial (Meta)
                  value:
                    error: operation not supported for this instance
                    message: >-
                      Checking whether numbers have WhatsApp is not supported on
                      WhatsApp official API (Meta) channels: the official API
                      cannot check whether a number has WhatsApp. Use a WhatsApp
                      Web channel for contacts; GET
                      /v1/channels/{id}/contacts/capabilities lists what each
                      channel supports.
                operationNotSupportedOtherChannel:
                  summary: >-
                    Canal Telegram (Instagram y Messenger: mismo texto, con el
                    nombre del canal)
                  value:
                    error: operation not supported for this instance
                    message: >-
                      Checking whether numbers have WhatsApp is not supported on
                      Telegram channels: contacts belong to a WhatsApp number,
                      and this channel has none. Use a WhatsApp Web channel for
                      contacts; GET /v1/channels/{id}/contacts/capabilities
                      lists what each channel supports.
                operationNotSupportedNoType:
                  summary: Canal aún sin tipo
                  value:
                    error: operation not supported for this instance
                    message: >-
                      Checking whether numbers have WhatsApp is not supported on
                      this instance: it is not connected to any channel type
                      yet. Use a WhatsApp Web channel for contacts; GET
                      /v1/channels/{id}/contacts/capabilities lists what each
                      channel supports.
        '502':
          description: Respuesta del canal demasiado grande
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: provider_response_too_large
                message: Send fewer contacts per request.
components:
  schemas:
    CheckResult:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              contact:
                type: string
              exists:
                type: boolean
              phone:
                type: string
                nullable: true
              lid:
                type: string
                nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
        field:
          type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: >-
        Secret Key rechazada. Viene con el header `WWW-Authenticate: Bearer`; el
        `message` cambia según el motivo (ver
        [Autenticación](/es/authentication)).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Authorization invalid
            message: >-
              Authorization invalid: the Authorization header is missing or
              empty. Send the workspace Secret Key as "Authorization: Bearer
              <secret-key>". See
              https://developer.omni.z-api.io/en/authentication
      headers:
        WWW-Authenticate:
          description: Siempre `Bearer`
          schema:
            type: string
            example: Bearer
    Forbidden:
      description: >-
        IP fuera de la lista del workspace (ver [Restricción de
        IP](/es/security/ip-restriction))
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: ip_not_allowed
            message: >-
              203.0.113.10 not allowed: this workspace only accepts API calls
              from the IPs on its allow list. The workspace Owner can add this
              IP under Administration > Security > IP Restriction in the panel
              (changes take up to 10 minutes to apply), or call from an allowed
              IP. See https://developer.omni.z-api.io/en/security/ip-restriction
    InstanceNotFound:
      description: Instancia (canal) no encontrada
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: instance not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key

````

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