Skip to main content

Tags

Tags

List Tags

  • Authentication: Optional
GET /api/v1/tags

The list of tags returned by this endpoint depends on the role of the authenticated user. Private Tags are only returned for users with either administrator or collaborator role.

Example

GET <baseURL>/api/v1/tags

Response

200 OK
---
[
{
"id": 8,
"name": "Under Consideration",
"slug": "under-consideration",
"color": "87BE1F",
"isPublic": true
},
{
"id": 86,
"name": "Hard",
"slug": "hard",
"color": "E60737",
"isPublic": false
}
]

Create a Tag

  • Authentication: Required
  • Required Role: Administrator
POST /api/v1/tags

Parameters

NameTypeDescription
namestringRequired. The display name of the tag.
colorstringRequired. The Hex color of the tag (without #).
isPublicbooleanRequired. true for public tags or false for private tags.

Example

POST <baseURL>/api/v1/tags
---
{
"name": "impact: big",
"color": "FE422D",
"isPublic": true
}

Response

200 OK
---
{
"id": 1003,
"name": "impact: big",
"slug": "impact-big",
"color": "FE422D",
"isPublic": true
}

Edit a Tag

  • Authentication: Required
  • Required Role: Administrator
PUT /api/v1/tags/{slug}

Parameters

NameTypeDescription
slugstringRequired. The slug of the tag to be edited.
namestringRequired. The display name of the tag.
colorstringRequired. The Hex color of the tag (without #).
isPublicbooleanRequired. true for public tags or false for private tags.

Example

PUT <baseURL>/api/v1/tags/impact-big
---
{
"name": "impact: small",
"color": "063589",
"isPublic": true
}

Response

200 OK
---
{
"id": 1003,
"name": "impact: small",
"slug": "impact-small",
"color": "063589",
"isPublic": false
}

Delete a Tag

  • Authentication: Required
  • Required Role: Administrator
DELETE /api/v1/tags/{slug}

Parameters

NameTypeDescription
slugstringRequired. The slug of the tag to be deleted.

Example

DELETE <baseURL>/api/v1/tags/impact-small

Response

200 OK
---
{}

Tag a Post

  • Authentication: Required
  • Required Role: Collaborator or Administrator
POST /api/v1/posts/{number}/tags/{slug}

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to add the tag.
slugstringRequired. The slug of the tag to be added.

Example

POST <baseURL>/api/v1/posts/47/tags/impact-big

Response

200 OK
---
{}

Untag a Post

  • Authentication: Required
  • Required Role: Collaborator or Administrator
DELETE /api/v1/posts/{number}/tags/{slug}

Parameters

NameTypeDescription
numbernumberRequired. The number of the post to remove the tag.
slugstringRequired. The slug of the tag to be removed.

Example

DELETE <baseURL>/api/v1/posts/47/tags/impact-big

Response

200 OK
---
{}