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
-
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 -
Why Salesforce Marketing Cloud Contact Count Increases Unexpectedly and How to Fix It26 Mar 2026 Blog -
Salesforce Testing Framework: Making QA Work Simpler and More Effective25 Mar 2026 Blog -
Salesforce API Testing – The Modern QA Approach for Reliable Integrations05 Jan 2026 Blog -
Transforming SMB Sales with Salesforce Commerce Cloud12 Nov 2025 Blog -
Generative AI Testing tools03 Nov 2025 Blog -
Mirketa Unveils Next-Gen AI Solutions to Redefine the Future of Work Across Industries29 Jul 2025 Press Release -
Salesforce Implementation School Universities Higher Education23 Jul 2025 Blog -
Salesforce Health Cloud Implementation Partner: A Complete Guide23 Jul 2025 Blog -
XML Parsing: Using MINIDOM Vs Element Tree (etree) in Python02 Jul 2025 Blog -
A step by step Guide to create Salesforce web-to-lead form30 Jun 2025 Blog -
How AI is Transforming User Experience Design in 202526 Jun 2025 Blog -
How a Salesforce NPSP Consultant Can Elevate Nonprofit Impact25 Jun 2025 Blog -
Salesforce Load and Performance Testing: Essentials, Importance & Execution23 Jun 2025 Blog -
Salesforce Website Integration Boost Leads, Automation & Customer Experience11 Jun 2025 Blog -
Driving Results in Manufacturing with Salesforce Manufacturing Cloud11 Jun 2025 Blog -
Accelerating Growth with NetSuite SuiteCommerce02 Jun 2025 Blog -
Salesforce Service Cloud Services streamlining operations29 May 2025 Blog -
AI for Nonprofits: Mirketa & Exec Precision Webinar27 May 2025 Press Release -
AI for Nonprofits: Use Cases, Tools & Implementation Strategies20 May 2025 Webinar -
Javascript Frameworks for Salesforce Lightning Design System18 May 2025 Blog