API ReferenceContacts
Update contact
Update an existing contact's email, subscription state, or data fields.
Authorization
ApiKeyAuth AuthorizationBearer <token>
API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.
In: header
Path Parameters
id*string
Request Body
application/json
email?string
Change the contact's email address. Returns 409 if another contact in the project already uses this email.
Format
emailsubscribed?boolean
Update subscription state. Flipping this fires contact.subscribed or contact.unsubscribed.
data?
Patch contact data. null deletes a key, empty strings are ignored, primitives are stored. Reserved keys are silently filtered out.
Response Body
application/json
curl -X PATCH "https://next-api.useplunk.com/contacts/string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"email": "user@example.com",
"subscribed": true,
"data": {},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}Empty