API Reference - Tags
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108059
← Back to API Reference | Getting Started
Tags
Tags are labels that can be attached to members and other objects on your directory. Tags are organized into tag groups and connected to objects via tag relationships. This enables flexible, custom classification beyond standard categories.
Model name in URL:
tags — DB table: tagsThe Tag Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique tag ID (primary key, read-only) |
tag_name | string | The label text for this tag |
group_tag_id | integer | ID of the tag group this tag belongs to (foreign key to tag_groups) |
added_by | integer | User ID of the user who created this tag |
updated_by | integer | User ID of the user who last updated this tag |
created_at | datetime | Timestamp when this tag was created |
updated_at | datetime | Timestamp when this tag was last updated |
List Tag Records
GET /api/v2/tags/get
Returns a paginated list of tag records.
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/tags/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"id": "1",
"tag_name": "Top Rated",
"group_tag_id": "1",
"added_by": "27",
"updated_by": "27",
"created_at": "2024-06-04 16:36:07",
"updated_at": "2024-06-04 16:36:07"
},
{
"id": "2",
"tag_name": "Certified",
"group_tag_id": "1",
"added_by": "27",
"updated_by": "27",
"created_at": "2024-06-04 18:28:52",
"updated_at": "2024-06-04 18:28:52"
}
],
"total": "31",
"current_page": 1,
"total_pages": 2,
"next_page": "MipfKjM="
}Retrieve a Tag Record
GET /api/v2/tags/get/{id}
Example Request
Copy
curl -X GET "https://www.yourdomain.com/api/v2/tags/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
Copy
{
"status": "success",
"message": [
{
"id": "1",
"tag_name": "Top Rated",
"group_tag_id": "1",
"added_by": "27",
"updated_by": "27",
"created_at": "2024-06-04 16:36:07",
"updated_at": "2024-06-04 16:36:07"
}
],
"total": "31",
"current_page": 1,
"total_pages": 2,
"next_page": "MipfKjI1"
}Create a Tag Record
POST /api/v2/tags/create
Example Request
Copy
curl -X POST "https://www.yourdomain.com/api/v2/tags/create" \ -H "X-Api-Key: your-api-key-here" \ -d "tag_name=Featured+Member" \ -d "group_tag_id=1" \ -d "added_by=1"
Example Response
Copy
{
"status": "success",
"message": {
"id": "32",
"tag_name": "Featured Member",
"group_tag_id": "1",
"added_by": "1",
"updated_by": null,
"created_at": null,
"updated_at": null
}
}Update a Tag Record
PUT /api/v2/tags/update
Example Request
Copy
curl -X PUT "https://www.yourdomain.com/api/v2/tags/update" \ -H "X-Api-Key: your-api-key-here" \ -d "id=32" \ -d "tag_name=Featured+Premium+Member"
Example Response
Copy
{
"status": "success",
"message": {
"id": "32",
"tag_name": "Featured Premium Member",
"group_tag_id": "1",
"added_by": "1",
"updated_by": "0",
"created_at": "0000-00-00 00:00:00",
"updated_at": "0000-00-00 00:00:00"
}
}Delete a Tag Record
DELETE /api/v2/tags/delete
Example Request
Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/tags/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "id=32"
Example Response
Copy
{
"status": "success",
"message": "tags record was deleted"
}