Consent
The consent API stores what each contact has said about being reached by your organization, one record per contact per channel. Leads submitted on your dealerMe site with a consent checkbox are recorded here automatically, and you can read and write the same records from your own systems.
Consent endpoints are scoped to an organization. Send your API token and the organization's id with every request (see Authentication). The token's user must be a member of the organization, or the request returns 403.
Contact types
Every endpoint takes the channel as {contactType} in the path.
| Contact type | Description | Contact value |
|---|---|---|
email | Email messages. | An email address, up to 255 characters. Stored lowercased. |
phone_sms | Text messages. | A US, Canadian or Puerto Rican phone number. Stored in E.164 format. |
phone_call | Phone calls. | A US, Canadian or Puerto Rican phone number. Stored in E.164 format. |
Contact values are normalized before they're stored or looked up, so +1 (555) 123-4567 and 5551234567 are the same contact, as are Jane@Example.com and jane@example.com.
Properties
| Property | Type | Description |
|---|---|---|
contact_value | String | The email address or phone number, normalized. |
opt_in | Boolean | true if the contact agreed to be reached on this channel, false if they opted out. null when there is no record for the contact. |
consent_timestamp | DateTime | When the contact gave or withdrew consent (ISO 8601). null when there is no record for the contact. |
Get a Consent
GET Request: https://api.dealerme.com/v1/consent-management/{CONTACT_TYPE}/consent
Returns the current consent for one contact. A contact with no record is not a 404: the response has an opt_in and consent_timestamp of null.
| Parameter | Type | Description |
|---|---|---|
contact_value | String | Required. The email address or phone number to look up. |
DEALERME_TOKEN="your API token"
DEALERME_ORG_ID="your organization id"
curl -G https://api.dealerme.com/v1/consent-management/phone_sms/consent \
--data-urlencode "contact_value=+15555550123" \
-H "Authorization: Bearer $DEALERME_TOKEN" \
-H "X-DealerMe-Organization-Id: $DEALERME_ORG_ID" \
-H 'Accept: application/json'
{
"contact_value": "+15555550123",
"opt_in": true,
"consent_timestamp": "2026-10-14T16:22:05+00:00"
}
List Consents
GET Request: https://api.dealerme.com/v1/consent-management/{CONTACT_TYPE}/consents
Returns the consents on a channel whose consent_timestamp falls in a window, oldest first. Use it to keep your own copy in step with dealerMe.
| Parameter | Type | Description |
|---|---|---|
from | Date | Required. Start of the window. A date alone (2026-10-01) starts at the beginning of that day; a datetime is used as given. |
to | Date | Required. End of the window, on or after from and no more than 14 days after it. A date alone runs to the end of that day. |
page | Integer | Page number, starting at 1. |
per_page | Integer | Results per page. Defaults to 100, maximum 500. |
DEALERME_TOKEN="your API token"
DEALERME_ORG_ID="your organization id"
curl -G https://api.dealerme.com/v1/consent-management/email/consents \
-d from=2026-10-01 \
-d to=2026-10-14 \
-d per_page=100 \
-H "Authorization: Bearer $DEALERME_TOKEN" \
-H "X-DealerMe-Organization-Id: $DEALERME_ORG_ID" \
-H 'Accept: application/json'
{
"data": [
{
"contact_value": "jane@example.com",
"opt_in": true,
"consent_timestamp": "2026-10-03T14:08:51+00:00"
},
{
"contact_value": "sam@example.com",
"opt_in": false,
"consent_timestamp": "2026-10-09T19:41:12+00:00"
}
],
"meta": {
"current_page": 1,
"per_page": 100,
"total": 2,
"last_page": 1
}
}
Record Consents
POST Request: https://api.dealerme.com/v1/consent-management/{CONTACT_TYPE}/consents
Records what up to 500 contacts said about being reached on a channel. Every entry is kept in the contact's consent history. A contact's current consent only changes when the entry's consent_timestamp is at least as recent as the one on record, so an older opt-in that arrives late can't undo a newer opt-out. If the same contact appears twice in one request with the same timestamp, the last entry wins.
| Parameter | Type | Description |
|---|---|---|
contacts | Array | Required. Between 1 and 500 contacts. |
contacts.*.contact_value | String | Required. The email address or phone number. |
contacts.*.opt_in | Boolean | Required. true to record consent, false to record an opt-out. |
contacts.*.consent_timestamp | DateTime | Required. When the contact gave or withdrew consent. |
contacts.*.source | String | Where the consent came from, up to 64 characters, such as showroom or crm. Defaults to api. |
contacts.*.disclosure | String | The wording the contact agreed to, up to 10,000 characters. |
source and disclosure are dealerMe additions; they're stored with the contact's consent history.
DEALERME_TOKEN="your API token"
DEALERME_ORG_ID="your organization id"
curl -X POST https://api.dealerme.com/v1/consent-management/phone_sms/consents \
-H "Authorization: Bearer $DEALERME_TOKEN" \
-H "X-DealerMe-Organization-Id: $DEALERME_ORG_ID" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"contacts": [
{
"contact_value": "(555) 555-0123",
"opt_in": true,
"consent_timestamp": "2026-10-14T16:22:05Z",
"source": "showroom",
"disclosure": "I agree to receive text messages from Desert Motors."
},
{
"contact_value": "555-555-0188",
"opt_in": false,
"consent_timestamp": "2026-10-14T17:03:40Z"
}
]
}'
A successful request returns an empty object.
{}
