Shipeasy
Flags experimentsApiOperations

List gate templates

Returns the merged targeting-rule template catalog — read-only built-ins first (the @team/@owner audience aliases, country, email-domain, region presets,…

Returns the merged targeting-rule template catalog — read-only built-ins first (the @team/@owner audience aliases, country, email-domain, region presets, …), then this project's customer templates. Each item carries a rules: [{ attr, op, value }] definition; the alias templates carry a symbol value (email in ["@team"]) that the SDK expands to the resolved email list at rebuild.

Turn "launch X in country Y" into a gated flag: list templates (optionally with q), take the matching template's rules, substitute the concrete value(s), and pass them as the rules arg of release_flags_create.

The catalog is small and bounded, so the full merged set is returned in one page — this endpoint is not paginated (next_cursor is always null; there are no limit/cursor params).

GET
/api/admin/gates/templates

Authorization

bearerSdkKey
AuthorizationBearer <token>

Pass an admin SDK key as Authorization: Bearer sdk_admin_…. Mint via POST /api/admin/keys with type: "admin".

In: header

Query Parameters

q?string

Case-insensitive substring filter across the resource's human-readable text columns (e.g. name, title, description). OR-matched across those columns; omit to return everything.

Lengthlength <= 100
query?stringDeprecated

Deprecated alias for q, kept working for one release. Prefer q.

Header Parameters

X-Project-Id?string

Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://shipeasy.ai/api/admin/gates/templates"
{
  "data": [
    {
      "id": "country",
      "name": "Country is",
      "description": "Target by ISO country code (resolve from GeoIP at the SDK edge before evaluating).",
      "category": "condition",
      "auto": true,
      "builtin": true,
      "iconKey": "globe",
      "rules": [
        {
          "attr": "country",
          "op": "in",
          "value": [
            "DE",
            "FR",
            "IT"
          ]
        }
      ],
      "createdAt": null,
      "updatedAt": null
    }
  ],
  "next_cursor": null
}
{
  "error": "Malformed request (bad JSON, missing project scope).",
  "code": "BAD_REQUEST"
}
{
  "error": "Missing or invalid admin SDK key.",
  "code": "UNAUTHORIZED"
}

{
  "error": "Key is valid but not allowed to act on this project.",
  "code": "FORBIDDEN"
}

{
  "error": "The request body failed structural (schema) validation.",
  "code": "VALIDATION"
}

Was this page helpful?
✎ Edit this page