Skip to main content
POST
/
tags
/
{tagId}
/
values
Apply a tag to a resource
curl --request POST \
  --url https://v1.api.altostrat.io/tags/{tagId}/values \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "correlation_id": "site_9b52d930f4324c0abac04c12dff85544",
  "correlation_type": "site",
  "value": "Production"
}
'
import requests

url = "https://v1.api.altostrat.io/tags/{tagId}/values"

payload = {
"correlation_id": "site_9b52d930f4324c0abac04c12dff85544",
"correlation_type": "site",
"value": "Production"
}
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({
correlation_id: 'site_9b52d930f4324c0abac04c12dff85544',
correlation_type: 'site',
value: 'Production'
})
};

fetch('https://v1.api.altostrat.io/tags/{tagId}/values', 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://v1.api.altostrat.io/tags/{tagId}/values",
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([
'correlation_id' => 'site_9b52d930f4324c0abac04c12dff85544',
'correlation_type' => 'site',
'value' => 'Production'
]),
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://v1.api.altostrat.io/tags/{tagId}/values"

payload := strings.NewReader("{\n \"correlation_id\": \"site_9b52d930f4324c0abac04c12dff85544\",\n \"correlation_type\": \"site\",\n \"value\": \"Production\"\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://v1.api.altostrat.io/tags/{tagId}/values")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"correlation_id\": \"site_9b52d930f4324c0abac04c12dff85544\",\n \"correlation_type\": \"site\",\n \"value\": \"Production\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://v1.api.altostrat.io/tags/{tagId}/values")

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 \"correlation_id\": \"site_9b52d930f4324c0abac04c12dff85544\",\n \"correlation_type\": \"site\",\n \"value\": \"Production\"\n}"

response = http.request(request)
puts response.read_body
{
  "tag_id": "tag_01E8Z4Q6J7B6A5P4E3D2C1B0A9",
  "correlation_id": "site_9b52d930f4324c0abac04c12dff85544",
  "correlation_type": "site",
  "value": "APAC",
  "created_at": "2025-10-29T13:00:00Z",
  "updated_at": "2025-10-29T13:00:00Z"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}

Authorizations

Authorization
string
header
required

A bearer token is required for all API requests.

Path Parameters

tagId
string
required

The unique identifier for the tag definition.

Body

application/json

The details of the resource to tag and the value to apply.

correlation_id
string
required

The unique ID of the resource to apply the tag to.

Example:

"site_9b52d930f4324c0abac04c12dff85544"

correlation_type
enum<string>
required

The type of resource being correlated.

Available options:
site,
user,
wan,
account
Example:

"site"

value
string
required

The value to assign.

Maximum string length: 255
Example:

"Enterprise"

Response

The tag was applied successfully.

tag_id
string

The ID of the parent tag definition.

Example:

"tag_01E8Z4Q6J7B6A5P4E3D2C1B0A9"

correlation_id
string

The ID of the resource this tag value is applied to.

Example:

"site_9b52d930f4324c0abac04c12dff85544"

correlation_type
enum<string>

The type of resource being correlated.

Available options:
site,
user,
wan,
account
Example:

"site"

value
string

The specific value of the tag for this resource (e.g., "APAC", "High").

Example:

"APAC"

created_at
string<date-time>

The timestamp when the tag value was created.

Example:

"2025-10-29T13:00:00Z"

updated_at
string<date-time>

The timestamp when the tag value was last updated.

Example:

"2025-10-29T13:00:00Z"