---
title: "Update contact details"
method: POST
path: "/v1/projects/{project_id}/contacts/{id}"
tags: ["Contact"]
---

# Update contact details

`POST /v1/projects/{project_id}/contacts/{id}`

## Request

- Base URL: `https://api.telerivet.com`
- URL: `https://api.telerivet.com/v1/projects/{project_id}/contacts/{id}`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://telerivet.com/oauth/authorize`, token URL `https://api.telerivet.com/oauth/token`)

Updates writable fields on the given contact

## Path parameters

- `project_id` string, required
- `id` string, required

## Request body

- object
  - `name` string: Name of the contact
  - `phone_number` string: Phone number of the contact
  - `send_blocked` boolean: True if Telerivet is blocked from sending messages to this contact
  - `conversation_status` 'closed' | 'active' | 'handled': Current status of the conversation with this contact
  - `default_route_id` string: ID of the basic route (phone) or custom route that Telerivet will use by default to send messages to this contact (null if using project default route)
  - `vars` object: Custom variables stored for this contact. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

## Response `200`

Successful response

- Contact: A contact represents a person or other entity that can be communicated with via phone number or other messaging channel within a project. Each contact has a name, phone number, and custom variables that can be used to personalize messages. Contacts can belong to one or more groups, and can be used as recipients for broadcasts, campaigns, and other messaging operations. Contacts can be imported or created individually via the API or web app. If the project's auto_create_contacts setting is enabled, a contact will be automatically created for each unique phone number that a message is sent to or received from.
  - `id` string: ID of the contact
  - `name` string: Name of the contact
  - `phone_number` string: Phone number of the contact
  - `time_created` integer: Time the contact was added in Telerivet
  - `time_updated` integer: Time the contact was last updated in Telerivet
  - `send_blocked` boolean: True if Telerivet is blocked from sending messages to this contact
  - `conversation_status` 'closed' | 'active' | 'handled': Current status of the conversation with this contact
  - `last_message_time` integer, nullable: Last time the contact sent or received a message (null if no messages have been sent or received)
  - `last_incoming_message_time` integer, nullable: Last time a message was received from this contact
  - `last_outgoing_message_time` integer, nullable: Last time a message was sent to this contact
  - `message_count` integer: Total number of non-deleted messages sent to or received from this contact
  - `incoming_message_count` integer: Number of messages received from this contact
  - `outgoing_message_count` integer: Number of messages sent to this contact
  - `last_message_id` string: ID of the last message sent to or received from this contact (null if no messages have been sent or received)
  - `default_route_id` string: ID of the basic route (phone) or custom route that Telerivet will use by default to send messages to this contact (null if using project default route)
  - `group_ids` string[]: List of IDs of groups that this contact belongs to
  - `vars` object: Custom variables stored for this contact. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.
  - `project_id` string: ID of the project this contact belongs to
  - `url` string: URL to this contact in the Telerivet web app

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key or Bearer token
- `404`: Resource not found

---

[API](https://skmtc.dev/telerivet/apis/telerivet-api.md) · [All operations](https://skmtc.dev/telerivet/apis/telerivet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telerivet/apis/telerivet-api/revisions/4e14b1c8d917?raw)
