---
title: "Save or update existing contact."
method: POST
path: "/contacts"
tags: ["Contacts"]
---

# Save or update existing contact.

`POST /contacts`

## Request

- Base URL: `https://api.charla.com/v1`
- URL: `https://api.charla.com/v1/contacts`
- Auth: API key in header `X-Api-Key`

## Request body

- VisitorPublicApiResource
  - `id` string, uuid, nullable: Unique id of the contact
  - `name` string, nullable: Name of the visitor if available
  - `phone` string, nullable: Phone of the visitor if available
  - `email` string, nullable: Email of the visitor if available
  - `country_code` string, nullable: Country code in ISO 3166-1
  - `location` string, nullable: Location per IP address
  - `ip` string, nullable: IP address of the visitor
  - `platform` string, nullable: Device used by the visitor
  - `browser_language` string, nullable: Browser language used by the visitor
  - `tags` string, nullable: Tags to Attach to the visitor. Accepts one or multiple comma seperated tags. Note that the tag needs to be already added on the organization.
  - `custom_attributes` VisitorCustomAttributePublicApiResource[], nullable: Custom Attributes attached to the customer
    - `name` string, nullable: Attribute Name
    - `value` string, nullable: Value of the custom attribute
    - `external_id` string, nullable: External id of the custom attribute
  - `messages` MessagePublicApiResource[], nullable
    - `message` string, nullable: Visitor or Agent original message
    - `message_translated` string, nullable: Translated message if Live Translation was enabled
    - `from` string, nullable: Either Visitor or Agent. Agent can be a live agent or a bot
    - `is_private` boolean, nullable: Whether the message was marked as private
    - `attachment` string, uuid, nullable: Attachment Id if an attachment was attached to the message
    - `article` integer, nullable: Article Id if a knowledge base article was attached to the message
    - `created_at` string, date-time, nullable
  - `last_seen_at` string, date-time, nullable: Date where the visitor was last seen, either with or without an interaction
  - `last_message_at` string, date-time, nullable
  - `created_at` string, date-time, nullable: Date where the visitor was initially created

## Response `200`

OK

- VisitorPublicApiResource
  - `id` string, uuid, nullable: Unique id of the contact
  - `name` string, nullable: Name of the visitor if available
  - `phone` string, nullable: Phone of the visitor if available
  - `email` string, nullable: Email of the visitor if available
  - `country_code` string, nullable: Country code in ISO 3166-1
  - `location` string, nullable: Location per IP address
  - `ip` string, nullable: IP address of the visitor
  - `platform` string, nullable: Device used by the visitor
  - `browser_language` string, nullable: Browser language used by the visitor
  - `tags` string, nullable: Tags to Attach to the visitor. Accepts one or multiple comma seperated tags. Note that the tag needs to be already added on the organization.
  - `custom_attributes` VisitorCustomAttributePublicApiResource[], nullable: Custom Attributes attached to the customer
    - `name` string, nullable: Attribute Name
    - `value` string, nullable: Value of the custom attribute
    - `external_id` string, nullable: External id of the custom attribute
  - `messages` MessagePublicApiResource[], nullable
    - `message` string, nullable: Visitor or Agent original message
    - `message_translated` string, nullable: Translated message if Live Translation was enabled
    - `from` string, nullable: Either Visitor or Agent. Agent can be a live agent or a bot
    - `is_private` boolean, nullable: Whether the message was marked as private
    - `attachment` string, uuid, nullable: Attachment Id if an attachment was attached to the message
    - `article` integer, nullable: Article Id if a knowledge base article was attached to the message
    - `created_at` string, date-time, nullable
  - `last_seen_at` string, date-time, nullable: Date where the visitor was last seen, either with or without an interaction
  - `last_message_at` string, date-time, nullable
  - `created_at` string, date-time, nullable: Date where the visitor was initially created

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/charla/apis/charla-public-api.md) · [All operations](https://skmtc.dev/charla/apis/charla-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/charla/apis/charla-public-api/revisions/671d88242ad4?raw)
