Skip to content

Conversations API errors

The Conversations endpoints return errors in OpenAI’s nested error envelope — the same shape as the OpenAI Conversations and Responses APIs. This is intentionally different from the Agents API, which uses a flat { "error": string, "message": string } envelope.

Envelope

{
"error": {
"message": "Conversation not found.",
"type": "not_found_error",
"code": "not_found"
}
}

Status / type / code reference

StatustypecodeCause
400invalid_request_errorinvalid_cursor?after= references an item that does not exist in this conversation.
401Missing, malformed, or revoked API key. Emitted by the auth middleware before the route handler runs, so the body is the flat {"error": "Unauthorized", "message": "..."} shape — not the nested envelope shown above. Treat 401 as the one exception to the envelope rule on this surface.
403permission_errorforbiddenThe key authenticated, but the caller does not have access to this conversation.
404not_found_errornot_foundconversation_id or item_id does not exist, or the conversation has been pruned by retention.

See also