Get Tags
GET https://api.unltd.ai/v1/organizations/:organizationId/tags/
This request necessitates authentication and can be executed by an authenticated user who is a member of the specified organization or by using an organization token. The outcome of this request will be the retrieval of tags associated with the given organization.
Query Parameters
organizationId
String
The ID of the organization to fetch the tags from.
name
String
The name of the tag to filter by.
botId
String
The ID of the bot to fetch associated tags.
sortBy
String
The attribute to sort by.
limit
Integer
The maximum number of tags to return.
page
Integer
The page number to return in the paginated response.
Permissions
API Example
const fetch = require('node-fetch');
async function fetchApiData() {
const response = await fetch('https://api.unltd.ai/v1/organizations/123abcidhere/tags/', {
method: 'GET',
headers: {
'Authorization': 'Bearer ',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
}
fetchApiData();
Response Object
200 success
The response object contains the following properties:
- results: An array of tag entities.
- page: The current page number.
- limit: The maximum number of results per page.
- totalPages: The total number of pages.
- totalResults: The total number of tag entities.
{
"results": [
{
"name": "Example Tag",
"organization": "org_example",
"color": "#FF5733",
"bots": [
"bot_id_1",
"bot_id_2"
],
"id": "tag_id_example"
}
],
"page": 1,
"limit": 10,
"totalPages": 1,
"totalResults": 1
}
Get Single Tag
GET https://api.unltd.ai/v1/organizations/:organizationId/tags/:tagId/
This endpoint retrieves a specific Tag entity that belongs to an organization, based on the provided organization ID and tag ID. The response contains detailed information about the requested tag.
Path Parameters
organizationId
string
The unique identifier of the organization.
tagId
string
The unique ID of the organization's tag to be retrieved.
Permissions
API Example
const fetch = require('node-fetch');
async function fetchApiData() {
const response = await fetch('https://api.unltd.ai/v1/organizations/example_org_id/tags/example_tag_id/', {
method: 'GET',
headers: {
'Authorization': 'Bearer ',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
}
fetchApiData();
{
"tag": {
"id": "tag_id",
"name": "example_tag_name",
"description": "this tag is just an example.",
"bots": [
"bot1_id",
"bot2_id"
],
"organizationId": "example_org_id"
}
}