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

# Send Contact

> Send one or multiple contacts as vCard

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** no

## Description

Sends one or more contacts as vCard. The recipient gets a clickable card that can add the contact directly to their address book. The `vcard` field accepts an **array** of `VCard` objects (multi-send) **or** a single object (backward compatibility, the server accepts both formats). Supports `replyTo`, `replyPrivate`, `delay` (in seconds) and `source`. Does **not** support mentions.

## Examples

### Single contact

Sends a vCard with the bare minimum (`fullName` and `phone`). The recipient gets a single clickable card with the contact "João Silva" ready to be added to their address book.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/contact/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number": "5511999999999",
      "vcard": [
        {
          "fullName": "João Silva",
          "phone":    "5511888888888"
        }
      ]
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/contact/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number: "5511999999999",
      vcard: [
        {
          fullName: "João Silva",
          phone:    "5511888888888"
        }
      ]
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/contact/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number": "5511999999999",
          "vcard": [
              {
                  "fullName": "João Silva",
                  "phone":    "5511888888888"
              }
          ]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number": "5511999999999",
          "vcard": [
              {
                  "fullName": "João Silva",
                  "phone":    "5511888888888"
              }
          ]
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/contact/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Multiple contacts

Passes three contacts in the `vcard` array. The server sends everything as a single `ContactsArrayMessage`; the recipient sees a grouped card and chooses which names to add to their address book.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/contact/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number": "5511999999999",
      "vcard": [
        {
          "fullName": "João Silva",
          "phone":    "5511888888888"
        },
        {
          "fullName": "Maria Souza",
          "phone":    "5511777777777"
        },
        {
          "fullName": "Carlos Lima",
          "phone":    "5511666666666"
        }
      ]
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/contact/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number: "5511999999999",
      vcard: [
        { fullName: "João Silva",   phone: "5511888888888" },
        { fullName: "Maria Souza",  phone: "5511777777777" },
        { fullName: "Carlos Lima",  phone: "5511666666666" }
      ]
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/contact/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number": "5511999999999",
          "vcard": [
              {"fullName": "João Silva",  "phone": "5511888888888"},
              {"fullName": "Maria Souza", "phone": "5511777777777"},
              {"fullName": "Carlos Lima", "phone": "5511666666666"}
          ]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number": "5511999999999",
          "vcard": [
              { "fullName": "João Silva",  "phone": "5511888888888" },
              { "fullName": "Maria Souza", "phone": "5511777777777" },
              { "fullName": "Carlos Lima", "phone": "5511666666666" }
          ]
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/contact/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Contact with organization, email and website

Includes the optional fields `organization`, `email` and `url` in the vCard. The resulting card displays the company, the contact email and the website below the name, ideal for presenting full business contacts.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/contact/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number": "5511999999999",
      "vcard": [
        {
          "fullName":     "João Silva",
          "phone":        "5511888888888",
          "organization": "Example S.A.",
          "email":        "joao@example.com",
          "url":          "https://example.com"
        }
      ]
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/contact/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number: "5511999999999",
      vcard: [
        {
          fullName:     "João Silva",
          phone:        "5511888888888",
          organization: "Example S.A.",
          email:        "joao@example.com",
          url:          "https://example.com"
        }
      ]
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/contact/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number": "5511999999999",
          "vcard": [
              {
                  "fullName":     "João Silva",
                  "phone":        "5511888888888",
                  "organization": "Example S.A.",
                  "email":        "joao@example.com",
                  "url":          "https://example.com"
              }
          ]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number": "5511999999999",
          "vcard": [
              {
                  "fullName":     "João Silva",
                  "phone":        "5511888888888",
                  "organization": "Example S.A.",
                  "email":        "joao@example.com",
                  "url":          "https://example.com"
              }
          ]
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/contact/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

