Update account metadata
curl --request PATCH \
--url https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId} \
--header 'Content-Type: application/json' \
--data '
{
"daily_limit": 20,
"tracking_preference": "all_conversations"
}
'import requests
url = "https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}"
payload = {
"daily_limit": 20,
"tracking_preference": "all_conversations"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({daily_limit: 20, tracking_preference: 'all_conversations'})
};
fetch('https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}', 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://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'daily_limit' => 20,
'tracking_preference' => 'all_conversations'
]),
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://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}"
payload := strings.NewReader("{\n \"daily_limit\": 20,\n \"tracking_preference\": \"all_conversations\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}")
.header("Content-Type", "application/json")
.body("{\n \"daily_limit\": 20,\n \"tracking_preference\": \"all_conversations\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"daily_limit\": 20,\n \"tracking_preference\": \"all_conversations\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c7de2c5-617c-4c1b-9c6f-b6e659b08d92",
"updated": true
}
}Accounts
Update account metadata
Merges the JSON body into the account metadata. Use this endpoint for settings such as daily limits, working hours, and tracking_preference.
PATCH
/
api
/
v1
/
platforms
/
{platform}
/
accounts
/
{accountId}
Update account metadata
curl --request PATCH \
--url https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId} \
--header 'Content-Type: application/json' \
--data '
{
"daily_limit": 20,
"tracking_preference": "all_conversations"
}
'import requests
url = "https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}"
payload = {
"daily_limit": 20,
"tracking_preference": "all_conversations"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({daily_limit: 20, tracking_preference: 'all_conversations'})
};
fetch('https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}', 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://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'daily_limit' => 20,
'tracking_preference' => 'all_conversations'
]),
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://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}"
payload := strings.NewReader("{\n \"daily_limit\": 20,\n \"tracking_preference\": \"all_conversations\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}")
.header("Content-Type", "application/json")
.body("{\n \"daily_limit\": 20,\n \"tracking_preference\": \"all_conversations\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://optareach.com/api/v1/platforms/{platform}/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"daily_limit\": 20,\n \"tracking_preference\": \"all_conversations\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c7de2c5-617c-4c1b-9c6f-b6e659b08d92",
"updated": true
}
}