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

# Share line's contact info

> POST /api/v1/chats/:id/share-contact-info — share the line's saved 'Me' card.

<Note>
  **Auth.** HMAC v1 or bearer token — see [Authentication](/api/authentication).
  **Status.** Live · **Idempotent:** No (sends a fresh handshake each call).
</Note>

Shares the line's saved contact card — the operator's "Me" card on the device tied to the pinned line. This lets the recipient save your line as a contact and can surface the line's display name in Messages.

For sharing another person's contact details, use [`send-contact`](/api/contact-sharing/send-card); it is the more predictable vCard flow.

## Addressing the recipient

| Form                                                                  | Use when                                                               |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `POST /api/v1/chats/{id}/share-contact-info`                          | A chat already exists for this recipient.                              |
| `POST /api/v1/chats/share-contact-info` with `{ "to": "+1..." }` body | First-touch — no chat yet. Chert resolves or creates the chat in-line. |

## Request

`POST /api/v1/chats/{id}/share-contact-info`

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://console.trychert.com/api/v1/chats/ch_01H.../share-contact-info \
    -H "x-chert-tenant: $TENANT" \
    -H "x-chert-signature: v1,$TS,$SIG"
  ```

  ```js Node.js theme={null}
  const ts = Math.floor(Date.now() / 1000)
  const body = ""
  const sig = crypto.createHmac("sha256", SIGNING_SECRET).update(`${ts}.${body}`).digest("hex")
  const res = await fetch(
    `https://console.trychert.com/api/v1/chats/${chatId}/share-contact-info`,
    {
      method: "POST",
      headers: {
        "x-chert-tenant": TENANT_SLUG,
        "x-chert-signature": `v1,${ts},${sig}`,
      },
    },
  )
  ```

  ```python Python theme={null}
  import hmac, hashlib, time, requests
  ts = int(time.time())
  body = ""
  sig = hmac.new(SIGNING_SECRET.encode(), f"{ts}.{body}".encode(), hashlib.sha256).hexdigest()
  r = requests.post(
      f"https://console.trychert.com/api/v1/chats/{chat_id}/share-contact-info",
      headers={
          "x-chert-tenant": TENANT_SLUG,
          "x-chert-signature": f"v1,{ts},{sig}",
      },
  )
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "chat_id": "ch_01H...",
    "status": "shared"
  }
  ```
</ResponseExample>

### Path parameters

<ParamField path="id" type="string">
  Chat identifier (`ch_…`). The chat must have a pinned line. Omit and use `body.to` for first-touch recipients.
</ParamField>

### Body

<ParamField body="to" type="string">
  Recipient phone in E.164 format. Use instead of the `{id}` path segment when no chat exists yet. Ignored when `{id}` is supplied.
</ParamField>

### Response fields

<ResponseField name="chat_id" type="string">
  The chat the line's "Me" card was shared into.
</ResponseField>

<ResponseField name="status" type="string">
  Always `"shared"` on success.
</ResponseField>

## Errors

| Code   | HTTP | When                                                          |
| ------ | ---- | ------------------------------------------------------------- |
| `1002` | 400  | Chat has no recipient phone.                                  |
| `2002` | 404  | Chat not found.                                               |
| `4001` | 502  | Delivery failed.                                              |
| `4099` | 501  | No pinned line, or the line does not support contact sharing. |

See the full [error code reference](/api/errors).

## See also

* [Send a contact card](/api/contact-sharing/send-card)
* [Errors](/api/errors)
