Skip to documentation

API · Contacts

Update Contact

Update a contact by ID or URL-encoded email address (requires full access). The email address cannot be changed; any supplied email field is ignored.

PATCH/contacts/{id}Full access

Request parameters

ParameterTypeDescription
id
path · required
stringContact id or URL-encoded email (case-insensitive).
first_name
body · optional
string | nullFirst name, up to 1000 characters; null clears the name.
last_name
body · optional
string | nullLast name, up to 1000 characters; null clears the name.
unsubscribed
body · optional
boolean | nullWhether the contact is unsubscribed from all broadcasts; null leaves the setting unchanged.
properties
body · optional
objectExisting property keys with matching string or number values up to 1000 characters; empty strings or individual null values reset to the fallback, while properties: null is rejected.

Request example

Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.

bash
curl -X PATCH "$OPENSEND_BASE_URL/contacts/YOUR_id" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"first_name":"Ada"}'

Response

200 · application/json. Example IDs stand for IDs returned by your installation.

json
{
  "object": "contact",
  "id": "YOUR_ID"
}

Behavior and errors

id accepts a contact ID or a URL-encoded email address; email lookup is case-insensitive. The email address cannot be changed. first_name: null or last_name: null clears the name; a null or empty property value resets it to its fallback. An update that changes nothing emits no contact.updated event.

Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.