Create a tag
POST
/api/v1/tags
const url = 'https://your-orimora-instance.example.com/api/v1/tags';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","color":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-orimora-instance.example.com/api/v1/tags \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "color": "example" }'Creates a tag (or reuses an existing one with the same normalized name).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
color
Optional UI color #rrggbb
string | null
Example generated
{ "name": "example", "color": "example"}Responses
Section titled “ Responses ”Created (or reused) tag
Media type application/json
object
data
required
object
id
required
string format: uuid
name
required
Normalized (lowercased) tag name
string
color
required
Optional UI color #rrggbb
string | null
documentCount
Number of documents carrying this tag
integer
Example generated
{ "data": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "color": "example", "documentCount": 1 }}Validation error
Media type application/json
object
error
required
Human-readable error message
string
Example generated
{ "error": "example"}Unauthorized
Media type application/json
object
error
required
Human-readable error message
string
Example generated
{ "error": "example"}