---
title: "Add or remove a group, contact tag, or custom field to a contact with the given phone number"
method: PATCH
path: "/dashboards/{dashboard_id}/contacts/{phone_number}"
tags: ["Contacts"]
---

# Add or remove a group, contact tag, or custom field to a contact with the given phone number

`PATCH /dashboards/{dashboard_id}/contacts/{phone_number}`

Adds or removes a group, contact tag, or custom field to a contact (depending on the secondary boolean value in the request body).

## Path parameters

- `dashboard_id` integer, required
- `phone_number` string, required

## Request body

- PatchContactRequest
  - `groups` integer[] — An array of group identifiers that reference group membership to add or remove from the contact.
  - `add_group_to_contact` boolean — Whether to add or remove the contact tag from the contact. True means add. False means remove. This will only do something if a value for group is provided.
  - `contact_tags` string[] — An array of the contact's tags to add or remove from the contact.
  - `add_tag_to_contact` boolean — Whether to add or remove the contact tag from the contact. True means add. False means remove. This will only do something if a value for contact_tag is provided.
  - `custom_field_id` string — A custom field identifier for a custom field to edit/add to this contact. This argument is optional and can be omitted or set to null, which will cause no change to the contact's custom fields.
  - `custom_field_value` boolean — The new value for the custom field. This will only do something if a value for custom_field_id is provided.

## Response `200`

The new/updated contact.

- Contact
  - `phone_number` string — The contact's phone number.
  - `first_name` string — The contact's first name.
  - `last_name` string — The contact's last name.
  - `display_name` string — The contact's display name.
  - `thread_id` string — The id of the thread for this contact's conversation on this dashboard. To access the thread of this contact in the webapp, go to https://app.textrequest.com/app/thread/<thread_id>
  - `is_suppressed` boolean — Whether the contact is suppressed.
  - `is_archived` boolean — Whether the contact is archived.
  - `is_blocked` boolean — Whether the contact is blocked.
  - `suppressed_reason` string — For notekeeping, a reason why the contact was suppressed.
  - `note` string — Any text notes for the contact.
  - `groups` integer[] — An array of group identifiers that reference group membership.
  - `contact_tags` string[] — An array of the contact's tags.
  - `custom_fields` CustomFieldEntry[] — An array of the contact's custom field values.
    - `id` string — The custom field's guid you can use to edit the value.
    - `value` string — Current value of the custom field.
  - `is_resolved` boolean — Whether or not their conversation thread is currently resolved.
  - `first_contact_utc` string — When the contact was first messaged. All dates are UTC.
  - `opted_out_utc` string — When the contact opted out. Null if the contact has not and can receive messages.
  - `last_msg_sent_utc` string, date-time — When the contact was last sent a message.
  - `last_msg_received_utc` string, date-time — When this dashboard last received a message from a contact.
  - `total_msgs_sent` integer — Total messages sent to a contact.
  - `total_msgs_received` integer — Total messages received from a contact.
  - `response_count` integer — Total number of response messages from the contact.
  - `date_created_utc` string, date-time — When the contact was created.
  - `last_contact_date_utc` string, date-time — When the contact was last contacted.
  - `last_message` object — Last message sent to or from this contact.

## Other responses

- `400` — Bad request. There are no required parameters.
- `401` — Unauthorized. Sent if the API key is omitted or invalid.

---

[API](https://skmtc.net/textrequest/apis/text-request-api-v3.md) · [All operations](https://skmtc.net/textrequest/apis/text-request-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/textrequest/text-request-api-v3/revisions/e4e42efcd650/schema)
