---
title: "Set an agent contact card"
method: PUT
path: "/contact-cards"
tags: ["Messages"]
---

# Set an agent contact card

`PUT /contact-cards`

## Request

- Base URL: `https://osis.co/api/v1/comms`
- URL: `https://osis.co/api/v1/comms/contact-cards`
- Auth: HTTP bearer

Set the name and photo people see for an agent on a dedicated line, on its card and in iMessage. The phone number is always the agent's dedicated line. Agents on a shared line return 409 dedicated_line_required. Scope: comms_send.

## Request body

- SetContactCardRequest
  - `agent_id` string, required: The agent whose card you're setting. It must be on a dedicated line.
  - `name` string: The name on the card and in the iMessage contact prompt. Leave it out to keep the current name.
  - `email` string, nullable: An email for the card. Leave it out to keep the current one. Send null or an empty string to remove it.
  - `note` string, nullable: A note for the card. Leave it out to keep the current one. Send null or an empty string to remove it.
  - `photo_url` string, uri: An HTTPS link to a JPEG, PNG, or GIF, up to 200,000 bytes.
  - `photo_base64` string: A JPEG, PNG, or GIF as base64 or a data:image/...;base64, URL. Up to 200,000 bytes.
  - `clear_photo` boolean: Remove the saved photo. Wins over photo_url and photo_base64.

## Response `200`

The saved card, and whether the line is using it yet

- ContactCardResponse
  - `contact_card` ContactCard
    - `agent_id` string
    - `name` string
    - `phone` string
    - `email` string, nullable
    - `note` string, nullable
    - `has_photo` boolean
    - `dedicated` boolean
    - `line_synced` boolean, nullable: true if the line has this card's name, has a photo if the card does, and shares its profile automatically. Only checks that a photo is there, not which photo. false if it didn't update yet. Always null when you read a card.
    - `whatsapp_synced` boolean: Only when the line has WhatsApp: whether the WhatsApp profile took the name and photo.

## Other responses

- `400`: Bad request
- `401`: API key is missing or wrong
- `403`: Your key doesn't have the scope this needs
- `404`: Not found
- `409`: The conversation isn't available, or the request conflicts with an earlier one

---

[API](https://skmtc.dev/osis/apis/comms-api.md) · [All operations](https://skmtc.dev/osis/apis/comms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/osis/apis/comms-api/revisions/59a4c0ba8936?raw)
