> ## 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.

# Enviar contacto

> Envía contactos por WhatsApp

export const ChannelSupport = ({whatsapp = 'yes', web = 'yes', instagram = 'yes', messenger = 'yes', telegram = 'yes', lang = 'pt'}) => {
  const L = ({
    pt: {
      title: 'Disponibilidade por canal',
      win: 'No WhatsApp Oficial exige a janela de 24 horas aberta. Nos outros canais não há janela.',
      names: ['WhatsApp Oficial', 'WhatsApp Web', 'Instagram', 'Messenger', 'Telegram']
    },
    en: {
      title: 'Availability per channel',
      win: 'On WhatsApp Official it requires the 24-hour window to be open. The other channels have no window.',
      names: ['WhatsApp Official', 'WhatsApp Web', 'Instagram', 'Messenger', 'Telegram']
    },
    es: {
      title: 'Disponibilidad por canal',
      win: 'En WhatsApp Oficial exige que la ventana de 24 horas esté abierta. Los demás canales no tienen ventana.',
      names: ['WhatsApp Oficial', 'WhatsApp Web', 'Instagram', 'Messenger', 'Telegram']
    }
  })[lang];
  const mark = v => v === 'yes' ? '✅' : v === 'partial' ? '⚠️' : '❌';
  const vals = [whatsapp, web, instagram, messenger, telegram];
  return <div>
      <p><strong>{L.title}</strong></p>
      <table>
        <thead>
          <tr>{L.names.map(n => <th key={n} style={{
    textAlign: 'center'
  }}>{n}</th>)}</tr>
        </thead>
        <tbody>
          <tr>{vals.map((v, i) => <td key={i} style={{
    textAlign: 'center'
  }}>{mark(v)}</td>)}</tr>
        </tbody>
      </table>
      {whatsapp === 'yes' && <p>{L.win}</p>}
    </div>;
};

## Conceptos

Envía un contacto a un destinatario. El campo `content.type` debe ser `CONTACT`. Puedes enviar varios teléfonos en el array `phones`.

<ChannelSupport lang="es" instagram="no" messenger="no" />

<Note>
  Detalles de la regla de WhatsApp Oficial en [ventana de conversación](/es/conversation-window). Consulta la [matriz de capacidades](/es/channels/overview) para todos los canales.
</Note>


## OpenAPI

````yaml es/messages/openapi-contact.json POST /v1/channels/{channelId}/messages
openapi: 3.1.0
info:
  title: Omni Z-API - Enviar contacto
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io
security:
  - bearerAuth: []
paths:
  /v1/channels/{channelId}/messages:
    post:
      tags:
        - Mensajes
      summary: Enviar contacto
      description: Envía un contacto.
      operationId: sendContactMessage
      parameters:
        - name: channelId
          in: path
          required: true
          description: ID del canal
          schema:
            type: string
            example: SU_CHANNEL_ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendContactRequest'
            example:
              recipient:
                identifier: '5511999999999'
              content:
                type: CONTACT
                attachments:
                  - name: Gutemberg Fernandes
                    phones:
                      - '5511888888888'
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SendContactRequest:
      type: object
      required:
        - recipient
        - content
      properties:
        recipient:
          type: object
          required:
            - identifier
          properties:
            identifier:
              type: string
              description: Teléfono del destinatario (código de país + prefijo + número)
              example: '5511999999999'
        content:
          type: object
          required:
            - type
            - attachments
          properties:
            type:
              type: string
              description: Tipo de mensaje
              enum:
                - CONTACT
            attachments:
              type: array
              description: Lista de contactos que se van a enviar
              items:
                type: object
                required:
                  - name
                  - phones
                properties:
                  name:
                    type: string
                    description: Nombre del contacto
                  phones:
                    type: array
                    description: Lista de teléfonos del contacto
                    items:
                      type: string
    MessageResponse:
      type: object
      properties:
        messageId:
          type: string
          description: ID del mensaje enviado
    Error:
      type: object
      properties:
        error:
          type: integer
        message:
          type: string
  responses:
    MessageSuccess:
      description: Mensaje enviado correctamente
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            messageId: wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0
    Unauthorized:
      description: Token no válido o ausente.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 401
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generada en el panel de Seguridad de Omni Z-API

````