Shipeasy
Flags experimentsApiOperations

Update a feature gate

Partial update — only supplied fields change. Array fields (rules, stack) replace wholesale; there is no merge or append.

name and the gate id are immutable. The response carries only { id } — re-fetch via GET /api/admin/gates for the new row.

Use cases
  • Ramp rollout{ "rollout_pct": 5000 } for 50%. Basis points (0–10000); 100 = 1%.
  • Kill switch{ "enabled": false }. Forces evaluation to false for every caller regardless of rules/rollout. Re-enable with POST /{id}/enable or { "enabled": true }.
  • Modify a rule's in set — send the full new rules array. To add 'GB' to ['US','CA']: { "rules": [{ "attr": "country", "op": "in", "value": ["US","CA","GB"] }] }. No per-rule patch endpoint.
  • Add targeting from scratch{ "rules": [{ "attr": "email", "op": "regex", "value": "@acme\\.com$" }] }.
  • Switch to gatekeeper stack — send a non-null stack. To revert to flat eval, send { "stack": null }.
  • Update metadata — any subset of title, description, folder, group, owner_email.
PATCH
/api/admin/gates/{id}

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

Path Parameters

id*string

Stable opaque gate id (gat_…).

Header Parameters

X-Project-Id*string

Project the request operates on. Must match the project the SDK key belongs to.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://shipeasy.ai/api/admin/gates/string" \  -H "X-Project-Id: string" \  -H "Content-Type: application/json" \  -d '{    "rollout_pct": 5000  }'
{
  "id": "gat_01j7w7m9q4hxbf6npe6s9zr3vc"
}
{
  "error": "string",
  "code": "string",
  "detail": "string"
}
{
  "error": "string",
  "code": "string",
  "detail": "string"
}
{
  "error": "string",
  "code": "string",
  "detail": "string"
}
{
  "error": "string",
  "code": "string",
  "detail": "string"
}
{
  "error": "string",
  "code": "string",
  "detail": "string"
}
{
  "error": "string",
  "code": "string",
  "detail": "string"
}