Tags API | How to manage tags using the Y.GY API
This is the main API for managing tags. The essence of tags is to be able to group your links into categories.
POST/api/v1/tag
Create a Tag
Required attributes
- Name
name
- Type
- string
- Description
This is what you want to call your tag.
Response
The response is a Tag object, as shown in the response.
Request
POST
/api/v1/tagcurl --request POST \
--url https://api.y.gy/api/v1/tag \
--header 'Content-Type: application/json' \
--header 'api-key: 108f0e6147c2e106e82283c88d9492lk1743801b2e5b373049977afb3bb3ec' \
--data '{
"tag": "Tag 1",
}'
Tag Response Example
{
"id": 1,
"created_at": "2024-07-11_13-19-17",
"organization_id": 1,
"name": "Tag 1"
}
GET/api/v1/tag
Get all Tags
Response
The response is an array of tag objects.
Request
GET
/api/v1/linkcurl --request GET \
--url https://api.y.gy/api/v1/tag \
--header 'Content-Type: application/json' \
--header 'api-key: 108f0e6147c2e106e82283c88d9492lk1743801b2e5b373049977afb3bb3ec' \
Tag Response Example
[
{
"created_at": "2023-09-11_02-33-06",
"id": 1,
"name": "Tag 1",
"organization_id": 1
},
{
"created_at": "2023-09-11_02-33-06",
"id": 2,
"name": "Tag 2",
"organization_id": 1
}
]
DELETE/api/v1/tag/<id>
Delete a Tag
Required Attributes
- Name
id
- Type
- string
- Description
The ID of the tag as returned by the y.gy API originally
Response
The response is a 204 Status code.
Request
PATCH
/api/v1/tag/<id>curl --request DELETE \
--url https://api.y.gy/api/v1/tag/2 \
--header 'api-key: 108f0e6147c2e106e82283c88d9492lk1743801b2e5b373049977afb3bb3ec' \