invalid_request
# invalid_request The `invalid_request` error occurs when the API request is malformed or contains invalid parameters. --- ## Details * **HTTP Status:** `400 Bad Request` * **Retryable:** No * **Task State:** FAILED --- ## When does this occur? This error is returned when: * Required fields are missing from the request body (for example, `prompt` or `schedule_id`) * Parameter values are invalid or out of range * The request body cannot be parsed (malformed JSON) * A referenced identifier is in the wrong format * A team-owned task references a personal environment (team tasks require team-scoped environments) The `detail` field in the response will describe the specific validation issue. --- ## Example response ```json { "type": "/reference/api-and-sdk/troubleshooting/errors/invalid-request/", "title": "The request contains invalid or missing parameters.", "status": 400, "detail": "schedule_id is required", "instance": "/api/v1/agent/tasks", "error": "The request contains invalid or missing parameters. (schedule_id is required)", "retryable": false } ``` --- ## How to resolve 1. Check the `detail` field for the specific validation issue. 2. Correct the request parameters according to the [API documentation](/reference/api-and-sdk/). 3. Retry the request. --- ## Related * [Oz API & SDK](/reference/api-and-sdk/) — API request format and parametersThe request body is malformed, missing required fields, or contains invalid parameter values.
The invalid_request error occurs when the API request is malformed or contains invalid parameters.
Details
Section titled “Details”- HTTP Status:
400 Bad Request - Retryable: No
- Task State: FAILED
When does this occur?
Section titled “When does this occur?”This error is returned when:
- Required fields are missing from the request body (for example,
promptorschedule_id) - Parameter values are invalid or out of range
- The request body cannot be parsed (malformed JSON)
- A referenced identifier is in the wrong format
- A team-owned task references a personal environment (team tasks require team-scoped environments)
The detail field in the response will describe the specific validation issue.
Example response
Section titled “Example response”{ "type": "/reference/api-and-sdk/troubleshooting/errors/invalid-request/", "title": "The request contains invalid or missing parameters.", "status": 400, "detail": "schedule_id is required", "instance": "/api/v1/agent/tasks", "error": "The request contains invalid or missing parameters. (schedule_id is required)", "retryable": false}How to resolve
Section titled “How to resolve”- Check the
detailfield for the specific validation issue. - Correct the request parameters according to the API documentation.
- Retry the request.
Related
Section titled “Related”- Oz API & SDK — API request format and parameters