Record consent for a contact on a channel
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/contacts/{id}/consent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "sms",
"consent_type": "marketing",
"source": "web_form",
"ip_address": "203.0.113.10",
"metadata": {
"form_id": "newsletter_footer"
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/contacts/{id}/consent"
payload = {
"channel": "sms",
"consent_type": "marketing",
"source": "web_form",
"ip_address": "203.0.113.10",
"metadata": { "form_id": "newsletter_footer" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channel: 'sms',
consent_type: 'marketing',
source: 'web_form',
ip_address: '203.0.113.10',
metadata: {form_id: 'newsletter_footer'}
})
};
fetch('https://api.orbit.devotel.io/api/v1/contacts/{id}/consent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/contacts/{id}/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channel' => 'sms',
'consent_type' => 'marketing',
'source' => 'web_form',
'ip_address' => '203.0.113.10',
'metadata' => [
'form_id' => 'newsletter_footer'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/contacts/{id}/consent"
payload := strings.NewReader("{\n \"channel\": \"sms\",\n \"consent_type\": \"marketing\",\n \"source\": \"web_form\",\n \"ip_address\": \"203.0.113.10\",\n \"metadata\": {\n \"form_id\": \"newsletter_footer\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orbit.devotel.io/api/v1/contacts/{id}/consent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channel\": \"sms\",\n \"consent_type\": \"marketing\",\n \"source\": \"web_form\",\n \"ip_address\": \"203.0.113.10\",\n \"metadata\": {\n \"form_id\": \"newsletter_footer\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/contacts/{id}/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channel\": \"sms\",\n \"consent_type\": \"marketing\",\n \"source\": \"web_form\",\n \"ip_address\": \"203.0.113.10\",\n \"metadata\": {\n \"form_id\": \"newsletter_footer\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "consent_01HZX8Y7QJK4M",
"contact_id": "contact_01HZX8Y7QJK4M",
"channel": "sms",
"consent_type": "marketing",
"granted": true,
"source": "web_form",
"ip_address": "203.0.113.10",
"granted_at": "2026-02-02T12:00:00.000Z",
"revoked_at": null,
"consent_state": "opted_in",
"created_at": "2026-02-02T12:00:00.000Z"
},
"meta": {
"request_id": "req_01HZX9MNOPQR",
"timestamp": "2026-02-02T12:00:00.000Z"
}
}Contacts
Record consent for a contact on a channel
Record a marketing, transactional or blanket consent grant for a contact on a specific channel (sms, whatsapp, rcs, viber, email or voice). Captures the consent source (web form, API, import, opt-in keyword or a verbally-logged opt-in), an optional IP address and free-form metadata for your GDPR Art-7 / TCPA proof-of-consent trail, and writes an audit-log entry. Returns 201 with the stored consent record. Requires write scope.
POST
/
api
/
v1
/
contacts
/
{id}
/
consent
Record consent for a contact on a channel
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/contacts/{id}/consent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "sms",
"consent_type": "marketing",
"source": "web_form",
"ip_address": "203.0.113.10",
"metadata": {
"form_id": "newsletter_footer"
}
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/contacts/{id}/consent"
payload = {
"channel": "sms",
"consent_type": "marketing",
"source": "web_form",
"ip_address": "203.0.113.10",
"metadata": { "form_id": "newsletter_footer" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channel: 'sms',
consent_type: 'marketing',
source: 'web_form',
ip_address: '203.0.113.10',
metadata: {form_id: 'newsletter_footer'}
})
};
fetch('https://api.orbit.devotel.io/api/v1/contacts/{id}/consent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/contacts/{id}/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channel' => 'sms',
'consent_type' => 'marketing',
'source' => 'web_form',
'ip_address' => '203.0.113.10',
'metadata' => [
'form_id' => 'newsletter_footer'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/contacts/{id}/consent"
payload := strings.NewReader("{\n \"channel\": \"sms\",\n \"consent_type\": \"marketing\",\n \"source\": \"web_form\",\n \"ip_address\": \"203.0.113.10\",\n \"metadata\": {\n \"form_id\": \"newsletter_footer\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orbit.devotel.io/api/v1/contacts/{id}/consent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channel\": \"sms\",\n \"consent_type\": \"marketing\",\n \"source\": \"web_form\",\n \"ip_address\": \"203.0.113.10\",\n \"metadata\": {\n \"form_id\": \"newsletter_footer\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/contacts/{id}/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channel\": \"sms\",\n \"consent_type\": \"marketing\",\n \"source\": \"web_form\",\n \"ip_address\": \"203.0.113.10\",\n \"metadata\": {\n \"form_id\": \"newsletter_footer\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "consent_01HZX8Y7QJK4M",
"contact_id": "contact_01HZX8Y7QJK4M",
"channel": "sms",
"consent_type": "marketing",
"granted": true,
"source": "web_form",
"ip_address": "203.0.113.10",
"granted_at": "2026-02-02T12:00:00.000Z",
"revoked_at": null,
"consent_state": "opted_in",
"created_at": "2026-02-02T12:00:00.000Z"
},
"meta": {
"request_id": "req_01HZX9MNOPQR",
"timestamp": "2026-02-02T12:00:00.000Z"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Path Parameters
Body
application/json
Channel the consent applies to.
Available options:
sms, whatsapp, rcs, viber, email, voice Scope of the grant. Defaults to marketing.
Available options:
marketing, transactional, all How consent was captured. Defaults to api.
Available options:
web_form, api, import, opt_in_keyword, verbal Optional IPv4/IPv6 address captured at opt-in.
Optional free-form evidence, under 8 KB when serialised.
⌘I