Create a new tag
curl --request POST \
--url https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attributeValues": [
{
"attributeId": "0f0e000-000d-0d00-000b-00db0d000fae",
"value": "<string>"
}
]
}
'import requests
url = "https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags"
payload = { "attributeValues": [
{
"attributeId": "0f0e000-000d-0d00-000b-00db0d000fae",
"value": "<string>"
}
] }
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({
attributeValues: [{attributeId: '0f0e000-000d-0d00-000b-00db0d000fae', value: '<string>'}]
})
};
fetch('https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/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://openapi.pleo.io/v1/tag-groups/{tagGroupId}/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([
'attributeValues' => [
[
'attributeId' => '0f0e000-000d-0d00-000b-00db0d000fae',
'value' => '<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://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags"
payload := strings.NewReader("{\n \"attributeValues\": [\n {\n \"attributeId\": \"0f0e000-000d-0d00-000b-00db0d000fae\",\n \"value\": \"<string>\"\n }\n ]\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://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"attributeValues\": [\n {\n \"attributeId\": \"0f0e000-000d-0d00-000b-00db0d000fae\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/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 \"attributeValues\": [\n {\n \"attributeId\": \"0f0e000-000d-0d00-000b-00db0d000fae\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "0f0e000-000d-0d00-000b-00db0d000fae",
"tagGroupId": "0f0e000-000d-0d00-000b-00db0d000fae",
"attributeValues": [
{
"attributeId": "0f0e000-000d-0d00-000b-00db0d000fae",
"value": "<string>"
}
],
"displayOrder": 123,
"hidden": true
}{
"statusCode": 401,
"error": "Forbidden",
"message": "user_scope_insufficient"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "user_scope_insufficient"
}"route not found""Something went wrong. Please contact the administrator if problems persist."Tag Groups
Create a new tag
deprecated
This endpoint allows for the creation of a new Tag and its attribute values.
POST
/
tag-groups
/
{tagGroupId}
/
tags
Create a new tag
curl --request POST \
--url https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attributeValues": [
{
"attributeId": "0f0e000-000d-0d00-000b-00db0d000fae",
"value": "<string>"
}
]
}
'import requests
url = "https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags"
payload = { "attributeValues": [
{
"attributeId": "0f0e000-000d-0d00-000b-00db0d000fae",
"value": "<string>"
}
] }
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({
attributeValues: [{attributeId: '0f0e000-000d-0d00-000b-00db0d000fae', value: '<string>'}]
})
};
fetch('https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/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://openapi.pleo.io/v1/tag-groups/{tagGroupId}/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([
'attributeValues' => [
[
'attributeId' => '0f0e000-000d-0d00-000b-00db0d000fae',
'value' => '<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://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags"
payload := strings.NewReader("{\n \"attributeValues\": [\n {\n \"attributeId\": \"0f0e000-000d-0d00-000b-00db0d000fae\",\n \"value\": \"<string>\"\n }\n ]\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://openapi.pleo.io/v1/tag-groups/{tagGroupId}/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"attributeValues\": [\n {\n \"attributeId\": \"0f0e000-000d-0d00-000b-00db0d000fae\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pleo.io/v1/tag-groups/{tagGroupId}/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 \"attributeValues\": [\n {\n \"attributeId\": \"0f0e000-000d-0d00-000b-00db0d000fae\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "0f0e000-000d-0d00-000b-00db0d000fae",
"tagGroupId": "0f0e000-000d-0d00-000b-00db0d000fae",
"attributeValues": [
{
"attributeId": "0f0e000-000d-0d00-000b-00db0d000fae",
"value": "<string>"
}
],
"displayOrder": 123,
"hidden": true
}{
"statusCode": 401,
"error": "Forbidden",
"message": "user_scope_insufficient"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "user_scope_insufficient"
}"route not found""Something went wrong. Please contact the administrator if problems persist."Authorizations
Open API Bearer token
Path Parameters
Unique UUID of the tag group.
Example:
"0f0e000-000d-0d00-000b-00db0d000fae"
Body
application/json
These are the attributes and their values assigned to this tag
Show child attributes
Show child attributes
Response
Tag group has been created
This is the internal pleo identifier of the tag
Example:
"0f0e000-000d-0d00-000b-00db0d000fae"
This is the internal pleo identifier of the tag group this tag belongs to
Example:
"0f0e000-000d-0d00-000b-00db0d000fae"
These are the attributes and their values assigned to this tag
Show child attributes
Show child attributes
This is the display order position for this tag when displayed in a list.
This flag specifies if the tag is hidden and not visible for use in pleo when tagging expenses.
Was this page helpful?
⌘I