POST/v1/tags

Create a custom tag

Write the question so that yes means the request matches, and put what counts and what does not in definition. Guardrails and routing rules can use the tag within a minute. A taken id answers 409 tag_exists; an organization at its limit answers 409 tag_limit_reached.

Authentication: Bearer API key in the Authorization header

Request body

  • idstringrequired

    The id you use in rules. camelCase, at most 64 characters.

  • descriptionstringrequired

    A short label for people.

  • questionstringrequired

    A yes or no question about the request. Yes means the request matches.

  • definitionstring

    What counts as yes and what does not. Examples of both make the answer sharper.

Responses

  • 201

    The created tag.

    Response
    • idstringrequired

      The id you use in rules. camelCase, at most 64 characters.

    • sourceenumrequired

      platform for a built-in tag, organization for one you created.

      "platform""organization"
    • descriptionstringrequired

      A short label for people.

    • questionstring

      The yes or no question asked about the request. Shown on your own tags only.

    • definitionstring

      What counts as yes and what does not. Shown on your own tags only.

    • created_atstring
    • updated_atstring
  • 401

    Missing, unknown or revoked API key.

  • 403

    The key is not a provisioning key, or the resource is read-only (tag_read_only, guardrail_read_only).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 404

    The resource does not exist or belongs to another organization. An organization without access gets this answer on every route.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 409

    The id is taken (tag_exists), or your organization holds as many custom tags as it may (tag_limit_reached).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

  • 422

    The body failed validation, or it names something that does not exist or cannot be used (unknown_tag, unknown_model, unknown_identity, model_not_allowed).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one.

Request

curl -X POST 'https://api.experientiallabs.ai/v1/tags' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "internalConfidential",
  "description": "Confidential company information",
  "question": "Does the message contain confidential company information?",
  "definition": "Confidential: unreleased product plans, customer records, contract terms, internal financial figures, network or security designs. Not confidential: published press releases, public pricing, general industry knowledge."
}'

Response

{
  "id": "internalConfidential",
  "source": "organization",
  "description": "Confidential company information",
  "question": "Does the message contain confidential company information?",
  "definition": "Confidential: unreleased product plans, customer records, contract terms, internal financial figures, network or security designs. Not confidential: published press releases, public pricing, general industry knowledge.",
  "created_at": "2026-11-20T00:00:00Z",
  "updated_at": "2026-11-20T00:00:00Z"
}

https://api.experientiallabs.ai/v1/tags