Tags
How to list, create, get, update and delete tags
Request Overview
Actions | Returns | Description |
---|---|---|
|
| Get all tags |
|
| Create tag |
|
| Get a tag |
|
| Update a tag |
|
| Delete a tag |
Fields
Tag Object
Field | Type | Required | Specifics |
---|---|---|---|
|
| yes | Some name |
|
| Auto slug of name | |
|
| Must be a valid hex. | |
|
|
|
Requests
Get All Tags
GET
/api/v1/tags Returns, a collection of tags
GET /api/v1/tags HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
200
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"data": [
{
"id": 1,
"name": "Question",
"slug": "question",
"color": "#1477EA",
"type": "tickets"
},
{
"id": 2,
"name": "Bug",
"slug": "bug",
"color": "#EE4E4E",
"type": "docs"
},
...
],
"links": {
...
},
"meta": {
...
}
}
Information about links and meta please read this article.
Create Tags
POST
/api/v1/tags Creates a new tag
POST /api/v1/tags HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
{
"name": "Question",
"slug": "question",
"color": "#1477EA",
"type": "tickets"
},
201
Response
HTTP/1.1 201 OK
Content-Type: application/json
...
{
"data": {
// Object like in get tag request
}
}
Get Tag
GET
/api/v1/tags/{id} Returns the tag object
GET /api/v1/tags/{{id}} HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
200
Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Encoding: gzip
...
{
"data": {
"id": 1,
"name": "Question",
"slug": "question",
"color": "#1477EA",
"type": "tickets"
},
}
Update Tag
PATCH
/api/v1/tags/{id} Returns the tag object
PATCH /api/v1/tags/{{id}} HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
{
"name": "Question-2",
"color": "#EE4E4E",
"type": "all"
},
200
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"data": {
// Object like in get tag request
}
}
Delete Tag
DELETE
/api/v1/tags/{id} Deletes an existing tag.
DELETE /api/v1/tags/{{id}} HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
200
Response
HTTP/1.1 200 OK
{
"message": "Object deleted permanently."
}