Skip to content

validation_failed

HTTP status: 400 Bad Request

One or more fields failed validation. The fields object maps each invalid field to its messages. Keys are the field’s camelCase JSON path as you sent it, such as key or conditionGroups[0].conditions. JSON that doesn’t parse is keyed by the field where parsing stopped, and an error about the body as a whole, such as an empty body, is keyed body.

  • A key that isn’t lowercase kebab-case.
  • A missing required field.
  • A field of the wrong JSON type, such as 1.5 where a whole number is expected.
  • An empty body, or JSON that doesn’t parse.
  • A value outside its allowed set (e.g. an unknown flag type).

Read the fields object and correct each listed field. See the API Reference for each field’s rules.

A request refused by a plan cap has its own code. Creating a project, environment, flag or webhook past the plan, restoring an archived flag into a full project, or turning on, test-sending or redelivering to a webhook subscription a downgrade left over the plan’s allowance gets plan_limit_reached (403). Before that code existed these came back here, with the reason filed under fields.organizationId, fields.projectId, fields.isEnabled or fields.webhookSubscriptionId.

{
"error": "validation_failed",
"message": "One or more fields are invalid.",
"docs_url": "https://featureflip.io/docs/management-api/errors/validation_failed",
"fields": {
"key": ["Key must be lowercase kebab-case."]
}
}