Create a Tag

POST /tags

Create a new tag for your organization.

Headers

  • Authorization string Required

    Authorize your API calls with an Arta API token

application/json

Body

  • tag object
    Hide tag attributes Show tag attributes object
    • color string Required

      The hexadecimal color code for the tag, without the leading #.

      Minimum length is 6, maximum length is 6. Format should match the following pattern: ^[0-9A-F]{6}$.

    • description string | null

      An optional, brief description for this tag.

      Maximum length is 255.

    • is_active boolean

      Indicates whether or not the tag is active. Inactive tags may not be associated to new resources.

      Default value is true.

    • name string Required

      The name for the tag. It may contain lower case letters, dashes, and alphanumeric characters only. The maximum character count is 50.

      Maximum length is 50. Format should match the following pattern: ^[a-z0-9-]{1,50}$.

Responses

  • 201 application/json

    A successfully created tag

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • color string

      The hexadecimal color code for the tag, without the leading #.

    • A NaiveDatetime-formatted timestamp describing when the tag was created with microsecond precision.

    • created_by integer | null

      The user ID associated with the user who created the tag when applicable.

    • description string | null

      An optional, brief description for this tag.

    • id string

      A UUID identifier for the tag.

    • is_active boolean

      Indicates whether or not the tag is active. Inactive tags may not be associated to new resources.

    • name string

      The name for the tag. It may contain lower case letters, dashes, and alphanumeric characters only. The maximum character count is 50.

    • A NaiveDatetime-formatted timestamp describing when the tag was created with microsecond precision.

    • updated_by integer | null

      The user ID associated with the last user to edit the tag when applicable.

  • 400 application/json

    Bad Request

    Hide response attribute Show response attribute object
    • errors object
      Hide errors attribute Show errors attribute object
POST /tags
curl \
 -X POST https://api.arta.io/tags \
 -H "Content-Type: application/json" \
 -H "Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y" \
 -d '{"tag":{"color":"0000FF","description":"string","is_active":true,"name":"la-warehouse"}}'
Request examples
# Headers
Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y

# Payload
{
  "tag": {
    "color": "0000FF",
    "description": "string",
    "is_active": true,
    "name": "la-warehouse"
  }
}
Response examples (201)
{
  "id": "32b7f7bb-e10d-417e-be56-f373c5f7db5e",
  "name": "ct-warehouse",
  "color": "D7D6D0",
  "is_active": false,
  "created_at": "2024-01-17T23:26:17.654177",
  "created_by": null,
  "updated_at": "2024-09-25T17:57:44.719863",
  "updated_by": null,
  "description": null
}
Response examples (400)
{
  "errors": {
    "detail": "string"
  }
}