Skip to main content
POST
/
attributes
curl -X POST "https://hub.banditshq.com/api/v1/attributes" \
  -H "Authorization: Bearer lasso_..." \
  -H "Content-Type: application/json" \
  -d '{
    "key": "color",
    "label": "Color",
    "type": "enum",
    "enum_values": ["Red", "Blue"]
  }'
{
  "id": "a1b2c3d4-...",
  "key": "color",
  "label": "Color",
  "type": "enum",
  "enum_values": ["Red", "Blue"],
  "tags_values": null,
  "boolean_config": null,
  "description": null,
  "validation": null,
  "is_reviewed": false,
  "source_id": null,
  "external_id": null,
  "source_synced_at": null,
  "created_at": "2026-06-21T10:00:00.000Z",
  "updated_at": "2026-06-21T10:00:00.000Z"
}
Create one attribute by sending key, label, and type. Re-posting the same key updates the attribute and returns 200 (first create returns 201). For sync workflows, send an attributes array to upsert up to 500 attributes per request.

Request body (single)

key
string
required
Stable key (letters, digits, underscores; must start with a letter).
label
string
required
Human-readable label.
type
string
required
One of: text, number, url, email, date, boolean, richtext, enum, tags, image, images, file, files, json.
enum_values
array
Allowed values when type is enum.
tags_values
array
Suggested values when type is tags.
description
string
Optional description.

Request body (bulk)

attributes
array
required
Array of attribute objects (same fields as single create). Max 500 per request.
curl -X POST "https://hub.banditshq.com/api/v1/attributes" \
  -H "Authorization: Bearer lasso_..." \
  -H "Content-Type: application/json" \
  -d '{
    "key": "color",
    "label": "Color",
    "type": "enum",
    "enum_values": ["Red", "Blue"]
  }'
{
  "id": "a1b2c3d4-...",
  "key": "color",
  "label": "Color",
  "type": "enum",
  "enum_values": ["Red", "Blue"],
  "tags_values": null,
  "boolean_config": null,
  "description": null,
  "validation": null,
  "is_reviewed": false,
  "source_id": null,
  "external_id": null,
  "source_synced_at": null,
  "created_at": "2026-06-21T10:00:00.000Z",
  "updated_at": "2026-06-21T10:00:00.000Z"
}