cURL
curl "https://app.tatango.com/api/v2/lists/ID/bulk_taggings" -d '{"bulk_tagging":{"phone_numbers":["2065551111","2065551112"],"tags":["vip","customer"],"replace_tags":false}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u emailaddress@mydomain.com:my_api_key \
-H "Host: example.org" \
-H "Cookie: "require 'net/http'
require 'uri'
uri = URI.parse('https://app.tatango.com/api/v2/lists/ID/bulk_taggings')
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_url)
request.basic_auth("emailaddress@mydomain.com", "my_api_key")
request.body = {"bulk_tagging":{"phone_numbers":["2065551111","2065551112"],"tags":["vip","customer"],"replace_tags":false}}.to_json
response = http.request(request)var request = new XMLHttpRequest();
request.open('POST', 'https://app.tatango.com/api/v2/lists/ID/bulk_taggings', false);
request.setRequestHeader('Content-Type', 'application/json');
request.setRequestHeader('Authorization', 'Basic ' + btoa('emailaddress@mydomain.com:my_api_key'));
var data = JSON.stringify({ bulk_tagging: { phone_numbers: ['2065551111', '2065551112'], tags: ['vip', 'customer'], replace_tags: false } });
request.send(data);import requests
url = "https://app.tatango.com/api/v2/lists/{ID}/bulk_taggings"
payload = { "bulk_tagging": {
"phone_numbers": ["2065551111", "2065551112", "2065551113"],
"tags": ["vip", "customer", "newsletter"],
"replace_tags": False
} }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.tatango.com/api/v2/lists/{ID}/bulk_taggings",
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([
'bulk_tagging' => [
'phone_numbers' => [
'2065551111',
'2065551112',
'2065551113'
],
'tags' => [
'vip',
'customer',
'newsletter'
],
'replace_tags' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://app.tatango.com/api/v2/lists/{ID}/bulk_taggings"
payload := strings.NewReader("{\n \"bulk_tagging\": {\n \"phone_numbers\": [\n \"2065551111\",\n \"2065551112\",\n \"2065551113\"\n ],\n \"tags\": [\n \"vip\",\n \"customer\",\n \"newsletter\"\n ],\n \"replace_tags\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.tatango.com/api/v2/lists/{ID}/bulk_taggings")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"bulk_tagging\": {\n \"phone_numbers\": [\n \"2065551111\",\n \"2065551112\",\n \"2065551113\"\n ],\n \"tags\": [\n \"vip\",\n \"customer\",\n \"newsletter\"\n ],\n \"replace_tags\": false\n }\n}")
.asString();{
"number_count": 3,
"tag_count": 3,
"subscribers_to_update": 2,
"replace_tags": false,
"not_subscribed": [
"2065551113"
],
"invalid_numbers": []
}Subscribers
Adding Multiple Tags to Multiple Subscribers
This endpoint applies multiple tags to multiple subscribers.
POST
/
api
/
v2
/
lists
/
{ID}
/
bulk_taggings
cURL
curl "https://app.tatango.com/api/v2/lists/ID/bulk_taggings" -d '{"bulk_tagging":{"phone_numbers":["2065551111","2065551112"],"tags":["vip","customer"],"replace_tags":false}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u emailaddress@mydomain.com:my_api_key \
-H "Host: example.org" \
-H "Cookie: "require 'net/http'
require 'uri'
uri = URI.parse('https://app.tatango.com/api/v2/lists/ID/bulk_taggings')
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_url)
request.basic_auth("emailaddress@mydomain.com", "my_api_key")
request.body = {"bulk_tagging":{"phone_numbers":["2065551111","2065551112"],"tags":["vip","customer"],"replace_tags":false}}.to_json
response = http.request(request)var request = new XMLHttpRequest();
request.open('POST', 'https://app.tatango.com/api/v2/lists/ID/bulk_taggings', false);
request.setRequestHeader('Content-Type', 'application/json');
request.setRequestHeader('Authorization', 'Basic ' + btoa('emailaddress@mydomain.com:my_api_key'));
var data = JSON.stringify({ bulk_tagging: { phone_numbers: ['2065551111', '2065551112'], tags: ['vip', 'customer'], replace_tags: false } });
request.send(data);import requests
url = "https://app.tatango.com/api/v2/lists/{ID}/bulk_taggings"
payload = { "bulk_tagging": {
"phone_numbers": ["2065551111", "2065551112", "2065551113"],
"tags": ["vip", "customer", "newsletter"],
"replace_tags": False
} }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.tatango.com/api/v2/lists/{ID}/bulk_taggings",
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([
'bulk_tagging' => [
'phone_numbers' => [
'2065551111',
'2065551112',
'2065551113'
],
'tags' => [
'vip',
'customer',
'newsletter'
],
'replace_tags' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://app.tatango.com/api/v2/lists/{ID}/bulk_taggings"
payload := strings.NewReader("{\n \"bulk_tagging\": {\n \"phone_numbers\": [\n \"2065551111\",\n \"2065551112\",\n \"2065551113\"\n ],\n \"tags\": [\n \"vip\",\n \"customer\",\n \"newsletter\"\n ],\n \"replace_tags\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.tatango.com/api/v2/lists/{ID}/bulk_taggings")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"bulk_tagging\": {\n \"phone_numbers\": [\n \"2065551111\",\n \"2065551112\",\n \"2065551113\"\n ],\n \"tags\": [\n \"vip\",\n \"customer\",\n \"newsletter\"\n ],\n \"replace_tags\": false\n }\n}")
.asString();{
"number_count": 3,
"tag_count": 3,
"subscribers_to_update": 2,
"replace_tags": false,
"not_subscribed": [
"2065551113"
],
"invalid_numbers": []
}Other uses
You can also use this endpoint to mass remove tags from subscribers. For example if replace_tags is true and your tags list is empty it will remove all tags from your numbers list
Request URL
POST https://app.tatango.com/api/v2/lists/{ID}/bulk_taggings
Authorizations
Response
200 - application/json
Bulk tagging operation completed