Skip to content

Create a tag

POST
/tags
curl --request POST \
--url https://feed.work.optidata.cloud/api/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "hr", "color": "success" }'

Creates a tag. Only company administrators may do this; others get 403.

Media typeapplication/json
object
name
required
string
<= 35 characters
color
required
string
Allowed values: primary secondary success danger warning info dark
Examples
Exampleexample
{
"name": "hr",
"color": "success"
}

The created tag.

Media typeapplication/json

A tag that labels posts.

object
id
required
integer
name
required
string
slug
string
type
string | null
description
string | null
color
required
string
Allowed values: primary secondary success danger warning info dark
order_column
integer | null
created_at
string format: date-time
updated_at
string format: date-time
Examples
Exampleexample
{
"id": 89,
"name": "hr",
"slug": "hr",
"type": null,
"description": null,
"color": "success",
"order_column": 68,
"created_at": "2026-09-02T12:10:14.000000Z",
"updated_at": "2026-09-02T12:10:14.000000Z"
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key.

object
error
required
string
Examples
Exampleexample
{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller is not allowed to perform this action.

Media typeapplication/json
object
message
required
string
Examples
Exampleexample
{
"message": "This action is unauthorized."
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key.

object
error
required
string
Examples
Exampleexample
{
"error": "JWT passport expired: Passport expired"
}

The request failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleexample
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}