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 Required

    Additional properties are allowed.

    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 | null

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

    • 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

    The 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 #.

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

    • created_at string(date-time)

      A NaiveDatetime-formatted timestamp describing when the resource was created with microsecond precision

    • created_by integer(int64) | null

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

    • description string | null

      An optional, brief description for this tag.

      Maximum length is 255.

    • id string(uuid)

      The id of the tag in UUID format

    • 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.

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

    • updated_at string(date-time)

      A NaiveDatetime-formatted timestamp describing when the resource was last updated with microsecond precision

    • updated_by integer(int64) | null

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

  • 400 application/json

    Bad Request

    Hide headers attributes Show headers attributes
    Hide response attribute Show response attribute object
    • errors object

      Additional properties are allowed.

      Hide errors attribute Show errors attribute object
  • 403 application/json

    Forbidden

  • 422 application/json

    Unprocessible entity

    Hide response attribute Show response attribute object
    • errors object

      Additional properties are allowed.

      Hide errors attribute Show errors attribute object
      • detail string

        A human-readable explanation specific to this occurrence of the problem

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": "f7e4b35b-5131-47c2-9a88-238bd6e62e2d",
  "name": "ct-warehouse",
  "color": "008000",
  "is_active": false,
  "created_at": "2024-09-25T19:17:54.871490",
  "created_by": null,
  "updated_at": "2024-09-25T19:19:01.648283",
  "updated_by": null,
  "description": null
}
Response examples (400)
# Headers
content-type: application/json
x-arta-request-id: FkBjuxbwLLTx4RoAARkx

# Payload
{
  "errors": {
    "detail": "string"
  }
}
Response examples (422)
{
  "errors": {
    "detail": "string"
  }
}