Skip to main content
POST
Creates a flag and publishes it to your servers immediately.

Authorization

string
required
Bearer token for authentication. Format: Bearer <your-api-key>

Required Permission

FLAGS_WRITE

Body Parameters

string
required
The immutable slug your code reads the flag by, 1–64 characters. Must match ^[a-z0-9][a-z0-9_-]*$ — it starts with a lowercase letter or number and contains only lowercase letters, numbers, hyphens and underscores.
string
required
Human-readable name, 1–100 characters.
string
Optional description, up to 500 characters.
string
required
The kind of value this flag holds: boolean, string, number, or json.
JsonValue
required
The flag’s initial value. It is validated against type: a number flag must hold a finite number, a boolean flag true or false, and so on. Serialized size must not exceed 4 KB, and JSON values may not nest deeper than 4 levels.
string
default:"shared"
shared (your server and players’ clients) or server (your server only).
runtime defaults to shared, which means players’ clients can read the value. Anything holding a secret must be created with "runtime": "server".

Response

Returns the created flag — the same shape as a single entry in GET /flags — with status 201.

Status Codes