Skip to main content
PATCH

Update a contact

Method: PATCH | Endpoint: /v1/contacts/{contact_id} Description: Overwrite the fields you send. Fields you leave out are not touched, and a field sent as null is cleared. Unlike Create or update a contact, this replaces values a rep set. Authentication: API key in the Authorization header: Authorization: Bearer ib_pk_<64 hex>. Create keys in the dashboard under Settings → API access.

Request Body

The path parameter contact_id is the contact’s ID (a UUID). Send at least one field; an empty body changes nothing and returns the contact. Fields not listed above are rejected with 422 validation_error, and the message names the field. phone can’t be changed, and tags have their own endpoints: Add a tag and Remove a tag.

Responses

200 OK
first_name and email were replaced, city was cleared, and every other field kept its value. 401 Unauthorized
Other message values: Authorization Bearer token required, API key required (use Authorization: Bearer ib_pk_…), Invalid API key format, Customer account not found. 403 Forbidden
Your iBubbl account is suspended or cancelled (message is then Account is cancelled). Every API-key endpoint returns this. 404 Not Found
Also returned for a malformed ID, a deleted contact, and a contact that belongs to another account. 422 Unprocessable Entity
Other error values: validation_error for any other unknown field (including tags) or a value too long; invalid_email ('sam' is not an email address); invalid_timezone.

Authorizations

Authorization
string
header
required

Bearer API key. Format: Authorization: Bearer ib_pk_<64 hex> (70 characters). Generate keys from Dashboard → Settings → API Access.

Path Parameters

contact_id
string
required

Body

application/json

Only the fields you send change. Send a field as null to clear it. phone can't be changed, and tags have their own endpoints. Fields not listed here are rejected with 422 validation_error.

first_name
string | null
Maximum string length: 128
Example:

"Sam"

last_name
string | null
Maximum string length: 128
Example:

"Rivera"

email
string | null

Must look like an email address, or 422 invalid_email.

Maximum string length: 254
Example:

"sam@example.com"

city
string | null

Trimmed; blank clears it.

Maximum string length: 128
Example:

"Brooklyn"

state
string | null

Trimmed, a 2-letter code upper-cased; blank clears it.

Maximum string length: 128
Example:

"NY"

timezone
string | null

One of the supported IANA zones, or 422 invalid_timezone. null returns the contact to automatic: iBubbl infers the zone from a US or Canadian area code again.

Example:

"America/New_York"

Response

The updated contact.

id
string
required

Unique contact identifier (UUID).

phone
string
required

Contact's phone number as first seen. Usually E.164; a contact first created by an inbound SMS can carry the sender's bare national form (e.g. 4155551234). Upserting any form of the same number returns this contact.

opted_out
boolean
required

True if this person has opted out: a STOP reply, a rep in the dashboard, a Do Not Disturb in your connected GoHighLevel account, or POST /v1/contacts/{id}/opt-out. When true, every send to this contact returns 422 contact_opted_out. An opt-out can't be undone, and it belongs to the number: a contact deleted and created again is still opted out.

created_at
string
required

ISO 8601 UTC timestamp the contact was created.

first_name
string | null
last_name
string | null
email
string | null
city
string | null
state
string | null
timezone
string | null

IANA timezone used for this contact's sending hours, or null if not set yet. When it is null and the number is a US or Canadian one, iBubbl infers the zone from the area code and saves it here when the contact's first message is processed; otherwise your account's timezone is used. Once set, an upsert never replaces it, so pass timezone on the first upsert, before you send, or change it with PATCH.

tags
string[]

The contact's tag names, sorted case-insensitively.

opted_out_at
string | null

ISO 8601 UTC timestamp of the opt-out, or null.

blocked
boolean
default:false

True if you blocked this contact (dashboard or POST /v1/contacts/{id}/block). Sends to them return 422 contact_blocked until you unblock them. Unlike an opt-out, a block is yours to undo, and it fires no webhook.

blocked_at
string | null

ISO 8601 UTC timestamp of the block, or null.