Compliance
Record consent with evidence
POST
/
v1
/
compliance
/
consents
Record consent with evidence
curl --request POST \
--url https://api-us.larynth.com/v1/compliance/consents \
--header 'Content-Type: application/json' \
--cookie lx_session= \
--data '
{
"e164": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"captured_ip": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence_ref": "<string>",
"evidence_text": "<string>",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api-us.larynth.com/v1/compliance/consents"
payload = {
"e164": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"captured_ip": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence_ref": "<string>",
"evidence_text": "<string>",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"cookie": "lx_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'lx_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
e164: '<string>',
granted_at: '2023-11-07T05:31:56Z',
captured_ip: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
evidence_ref: '<string>',
evidence_text: '<string>',
scope_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api-us.larynth.com/v1/compliance/consents', 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-us.larynth.com/v1/compliance/consents",
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([
'e164' => '<string>',
'granted_at' => '2023-11-07T05:31:56Z',
'captured_ip' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'evidence_ref' => '<string>',
'evidence_text' => '<string>',
'scope_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_COOKIE => "lx_session=",
CURLOPT_HTTPHEADER => [
"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-us.larynth.com/v1/compliance/consents"
payload := strings.NewReader("{\n \"e164\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"captured_ip\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence_ref\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"scope_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "lx_session=")
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-us.larynth.com/v1/compliance/consents")
.header("cookie", "lx_session=")
.header("Content-Type", "application/json")
.body("{\n \"e164\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"captured_ip\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence_ref\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"scope_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-us.larynth.com/v1/compliance/consents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'lx_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"e164\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"captured_ip\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence_ref\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"scope_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"e164": "<string>",
"evidence_sha256": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "express",
"scope_type": "tenant",
"source": "import",
"captured_ip": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence_ref": "<string>",
"evidence_text": "<string>",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}Authorizations
sessionapiKey
Dashboard session cookie
Body
application/json
Pattern:
^\+[1-9][0-9]{6,14}$Available options:
express, express_written Available options:
tenant, campaign Available options:
api, web_form, verbal_recorded, other Maximum string length:
45One of evidence_ref or evidence_text is required
Maximum string length:
2000Maximum string length:
4000Campaign id; required when scope_type is campaign
Response
Created
Pattern:
^[0-9a-f]{64}$Available options:
express, express_written Available options:
tenant, campaign Available options:
import, api, web_form, verbal_recorded, other ⌘I
Record consent with evidence
curl --request POST \
--url https://api-us.larynth.com/v1/compliance/consents \
--header 'Content-Type: application/json' \
--cookie lx_session= \
--data '
{
"e164": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"captured_ip": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence_ref": "<string>",
"evidence_text": "<string>",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api-us.larynth.com/v1/compliance/consents"
payload = {
"e164": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"captured_ip": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence_ref": "<string>",
"evidence_text": "<string>",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"cookie": "lx_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'lx_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
e164: '<string>',
granted_at: '2023-11-07T05:31:56Z',
captured_ip: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
evidence_ref: '<string>',
evidence_text: '<string>',
scope_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api-us.larynth.com/v1/compliance/consents', 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-us.larynth.com/v1/compliance/consents",
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([
'e164' => '<string>',
'granted_at' => '2023-11-07T05:31:56Z',
'captured_ip' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'evidence_ref' => '<string>',
'evidence_text' => '<string>',
'scope_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_COOKIE => "lx_session=",
CURLOPT_HTTPHEADER => [
"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-us.larynth.com/v1/compliance/consents"
payload := strings.NewReader("{\n \"e164\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"captured_ip\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence_ref\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"scope_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "lx_session=")
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-us.larynth.com/v1/compliance/consents")
.header("cookie", "lx_session=")
.header("Content-Type", "application/json")
.body("{\n \"e164\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"captured_ip\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence_ref\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"scope_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-us.larynth.com/v1/compliance/consents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'lx_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"e164\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"captured_ip\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence_ref\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"scope_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"e164": "<string>",
"evidence_sha256": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "express",
"scope_type": "tenant",
"source": "import",
"captured_ip": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence_ref": "<string>",
"evidence_text": "<string>",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}