Intempt
  1. API Reference
Intempt
  • Installation
    • Basic Intempt Installation
    • Create source
    • Google Tag Manager
    • Environment Setup
    • Validating Installation
  • SDK
    • JS SDK
    • Android SDK
    • iOS SDK
    • Node.js SDK
  • API Reference
    • Track data
      POST
    • Consent
      POST
    • Choose API
      POST
    • Recommendations Feed API
      POST
  • Data Ingestion & Tracking
    • intempt:html / intempt:page / intempt:session
    • Product Catalog Ingestion via API
    • How Intempt Works — A One-Page Mental Model
    • Revenue & Refund Tracking
    • Recommendation events mapping
    • Track Events API (Recommendations)
  • Data Models & Event Schema
    • Event Schema Overview
  • Webhooks
    • All about Webhooks
  • Server Side Experiments
    • Overview
  1. API Reference

Consent

POST
/{orgName}/projects/{projectName}/consents/data
Record a user’s consent decision (accept/reject) for a project. Consent is evaluated in real time and affects tracking and downstream features.

Request

Path Params

Query Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
200
Body

🟠400Bad Request
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST '//projects//consents/data?apiKey' \
--header 'Content-Type: application/json' \
--data-raw 'var myHeaders = new Headers();
myHeaders.append("Content-Type",
"application/json");

var raw = JSON.stringify({
    "action": "accept",
    "timestamp": Date.now(),
    "validUntil": Date.now() + (365 * 24 * 60 * 60 * 1000),
    "source": "desktop",
    "category": "analytics",
    "sourceId": 0,
    "profileId": "profile_abc123",
    "userId": "user@example.com",
    "email": "user@example.com",
    "message": "User accepted analytics consent on cookie banner"
});

var requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("//projects//consents/data?apiKey=YOUR_API_KEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));'
Response Response Example
200 - Consent Accepted — Successfully Processed
In production, Intempt often returns an empty JSON object {} for successful consent ingestion.
{}
Modified at 2026-01-27 12:49:12
Previous
Track data
Next
Choose API
Built with