Consent API and Consent Write API
Author
July 7, 2022
- Customers intend to receive marketing promotions through emails,
- A customer has opted out/in for the fax or call.
Consent API and Consent Write API reads and write permission across the Contact, Contact Point Type Consent, Data Use Purpose, Individual, Lead, Person Account, and User objects when the records have a lookup relationship. APIs access organization-wide consent data, such as links between records and the value of consent flags, rather than just records to which the user has normal access.
Consent API
- Fetch consent settings for Lead, Contact, User, Person Account, or Individual object records.
- Fetch aggregated consent data
- API is available with version 44.0 and later.
- Multiaction endpoint is allowed with version 45.0 and later.
Permissions needed
View All Data or Allow User Access to Privacy Data user permission.
Consent API Syntax
URI
/services/data/vXX.X/consent/action/<action>?ids=list_of_Ids
/services/data/vXX.X/consent/multiaction?actions=list_of_actions&ids=list_of_Ids
Formats
JSON
HTTP methods
GET
Authentication
Authorization: Bearer token
Request body
None
Required Parameters
Example
/services/data/v55.0/consent/action/email?ids=test@test.com, test2@test.com
Response
{
“test@test.com” : {
“result” : “Success”,
“proceed” : {
“email” : “true”
“emailResult” : “Success”
},
“explanation” : [ {
“objectConsulted” : “ContactTypePointConsent”,
“status” : “opt_in”,
“purpose” : “billing”,
“recordId” : “003xx000004TxyY”,
“value” : “true”
},{
“objectConsulted” : “Contact”,
“field” : “HasOptedOutOfTracking”,
“recordId” : “1”,
“value” : “true”
}]
},
“test2@test.com” : {
“result” : “Success”,
“proceed” : {
“email” : “false”
“emailResult” : “Success”
},
“explanation” : [ {
“objectConsulted” : “Contact”,
“field” : ” HasOptedOutOfFax”,
“recordId” : “00Qxx00000skwO”,
“value” : “true”
} ]
}
}
Consent Write API
- A single API call can update and write consent across multiple records.
- API is available starting with version 48.0 and up.
Permissions needed
ModifyAllData or the ConsentApiUpdate user permission.
Consent Write API Syntax
URI
/services/data/vXX.X/consent/action/<action>?ids=<email-OR-recordID>
Formats
JSON
HTTP methods
PATCH
Authentication
Authorization: Bearer token
Request body
Only Salesforce CDP uses the request body. Pass in an empty object if there is nothing to pass in the request body.
Required Parameters

Example
/services/data/v55.0/consent/action/<action>?ids=test@test.com&status=<optout/optin/seen/notseen>
Response
{
“test@test.com” : {
“result” : “Success”,
“edited” : [{
“objectType” : “<Contact, Lead, User, etc.>”,
“field” : “<HasOptedOutofFax, DoNotCall,etc>”,
“valueOfField” : “<true/false>”,
“id” : “<recordID>”
}],
}
}
Recent Posts
-
The Hybrid Advantage in Salesforce QA20 May 2026 Blog -
CI/CD in Salesforce: Role of QA in DevOps Pipeline19 May 2026 Blog -
Reasons Why Addiction Treatment Centers should consider leveraging Salesforce as a CRM18 May 2026 Blog -
Insights on employee engagement15 May 2026 Blog -
AI Governance Why Businesses Need an AI Strategy Before Implementing AI14 May 2026 Blog -
Salesforce Agentforce: Revolutionizing AI with Autonomous Agents13 May 2026 Blog -
Salesforce Headless 360 Guide | Mirketa13 May 2026 Blog -
Salesforce Custom Permissions12 May 2026 Blog -
Salesforce Education Cloud – Time is Now11 May 2026 Blog -
Top Salesforce Performance Optimization Techniques for Large Enterprises08 May 2026 Blog -
AI Orchestration for Enterprises: Scale Smarter, Faster, and Securely08 May 2026 E-Book -
Stress is always on a vacation @ Mirketa08 May 2026 Blog -
UiPath RPA with AI Capabilities in Salesforce07 May 2026 Blog -
The ROI of AI in Enterprise Applications06 May 2026 Blog -
Rethinking Enterprise Quoting in Salesforce28 Apr 2026 Blog -
Integration Testing with Data Warehouse27 Apr 2026 Blog -
Salesforce Nonprofit Cloud vs NPSP: 2026 Comparison Guide24 Apr 2026 Blog -
Top Use Cases of Salesforce Experience Cloud for Businesses23 Apr 2026 Blog -
How Salesforce Nonprofit Cloud is Transforming Fundraising, Grant Management & CRM in 202622 Apr 2026 Blog -
Get Proactive with Salesforce-Mirketa’s Vaccine Cloud Solutions19 Apr 2026 Blog -
Quality Over Speed: Finding the Balance17 Apr 2026 Blog -
Salesforce Commerce Cloud Testing16 Apr 2026 Blog -
Service vs. Experience: Which Salesforce Cloud Wins the Support Battle?14 Apr 2026 Blog -
Change Data Capture and Asynchronous Apex Trigger14 Apr 2026 Blog -
NPSP to Nonprofit Cloud Migration Guide13 Apr 2026 E-Book -
NPSP to Nonprofit Cloud Migration Guide | Strategy & Steps07 Apr 2026 Blog -
The Psychology of Bugs06 Apr 2026 Blog -
Top Salesforce Testing Challenges and How to Solve Them06 Apr 2026 Blog -
How to Launch Your First Salesforce Experience Cloud Site: A Simple Guide31 Mar 2026 Blog -
What is Salesforce Experience Cloud? Your Gateway to Branded Digital Experiences30 Mar 2026 Blog