Skip to main content
Tag Creation API

Authentication

All requests require an API key in the request headers. Headers:

Request

Content-Type: application/json

Body Parameters

Data Type Values

Code Examples

Success Response

HTTP Status: 200 OK Response Fields:

Response Example

Error Responses

Reserved Tag Name

HTTP Status: 400 Bad Request

Tag Already Exists

HTTP Status: 400 Bad Request

Validation Error

Returned when a required field is missing or dataType is not one of the allowed values. HTTP Status: 400 Bad Request

Tag Creation Failed

In the rare case the tag could not be persisted, the response is returned with an HTTP 200 OK status, ok: false, and created: false. HTTP Status: 200 OK

Access Denied

HTTP Status: 403 Forbidden

Authentication Errors

HTTP Status: 401 Unauthorized

Permission Errors

HTTP Status: 403 Forbidden

Best Practices

  • The tag name is normalized into a slug (for example, Cost Center becomes cost-center) — that slug is returned as tag.id and is what you use in other tag APIs
  • Always check the created flag in addition to the HTTP status; a tag-creation failure is returned with ok: false and created: false under a 200 OK status
  • Create a DROPDOWN tag first, then add its selectable values with the Tag Value Creation API
  • Access is limited to users with tag create permission and an admin or bookkeeper role