curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/attribute/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Name": "Billing",
"TagColor": 6,
"EntityType": 4
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/attribute/tags"
payload = {
"Name": "Billing",
"TagColor": 6,
"EntityType": 4
}
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({Name: 'Billing', TagColor: 6, EntityType: 4})
};
fetch('https://{subdomain}.outseta.com/api/v1/attribute/tags', 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://{subdomain}.outseta.com/api/v1/attribute/tags",
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([
'Name' => 'Billing',
'TagColor' => 6,
'EntityType' => 4
]),
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://{subdomain}.outseta.com/api/v1/attribute/tags"
payload := strings.NewReader("{\n \"Name\": \"Billing\",\n \"TagColor\": 6,\n \"EntityType\": 4\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://{subdomain}.outseta.com/api/v1/attribute/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Name\": \"Billing\",\n \"TagColor\": 6,\n \"EntityType\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/attribute/tags")
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 \"Name\": \"Billing\",\n \"TagColor\": 6,\n \"EntityType\": 4\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Name": "string",
"SystemName": "string",
"SystemDescription": "string",
"TagColor": 1,
"EntityType": 0
}Create a tag.
Name and EntityType are required. EntityType fixes what the tag can go on: 4 (Case) for support tickets, 13 (Article) for knowledge base articles, 12 (Broadcast) for broadcast emails, 11 (Segment) for segments. TagColor sets the color the tag shows in.
Name must be unique within an entity type. If the name already exists for that entity type, the existing tag is returned instead of a duplicate, and its color is updated when a different TagColor is supplied. SystemName and SystemDescription are set by Outseta and are ignored here.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/attribute/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Name": "Billing",
"TagColor": 6,
"EntityType": 4
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/attribute/tags"
payload = {
"Name": "Billing",
"TagColor": 6,
"EntityType": 4
}
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({Name: 'Billing', TagColor: 6, EntityType: 4})
};
fetch('https://{subdomain}.outseta.com/api/v1/attribute/tags', 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://{subdomain}.outseta.com/api/v1/attribute/tags",
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([
'Name' => 'Billing',
'TagColor' => 6,
'EntityType' => 4
]),
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://{subdomain}.outseta.com/api/v1/attribute/tags"
payload := strings.NewReader("{\n \"Name\": \"Billing\",\n \"TagColor\": 6,\n \"EntityType\": 4\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://{subdomain}.outseta.com/api/v1/attribute/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Name\": \"Billing\",\n \"TagColor\": 6,\n \"EntityType\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/attribute/tags")
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 \"Name\": \"Billing\",\n \"TagColor\": 6,\n \"EntityType\": 4\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Name": "string",
"SystemName": "string",
"SystemDescription": "string",
"TagColor": 1,
"EntityType": 0
}Authorizations
Enter your access token (OAuth / JWT).
Body
The tag to create
1 - 5010505001 - Red, 2 - Orange, 3 - Amber, 4 - Green, 5 - Teal, 6 - Blue, 7 - Indigo, 8 - Purple, 9 - Pink, 10 - Gray
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 0 - None, 1 - Account, 2 - Person, 3 - Deal, 4 - Case, 5 - Invoice, 6 - EmailLog, 7 - Plan, 8 - DiscountCoupon, 9 - AddOn, 10 - Task, 11 - Segment, 12 - Broadcast, 13 - Article
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 Response
111 - 5010505001 - Red, 2 - Orange, 3 - Amber, 4 - Green, 5 - Teal, 6 - Blue, 7 - Indigo, 8 - Purple, 9 - Pink, 10 - Gray
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 0 - None, 1 - Account, 2 - Person, 3 - Deal, 4 - Case, 5 - Invoice, 6 - EmailLog, 7 - Plan, 8 - DiscountCoupon, 9 - AddOn, 10 - Task, 11 - Segment, 12 - Broadcast, 13 - Article
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13