Merge Contact Data
Contacts
Merge Contact Data
Shallow-merge fields into the stored data for a contact phone number
PATCH
Merge Contact Data
Use this endpoint when an external system needs to update only part of the
state stored against a caller’s phone number. PATCH merges top-level fields
into the existing object without replacing unrelated fields.
Set a field to
For example, if the stored object is
The serialized
null to delete that field. If no data exists yet, the patch
starts with an empty object. A PATCH without ttlSeconds preserves the
existing expiration; provide a new value to replace it.
The data is scoped to your organization and the phone number. A previously
unknown number gets a contact automatically. US numbers can be formatted or
sent as digits. Non-US numbers must include the + country code. URL-encode
the + when it appears in the path.
{"five9ConversationId":"conv-48291","routingStatus":"queued"}, the request
above leaves {"routingStatus":"completed"}.
The response contains the normalized phone number, the merged object, its
revision, and expiration metadata:
data object may be at most 64 KiB. When supplied,
ttlSeconds must be an integer from 60 seconds through 90 days. Without an
explicit TTL, a record has no expiry by default or keeps its current expiry
when patching an existing record.
The endpoint returns 401 when authentication fails and 422 when the phone
number or request body is invalid.Authorizations
Path Parameters
The caller's phone number. US numbers may be formatted or sent as digits; non-US numbers must include the + country code.
Body
application/json
Response
Contact data merged.
The normalized phone number in E.164 format.
The stored JSON object.
The revision number of this value.
Required range:
x >= 1Remaining TTL in seconds, or null when the record has no expiry.
Expiration timestamp in UTC, or null when the record has no expiry.