cURL
curl -sS -X POST 'https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}/tags' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"labels": []
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}/tags"
payload = { "labels": [] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({labels: []})
};
fetch('https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}/tags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"id": "8e0caa73-cc71-4aa4-88eb-fca494de8e20",
"label": "Engineering"
}
]{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Inventory
Add tags
Adds one or more tags to an inventory item. Tags are key-value labels used to organize and filter inventory. Existing tags with the same key are not replaced — duplicates are ignored.
POST
https://apipub.firstbasehq.com
/
api
/
v1
/
inventory
/
{inventoryId}
/
tags
cURL
curl -sS -X POST 'https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}/tags' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"labels": []
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}/tags"
payload = { "labels": [] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({labels: []})
};
fetch('https://apipub.firstbasehq.com/api/v1/inventory/{inventoryId}/tags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"id": "8e0caa73-cc71-4aa4-88eb-fca494de8e20",
"label": "Engineering"
}
]{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Prefix the value with "ApiKey" to indicate the custom authorization type
Path Parameters
The Inventory ID to add the tags to
Body
application/json
Request body for adding tags to an inventory item. Contains the list of tags to attach.
Set of labels to be added as tags
Examples:
"Tag 1"
"Tag 2"