The `vcard` array in the response echoes exactly what you sent (with all contacts). When there is more than one contact, `message` becomes `"X contacts sent successfully in one message"`.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Contact sent successfully",
  "status":  "sent",
  "data": {
    "messageId":   "3EB08FCF27E532F1B0F5",
    "direction":   "sent",
    "messageType": "contact",
    "vcard": [
      {
        "fullName":     "João Silva",
        "phone":        "5511888888888",
        "organization": "Example S.A.",
        "email":        "joao@example.com",
        "url":          "https://example.com"
      }
    ],
    "source":    "api",
    "timestamp": "2026-04-30T14:30:00Z",
    "chat": {
      "jid":     "5511999999999@s.whatsapp.net",
      "isGroup": false
    },
    "sender": {
      "jid":      "5511777777777@s.whatsapp.net",
      "instance": "minha-instancia"
    }
  }
}
```

<Note>
  When `vcard` contains a single item, the server sends it as `ContactMessage`. For multiple items, it is sent as `ContactsArrayMessage` (a single message grouping multiple cards).
</Note>

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name (e.g., `$Instance_Name`).
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Request body

<ParamField body="number" type="string" required>
  Destination: phone (`5511999999999`) or JID (`@s.whatsapp.net`, `@lid`, `@g.us`, `@newsletter`).
</ParamField>

<ParamField body="vcard" type="VCard[]" required>
  Array of contacts to send. Each item follows the structure below. The handler also accepts a **single** `VCard` object (without an array) for backward compatibility, internally converting it to a single-item array. At least one contact is required.
</ParamField>

<ParamField body="vcard[].fullName" type="string" required>
  Full name of the contact. Appears as the main label of the card.
</ParamField>

<ParamField body="vcard[].phone" type="string" required>
  Phone number of the contact (with country code, e.g., `5511888888888`).
</ParamField>

<ParamField body="vcard[].organization" type="string">
  Contact organization/company (optional).
</ParamField>

<ParamField body="vcard[].email" type="string">
  Contact email (optional).
</ParamField>

<ParamField body="vcard[].url" type="string">
  Contact URL/website (optional).
</ParamField>

<ParamField body="delay" type="int" default="0">
  Time in **seconds** to wait before sending. During the interval, the server sends the "typing..." indicator to the recipient and fires "paused" before the actual send.
</ParamField>

<ParamField body="replyTo" type="string">
  ID of the message to be quoted (reply). The original message must belong to the same instance and have been saved in the database.
</ParamField>

<ParamField body="replyPrivate" type="boolean" default="false">
  When `true` **and** `replyTo` points to a message originating from a group, the reply is redirected to the original author's **private** chat (keeping the quote). Ignored if the original message is not from a group. **Advisory:** this field is defined in the struct but the contacts handler does manual JSON parsing and is not extracting `replyPrivate` from the payload, so it is currently treated as `false`.
</ParamField>

<ParamField body="source" type="string" default="api">
  Origin identifier for traceability (e.g., `crm`, `bot-suporte`, `n8n`). Saved on the message record in the database and propagated to webhooks. When omitted, defaults to `"api"`.
</ParamField>

## Notes

<Note>
  * **`delay` is in seconds**, not milliseconds.
  * The `vcard` field accepts **both an array and a single object**. We recommend always using an array (`[ {...} ]`) to avoid ambiguity.
  * Each contact requires **`fullName`** and **`phone`**. `organization`, `email` and `url` are optional.
  * For multi-sends, WhatsApp groups the contacts into a single card in the chat, the recipient can choose which to add.
  * Contact messages **do not support** `mention` or `mentionAll`.
  * For BR numbers (starting with `55`), the service automatically tries variations with and without the 9th digit.
  * Each contact in the array goes through individual validation; if item `N` fails, the response is `400 Contact full name is required for contact N` or `400 Contact phone number is required for contact N`.
</Note>

## Errors

| HTTP | Internal status  | Message                                          |
| ---- | ---------------- | ------------------------------------------------ |
| 400  | ,                | `Instance name is required`                      |
| 400  | ,                | `Invalid JSON format: <detail>`                  |
| 400  | ,                | `Failed to read request body: <detail>`          |
| 400  | ,                | `Number is required`                             |
| 400  | ,                | `At least one contact (vcard) is required`       |
| 400  | ,                | `Contact full name is required for contact N`    |
| 400  | ,                | `Contact phone number is required for contact N` |
| 400  | `invalid_number` | `Invalid phone number format: <detail>`          |
| 500  | `send_failed`    | `Failed to send message: <reason>`               |
| 404  | ,                | `Instance not found`                             |
| 503  | `disconnected`   | `Instance is not connected to WhatsApp`          |

Error envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "At least one contact (vcard) is required" }
}
```
