Call this endpoint after your application confirms a contact’s email address — for example, after a user clicks a verification link or completes an OTP challenge. Datamailer records the verification timestamp on both the global contact record and the client-scoped subscription, and the change immediately affectsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DataTalksClub/datamailer/llms.txt
Use this file to discover all available pages before exploring further.
can_send_marketing eligibility.
Endpoint
Authentication
Requires a Bearer token for the client whose slug is passed in the request body.Path parameters
The internal Datamailer contact ID. Obtained from a prior upsert or status call.
Request body
Pass
true to mark the contact as verified. Pass false to clear verification, setting verified_at to null on both the contact and the client subscription.ISO-8601 timestamp representing when verification occurred. Accepts timezone-aware strings (e.g.
2024-09-01T10:00:00Z) and naive strings, which are localized to the server’s configured timezone. Defaults to the current server time when verified is true and this field is omitted. Ignored when verified is false.Slug of the audience that scopes the subscription to update.
Slug of the authenticated client. Must match the bearer token’s client.
Behavior
Locate the contact
The contact is looked up by
contact_id. A 404 is returned if no contact exists with that ID, or if the contact has no client subscription in the specified audience — preventing one client from mutating contacts it has not onboarded.Update contact-level verified_at
When
verified is true, the contact’s global verified_at is set to the provided or computed timestamp only if it is not already set. The earliest verification timestamp is always preserved.Update subscription-level verified_at
The client-scoped subscription’s
verified_at is updated to the same timestamp, again preserving any earlier timestamp already on the subscription.Example
Request
Response
Effect on
can_send_marketing: Datamailer evaluates marketing eligibility by checking whether verification has been recorded at the contact level, the audience subscription level, or the client subscription level — any one is sufficient. After a successful verification PATCH, can_send_marketing will be true for this contact in this audience provided the contact is also subscribed and not suppressed.Error codes
| Field | Error code | Meaning |
|---|---|---|
contact_id | not_found | No contact with that ID exists, or the contact has no client subscription in this audience. Returns HTTP 404. |
verified | required | verified was omitted from the request body. |
verified | must_be_boolean | verified is not a JSON boolean. |
verified_at | must_be_iso_datetime | verified_at was provided but could not be parsed as an ISO-8601 datetime string. |
audience | required | audience was missing or blank. |
audience | not_found | No audience with that slug exists in the client’s organization. |
client | required | client was missing or blank. |
client | forbidden | client does not match the authenticated client’s slug. Returns HTTP 403. |