{"openapi":"3.0.2","info":{"title":"api Management API","description":"API for managing flags, targets, targeting rules, and reading audit logs.\n\n## Authentication\n\nEvery request must include a management API token as a Bearer token:\n`Authorization: Bearer <token>`. Use the **Authorize** button above to set a token\nfor \"Try it out\".\n\nTokens are scoped. Each operation below documents the scope it requires\n(`flags:read`, `flags:write`, `targets:write`, `audit:read`). A token missing the\nrequired scope gets a `403` even if the token itself is valid.\n\n## Error envelope\n\nMost errors return `{\"status\": \"error\", \"message\": \"...\"}`. The exception is\nrequest-body validation failures on write endpoints (`422`), which are rendered by\nLaravel's default validation handler and instead return\n`{\"message\": \"...\", \"errors\": {\"field\": [\"...\"]}}` \u2014 see `ManagementValidationError`\nin the schema list.\n\n## Rate limits\n\nEach token is rate limited per minute; limits vary by token tier. Every response\ncarries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`\nheaders. Exceeding the limit returns `429` with a `Retry-After` header.\n\n## Idempotency\n\n`POST` and `PUT` requests accept an optional `Idempotency-Key` header (max 255\nchars). Replaying the same key with the same request body and token returns the\noriginal response (marked with `X-Idempotent-Replayed: true`) instead of repeating\nthe operation.\n\n## Pagination\n\nList endpoints that support pagination are cursor-based: pass the previous\nresponse's `meta.next_cursor` as the `cursor` query parameter to fetch the next\npage. A `null` cursor means there are no more results. `per_page` defaults to 25\nand is capped at 100. Endpoints that return a bounded set (targets for a target,\nrules for a target) are not paginated.","version":"1.0.0"},"servers":[{"url":"https:\/\/api.zenmanage.com"}],"paths":{"\/management\/v1\/projects\/{projectKey}\/flags":{"get":{"tags":["Flags"],"summary":"List flags","description":"List flags for a project with optional filtering and cursor pagination. Requires the `flags:read` scope.","parameters":[{"name":"per_page","in":"query","description":"Items per page. Default 25, max 100.","required":false,"schema":{"default":25,"type":"integer","maximum":100,"minimum":1}},{"name":"type","in":"query","description":"Filter by flag type.","required":false,"schema":{"enum":["boolean","number","string"],"type":"string"}},{"name":"search","in":"query","description":"Filter by flag key or name (partial match).","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. Cursor-paginated list of flags for the project.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ManagementFlag"}},"meta":{"type":"object","properties":{"per_page":{"type":"integer","example":25},"next_cursor":{"type":"string","nullable":true},"prev_cursor":{"type":"string","nullable":true}}}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}},"post":{"tags":["Flags"],"summary":"Create a flag","description":"Create a new flag in the project. Requires the `flags:write` scope.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Optional. Replaying the same key with the same request body and token returns the original response instead of repeating the operation.","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"description":"Create a flag.","content":{"application\/json":{"schema":{"type":"object","required":["key","name","type"],"properties":{"key":{"description":"Lowercase, unique within the project. Letters, numbers, hyphens, and underscores only.","type":"string","pattern":"^[a-z0-9][a-z0-9\\-_]*$","maxLength":200,"example":"checkout-redesign"},"name":{"type":"string","maxLength":200,"example":"Checkout Redesign"},"type":{"enum":["boolean","number","string"],"type":"string"},"description":{"type":"string","maxLength":1000,"nullable":true},"include_in_mobile":{"default":true,"type":"boolean"},"include_in_client":{"default":true,"type":"boolean"}}}}},"required":true},"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementFlag"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"422":{"$ref":"#\/components\/responses\/ManagementValidationError"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/projects\/{projectKey}\/flags\/{flagKey}":{"get":{"tags":["Flags"],"summary":"Get a flag","description":"Get a single flag by key. Requires the `flags:read` scope.","parameters":[{"name":"projectKey","in":"path","description":"The project's key.","required":true,"schema":{"type":"string"}},{"name":"flagKey","in":"path","description":"The flag's key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementFlag"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}},"put":{"tags":["Flags"],"summary":"Update a flag","description":"Update an existing flag's name, description, permanence, and inclusion flags. Requires the `flags:write` scope.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Optional. Replaying the same key with the same request body and token returns the original response instead of repeating the operation.","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"description":"Update a flag. The key and type cannot be changed after creation.","content":{"application\/json":{"schema":{"type":"object","required":["name","permanent"],"properties":{"name":{"type":"string","maxLength":200,"example":"Checkout Redesign"},"description":{"type":"string","maxLength":1000,"nullable":true},"permanent":{"description":"Marks the flag as exempt from stale-flag cleanup prompts.","type":"boolean"},"include_in_mobile":{"type":"boolean"},"include_in_client":{"type":"boolean"}}}}},"required":true},"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementFlag"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"422":{"$ref":"#\/components\/responses\/ManagementValidationError"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}},"delete":{"tags":["Flags"],"summary":"Delete a flag","description":"Delete a flag. Requires the `flags:write` scope.","parameters":[{"name":"projectKey","in":"path","description":"The project's key.","required":true,"schema":{"type":"string"}},{"name":"flagKey","in":"path","description":"The flag's key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#\/components\/responses\/ManagementEmpty"},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/projects\/{projectKey}\/flags\/{flagKey}\/environments\/{environmentKey}\/targets":{"get":{"tags":["Targets"],"summary":"List targets","description":"List all targets for a flag\/environment, newest first. Requires the `targets:write` scope.","parameters":[{"name":"projectKey","in":"path","description":"The project's key.","required":true,"schema":{"type":"string"}},{"name":"flagKey","in":"path","description":"The flag's key.","required":true,"schema":{"type":"string"}},{"name":"environmentKey","in":"path","description":"The environment's key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. All targets for the flag\/environment, newest first. Not paginated.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ManagementTarget"}}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/projects\/{projectKey}\/flags\/{flagKey}\/environments\/{environmentKey}\/targets\/{targetUlid}":{"get":{"tags":["Targets"],"summary":"Get a target","description":"Get a single target by ULID. Requires the `targets:write` scope.","parameters":[{"name":"projectKey","in":"path","description":"The project's key.","required":true,"schema":{"type":"string"}},{"name":"flagKey","in":"path","description":"The flag's key.","required":true,"schema":{"type":"string"}},{"name":"environmentKey","in":"path","description":"The environment's key.","required":true,"schema":{"type":"string"}},{"name":"targetUlid","in":"path","description":"The target's ULID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementTarget"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/projects\/{projectKey}\/flags\/{flagKey}\/environments\/{environmentKey}\/targets\/{targetUlid}\/rollout":{"put":{"tags":["Targets"],"summary":"Update a target's rollout percentage","description":"Update the rollout percentage of a target. The target must be published and have an\nactive rollout. Requires the `targets:write` scope.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Optional. Replaying the same key with the same request body and token returns the original response instead of repeating the operation.","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"description":"Update the rollout percentage of a published target with an active rollout.","content":{"application\/json":{"schema":{"type":"object","required":["rollout_percentage"],"properties":{"rollout_percentage":{"type":"integer","maximum":100,"minimum":1,"example":50}}}}},"required":true},"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementTarget"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"422":{"$ref":"#\/components\/responses\/ManagementRolloutUpdateError"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/projects\/{projectKey}\/flags\/{flagKey}\/environments\/{environmentKey}\/targets\/{targetUlid}\/rules":{"get":{"tags":["Target Rules"],"summary":"List target rules","description":"List all targeting rules for a target, in evaluation order. Requires the `targets:write` scope.","parameters":[{"name":"projectKey","in":"path","description":"The project's key.","required":true,"schema":{"type":"string"}},{"name":"flagKey","in":"path","description":"The flag's key.","required":true,"schema":{"type":"string"}},{"name":"environmentKey","in":"path","description":"The environment's key.","required":true,"schema":{"type":"string"}},{"name":"targetUlid","in":"path","description":"The target's ULID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. All rules for the target, in evaluation order. Not paginated.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ManagementTargetRule"}}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}},"post":{"tags":["Target Rules"],"summary":"Create a target rule","description":"Create a new targeting rule on a target. Requires the `targets:write` scope.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Optional. Replaying the same key with the same request body and token returns the original response instead of repeating the operation.","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"description":"Create a targeting rule.","content":{"application\/json":{"schema":{"type":"object","required":["value_ulid","description","criteria"],"properties":{"value_ulid":{"description":"The flag value to serve when this rule matches.","type":"string"},"description":{"type":"string","maxLength":500,"example":"US-based enterprise accounts"},"criteria":{"type":"object","required":["selector","comparer"],"properties":{"selector":{"enum":["attribute","context","segment"],"type":"string"},"comparer":{"description":"Allowed values depend on `selector`: `context`\/`segment` allow equal, notequal, in, notin. `attribute` additionally allows gt, gte, lt, lte, isnull, notnull, contains, notcontains, startswith, endswith, notstartswith, notendswith.","enum":["equal","notequal","in","notin","gt","gte","lt","lte","isnull","notnull","contains","notcontains","startswith","endswith","notstartswith","notendswith"],"type":"string"},"sub_selector":{"description":"Attribute name, required when `selector` is `attribute`.","type":"string","nullable":true},"values":{"description":"Required (min 1) unless `comparer` is `isnull` or `notnull`, in which case it is omitted.","type":"array","items":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementTargetRule"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"422":{"$ref":"#\/components\/responses\/ManagementValidationError"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/projects\/{projectKey}\/flags\/{flagKey}\/environments\/{environmentKey}\/targets\/{targetUlid}\/rules\/{ruleUlid}":{"put":{"tags":["Target Rules"],"summary":"Update a target rule","description":"Replace an existing targeting rule's value, description, and criteria. Requires the `targets:write` scope.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Optional. Replaying the same key with the same request body and token returns the original response instead of repeating the operation.","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"description":"Replace a targeting rule's value, description, and criteria.","content":{"application\/json":{"schema":{"type":"object","required":["value_ulid","description","criteria"],"properties":{"value_ulid":{"description":"The flag value to serve when this rule matches.","type":"string"},"description":{"type":"string","maxLength":500,"example":"US-based enterprise accounts"},"criteria":{"type":"object","required":["selector","comparer"],"properties":{"selector":{"enum":["attribute","context","segment"],"type":"string"},"comparer":{"description":"Allowed values depend on `selector`: `context`\/`segment` allow equal, notequal, in, notin. `attribute` additionally allows gt, gte, lt, lte, isnull, notnull, contains, notcontains, startswith, endswith, notstartswith, notendswith.","enum":["equal","notequal","in","notin","gt","gte","lt","lte","isnull","notnull","contains","notcontains","startswith","endswith","notstartswith","notendswith"],"type":"string"},"sub_selector":{"description":"Attribute name, required when `selector` is `attribute`.","type":"string","nullable":true},"values":{"description":"Required (min 1) unless `comparer` is `isnull` or `notnull`, in which case it is omitted.","type":"array","items":{"type":"string"}}}}}}}},"required":true},"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"$ref":"#\/components\/schemas\/ManagementTargetRule"}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"422":{"$ref":"#\/components\/responses\/ManagementValidationError"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}},"delete":{"tags":["Target Rules"],"summary":"Delete a target rule","description":"Delete a targeting rule. Requires the `targets:write` scope.","parameters":[{"name":"projectKey","in":"path","description":"The project's key.","required":true,"schema":{"type":"string"}},{"name":"flagKey","in":"path","description":"The flag's key.","required":true,"schema":{"type":"string"}},{"name":"environmentKey","in":"path","description":"The environment's key.","required":true,"schema":{"type":"string"}},{"name":"targetUlid","in":"path","description":"The target's ULID.","required":true,"schema":{"type":"string"}},{"name":"ruleUlid","in":"path","description":"The rule's ULID.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#\/components\/responses\/ManagementEmpty"},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"404":{"$ref":"#\/components\/responses\/ManagementNotFound"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}},"\/management\/v1\/audit-logs":{"get":{"tags":["Audit Logs"],"summary":"List audit log entries","description":"List Management API audit log entries for the authenticated token's account, newest first\nby default. Requires the `audit:read` scope.","parameters":[{"name":"per_page","in":"query","description":"Items per page. Default 25, max 100.","required":false,"schema":{"default":25,"type":"integer","maximum":100,"minimum":1}},{"name":"sort","in":"query","description":"Sort order by creation time.","required":false,"schema":{"enum":["created_at_desc","created_at_asc"],"default":"created_at_desc","type":"string"}},{"name":"from","in":"query","description":"Only entries created at or after this timestamp.","required":false,"schema":{"format":"date-time","type":"string"}},{"name":"to","in":"query","description":"Only entries created at or before this timestamp.","required":false,"schema":{"format":"date-time","type":"string"}},{"name":"action","in":"query","description":"Filter by audit action.","required":false,"schema":{"enum":["auth.missing_token","auth.invalid_token","auth.expired_token","scope.denied","flag.listed","flag.read","flag.created","flag.updated","flag.deleted"],"type":"string"}},{"name":"result","in":"query","description":"Filter by audit result.","required":false,"schema":{"enum":["success","denied_auth","denied_scope","not_found","validation_error","server_error"],"type":"string"}},{"name":"subject_type","in":"query","description":"Filter by subject type (e.g. \"flag\", \"target\").","required":false,"schema":{"type":"string","maxLength":100}},{"name":"subject_ulid","in":"query","description":"Filter by subject ULID.","required":false,"schema":{"type":"string","maxLength":26}},{"name":"management_token_ulid","in":"query","description":"Filter by the management token that performed the action.","required":false,"schema":{"type":"string","maxLength":26}},{"name":"actor_ulid","in":"query","description":"Filter by the acting user.","required":false,"schema":{"type":"string","maxLength":26}},{"name":"cursor","in":"query","description":"Opaque cursor from a previous response's `meta.next_cursor`, for fetching the next page.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. Cursor-paginated audit log entries for the token's account.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ManagementAuditLogEntry"}},"meta":{"type":"object","properties":{"per_page":{"type":"integer","example":25},"sort":{"enum":["created_at_desc","created_at_asc"],"type":"string"},"next_cursor":{"type":"string","nullable":true}}}}}}}},"401":{"$ref":"#\/components\/responses\/ManagementUnauthorized"},"403":{"$ref":"#\/components\/responses\/ManagementForbiddenScope"},"422":{"$ref":"#\/components\/responses\/ManagementGenericError"},"429":{"$ref":"#\/components\/responses\/ManagementRateLimited"}}}}},"components":{"schemas":{"ManagementAuditLogEntry":{"type":"object","required":["ulid","action","result","status_code","created_at"],"properties":{"ulid":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","nullable":true},"ulid":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}}},"token":{"type":"object","properties":{"ulid":{"type":"string"},"name":{"type":"string"}},"nullable":true},"http_method":{"type":"string","nullable":true},"http_path":{"type":"string","nullable":true},"action":{"type":"string","example":"flag.updated"},"subject_type":{"type":"string","nullable":true},"subject_ulid":{"type":"string","nullable":true},"subject_label":{"type":"string","nullable":true},"result":{"type":"string","example":"success"},"status_code":{"type":"integer","example":200},"result_detail":{"type":"object","nullable":true},"before":{"type":"object","nullable":true},"after":{"type":"object","nullable":true},"request_id":{"type":"string","nullable":true},"ip_address":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"}}},"ManagementError":{"type":"object","required":["status","message"],"properties":{"status":{"enum":["error"],"type":"string","example":"error"},"message":{"type":"string","example":"Flag not found."}}},"ManagementFlag":{"type":"object","required":["ulid","type","key","name","permanent","include_in_mobile","include_in_client","created_at","updated_at"],"properties":{"ulid":{"type":"string","example":"01hqz3k1e9v8j2n8k9v8j2n8k9"},"type":{"enum":["boolean","number","string"],"type":"string"},"key":{"type":"string","example":"checkout-redesign"},"name":{"type":"string","example":"Checkout Redesign"},"description":{"type":"string","nullable":true,"example":"Rolls out the redesigned checkout flow."},"permanent":{"type":"boolean","example":false},"include_in_mobile":{"type":"boolean","example":true},"include_in_client":{"type":"boolean","example":true},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"}}},"ManagementTargetRuleCriterion":{"type":"object","required":["ulid","target_rule_ulid","selector","comparer","position"],"properties":{"ulid":{"type":"string"},"target_rule_ulid":{"type":"string"},"selector":{"enum":["attribute","context","segment"],"type":"string"},"sub_selector":{"type":"string","nullable":true},"comparer":{"enum":["equal","notequal","in","notin","gt","gte","lt","lte","isnull","notnull","contains","notcontains","startswith","endswith","notstartswith","notendswith"],"type":"string"},"position":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"contexts":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ulid":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"name":{"type":"string"},"identifier":{"type":"string"}}}}}},"segments":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ulid":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"}}}}}},"values":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ulid":{"type":"string"},"environment_ulid":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"}}}}}}}},"ManagementTargetRule":{"type":"object","required":["ulid","target_ulid","value_ulid","description","position","created_at","updated_at"],"properties":{"ulid":{"type":"string","example":"01hqz3k1e9v8j2n8k9v8j2n8k9"},"target_ulid":{"type":"string"},"value_ulid":{"type":"string"},"description":{"type":"string","example":"US-based enterprise accounts"},"position":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"criteria":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ManagementTargetRuleCriterion"}}}}}},"ManagementTarget":{"type":"object","required":["ulid","flag_ulid","environment_ulid","status","created_at","updated_at"],"properties":{"ulid":{"type":"string","example":"01hqz3k1e9v8j2n8k9v8j2n8k9"},"flag_ulid":{"type":"string"},"environment_ulid":{"type":"string"},"value_ulid":{"type":"string","nullable":true},"status":{"enum":["draft","scheduled","published","expired"],"type":"string"},"comment":{"type":"string","nullable":true},"rollout_percentage":{"type":"integer","maximum":100,"minimum":1,"nullable":true},"rollout_mode":{"enum":["manual","automatic"],"type":"string","nullable":true},"rollout_status":{"enum":["active","paused","completed"],"type":"string","nullable":true},"scheduled_at":{"format":"date-time","type":"string","nullable":true},"published_at":{"format":"date-time","type":"string","nullable":true},"expired_at":{"format":"date-time","type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"}}},"ManagementValidationError":{"type":"object","required":["message","errors"],"properties":{"message":{"type":"string","example":"The key field is required."},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"key":["The key field is required."]}}}}},"responses":{"ManagementEmpty":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"}}}}}},"ManagementForbiddenScope":{"description":"The token is valid but lacks the scope required for this operation.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"message":{"type":"string","example":"Token lacks required scope: flags:write"},"required_scope":{"type":"string","example":"flags:write"}}}}}},"ManagementGenericError":{"description":"Request could not be processed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ManagementError"}}}},"ManagementNotFound":{"description":"The requested resource, or one of its ancestors in the path, does not exist for this account.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ManagementError"}}}},"ManagementRateLimited":{"description":"The token has exceeded its per-minute request limit. Retry after the window resets.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ManagementError"}}}},"ManagementRolloutUpdateError":{"description":"Either the request body failed validation, or the target is not eligible for a rollout update (not published, or has no active rollout).","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/ManagementValidationError"},{"$ref":"#\/components\/schemas\/ManagementError"}]}}}},"ManagementUnauthorized":{"description":"Missing, invalid, revoked, or expired management API token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ManagementError"}}}},"ManagementValidationError":{"description":"The request body failed validation.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ManagementValidationError"}}}}},"securitySchemes":{"ManagementTokenAuth":{"type":"http","description":"Management API token, sent as a Bearer token: `Authorization: Bearer <token>`. Tokens are scoped \u2014 see the operation's required scope below.","scheme":"bearer","bearerFormat":"token"}}},"security":{"ManagementTokenAuth":[]},"tags":[{"name":"Flags","description":"Create, read, update, and delete feature flags."},{"name":"Targets","description":"Read targets and update rollout percentages."},{"name":"Target Rules","description":"Manage targeting rules attached to a target."},{"name":"Audit Logs","description":"Read the account audit trail for Management API activity."}]}