Update and delete contacts
#Update a contact
Changes only the fields you send. Use PUT: PATCH isn’t supported. Unknown fields are ignored with a 200; ignored_fields lists them, so check the spelling against the fields below. Needs the edit_contacts permission.
Parameters
idinteger · pathRequired- The contact id.
More parameters
first_name, last_name, emailstringtagsstring[]- An array that replaces the whole list.
Clearing and merging
A plain string,nullor""is400 invalid_field; send[]to clear. Sendtags_base(the list you started from) too, and only your changes are applied. pipeline_stagestring- Free text. Use a stage id from List stages.
statusstring- Any text is stored: there is no list of allowed values, so check your spelling. Setting
opted_out,blocked,wrong_numberordeceasedturns texting off (it setsdnd_smsto1). Check before you send one.Undoing a status
Onlyblockedcan be undone over the API: send{"status": "active", "dnd_sms": 0}. That works only if the contact wasn’t already opted out when it was blocked and hasn’t opted out since; otherwise it’s refused with403 opted_out. The other three can’t be undone over the API. Changing theirstatuslater leaves texting off, and settingdnd_smsback to0is refused (403 opted_out). You can’t move a contact offopted_out. dnd_smsinteger1opts the contact out of texts.Opting back in
You can’t set it back to0on an opted-out contact (403). A STOP-locked contact (opt_out_locked) can opt back in by texting START, unless the lock is a do-not-call or GoHighLevel DND match; a START doesn’t lift other opt-outs.custom_fieldsobject- Merged key by key.
nullfor a key deletes it. phonestring- Can’t be changed: create a new contact instead. The same number in another format is fine.
dnd_email, dnd_callsintegernotesstring- Free text kept on the contact. The Notes tab doesn’t show it; to add a note your team will see, use Create a note.
scoreinteger- 0 to 100. A decimal is rounded, and a number outside the range is clamped to it. A reply from the contact recalculates the score, so a value set here lasts until their next reply. A value that isn’t a number returns
400 invalid_fieldwithfield: "score". source, company_name, timezonestringaddress1, address2, city, state, postal_code, countrystringassigned_tointegerinbound_blockedintegerwebsite, date_of_birth, genderstringauto_reply_suppressedinteger- Send
0to resume texting a contact Ready paused for sending repeated auto-replies. It can only clear the pause:1is ignored.
Returns the updated Contact object in data. ignored_fields lists any field you sent that we did not recognise and did not save; it is left out when there are none.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_CONTACT_ID | Not a contact id (for example a phone number). |
| 400 | PHONE_NOT_EDITABLE | You sent a different phone number. |
| 400 | invalid_field | Wrong type, such as non-list tags or a score that isn’t a number. |
| 400 | ASSIGNEE_NOT_ON_ACCOUNT | assigned_to isn’t on your account. |
| 400 | CONTACT_UPDATE_FAILED | A value can’t be saved (500 if the save failed). |
| 403 | opt_out_locked | Re-enabling texting on a STOP-locked contact. code is CONTACT_OPT_OUT_LOCKED; error_code is opt_out_locked. |
| 403 | opted_out | Same, for other opt-outs such as Do Not Disturb. code is CONTACT_OPTED_OUT; error_code is opted_out. |
| 403 | CONTACT_NOT_ASSIGNED | Your key belongs to a team member who sees only their assigned contacts, and this contact is assigned to someone else. |
| 404 | CONTACT_NOT_FOUND | No contact with this id. |
| 409 | CONTACT_CHANGED | The contact opted out mid-save. |
| 500 | CUSTOM_FIELD_NOT_SAVED | A custom field didn’t save. Retry. |
#Delete a contact
Permanently removes the contact, its conversation history, notes, tasks and call recordings. If you add the number again, the new contact comes in opted out, because Ready keeps the opt-out on the number: see Keeping your own copy. Needs the edit_contacts permission.
Calls and recordings
The contact’s outbound dialer calls are removed too. Inbound calls, recording disclosure records and GoHighLevel dial pad calls stay, unlinked from the contact, as billing and consent records. Recordings and transcripts of every call with the contact, inbound, outbound, GoHighLevel dial pad and FaceTime, are deleted too and can’t be recovered. Export any you need first.
Parameters
idinteger · pathRequired- The contact id, not its phone number.
Returns { "success": true }.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_CONTACT_ID | Not a contact id (for example a phone number). |
| 403 | CONTACT_NOT_ASSIGNED | Your key belongs to a team member who sees only their assigned contacts, and this contact is assigned to someone else. |
| 404 | CONTACT_NOT_FOUND | No such contact, or already deleted. |
| 423 | LITIGATION_HOLD | Under a legal hold. |
See also: the guide to doing this in the app.