cURL
curl --request PUT \
--url https://api.erdo.ai/v1/outreach-consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"basis": "<string>",
"default_country": "<string>",
"evidence_text": "<string>",
"evidence_version": "<string>",
"grant_ref": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"phone_raw": "<string>",
"recipient_ref": "<string>",
"revoked": true,
"source_ref": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/outreach-consents"
payload = {
"basis": "<string>",
"default_country": "<string>",
"evidence_text": "<string>",
"evidence_version": "<string>",
"grant_ref": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"phone_raw": "<string>",
"recipient_ref": "<string>",
"revoked": True,
"source_ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
basis: '<string>',
default_country: '<string>',
evidence_text: '<string>',
evidence_version: '<string>',
grant_ref: '<string>',
granted_at: '2023-11-07T05:31:56Z',
phone_raw: '<string>',
recipient_ref: '<string>',
revoked: true,
source_ref: '<string>'
})
};
fetch('https://api.erdo.ai/v1/outreach-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.erdo.ai/v1/outreach-consents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'basis' => '<string>',
'default_country' => '<string>',
'evidence_text' => '<string>',
'evidence_version' => '<string>',
'grant_ref' => '<string>',
'granted_at' => '2023-11-07T05:31:56Z',
'phone_raw' => '<string>',
'recipient_ref' => '<string>',
'revoked' => true,
'source_ref' => '<string>'
]),
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.erdo.ai/v1/outreach-consents"
payload := strings.NewReader("{\n \"basis\": \"<string>\",\n \"default_country\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"evidence_version\": \"<string>\",\n \"grant_ref\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"phone_raw\": \"<string>\",\n \"recipient_ref\": \"<string>\",\n \"revoked\": true,\n \"source_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.erdo.ai/v1/outreach-consents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"basis\": \"<string>\",\n \"default_country\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"evidence_version\": \"<string>\",\n \"grant_ref\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"phone_raw\": \"<string>\",\n \"recipient_ref\": \"<string>\",\n \"revoked\": true,\n \"source_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/outreach-consents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"basis\": \"<string>\",\n \"default_country\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"evidence_version\": \"<string>\",\n \"grant_ref\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"phone_raw\": \"<string>\",\n \"recipient_ref\": \"<string>\",\n \"revoked\": true,\n \"source_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"consent": {
"address": "<string>",
"basis": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"evidence_text": "<string>",
"evidence_version": "<string>",
"grant_ref": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"recipient_ref": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"source_ref": "<string>"
}
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
Put v1outreach consents
PUT
/
v1
/
outreach-consents
cURL
curl --request PUT \
--url https://api.erdo.ai/v1/outreach-consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"basis": "<string>",
"default_country": "<string>",
"evidence_text": "<string>",
"evidence_version": "<string>",
"grant_ref": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"phone_raw": "<string>",
"recipient_ref": "<string>",
"revoked": true,
"source_ref": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/outreach-consents"
payload = {
"basis": "<string>",
"default_country": "<string>",
"evidence_text": "<string>",
"evidence_version": "<string>",
"grant_ref": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"phone_raw": "<string>",
"recipient_ref": "<string>",
"revoked": True,
"source_ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
basis: '<string>',
default_country: '<string>',
evidence_text: '<string>',
evidence_version: '<string>',
grant_ref: '<string>',
granted_at: '2023-11-07T05:31:56Z',
phone_raw: '<string>',
recipient_ref: '<string>',
revoked: true,
source_ref: '<string>'
})
};
fetch('https://api.erdo.ai/v1/outreach-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.erdo.ai/v1/outreach-consents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'basis' => '<string>',
'default_country' => '<string>',
'evidence_text' => '<string>',
'evidence_version' => '<string>',
'grant_ref' => '<string>',
'granted_at' => '2023-11-07T05:31:56Z',
'phone_raw' => '<string>',
'recipient_ref' => '<string>',
'revoked' => true,
'source_ref' => '<string>'
]),
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.erdo.ai/v1/outreach-consents"
payload := strings.NewReader("{\n \"basis\": \"<string>\",\n \"default_country\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"evidence_version\": \"<string>\",\n \"grant_ref\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"phone_raw\": \"<string>\",\n \"recipient_ref\": \"<string>\",\n \"revoked\": true,\n \"source_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.erdo.ai/v1/outreach-consents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"basis\": \"<string>\",\n \"default_country\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"evidence_version\": \"<string>\",\n \"grant_ref\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"phone_raw\": \"<string>\",\n \"recipient_ref\": \"<string>\",\n \"revoked\": true,\n \"source_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/outreach-consents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"basis\": \"<string>\",\n \"default_country\": \"<string>\",\n \"evidence_text\": \"<string>\",\n \"evidence_version\": \"<string>\",\n \"grant_ref\": \"<string>\",\n \"granted_at\": \"2023-11-07T05:31:56Z\",\n \"phone_raw\": \"<string>\",\n \"recipient_ref\": \"<string>\",\n \"revoked\": true,\n \"source_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"consent": {
"address": "<string>",
"basis": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"evidence_text": "<string>",
"evidence_version": "<string>",
"grant_ref": "<string>",
"granted_at": "2023-11-07T05:31:56Z",
"recipient_ref": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"source_ref": "<string>"
}
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Body
application/json
Response
Success response
Show child attributes
Show child attributes

