Errors

Errors use standard HTTP status codes and one JSON shape, with a stable code you can branch on.

HTTP/1.1 400 Bad Request
X-Request-Id: req_5f0c1e2a9b7d4c3e8f6a1b2c

{
  "error": {
    "type": "invalid_request_error",
    "code": "validation_failed",
    "message": "name: String must contain at least 1 character(s)",
    "param": "name",
    "request_id": "req_5f0c1e2a9b7d4c3e8f6a1b2c",
    "doc_url": "https://developer.v77trust.com/errors#validation_failed"
  }
}

Branch on error.code, not on message: messages are for people and may be reworded. type groups codes: authentication_error, permission_error, invalid_request_error, not_found_error, conflict_error, plan_limit_error, rate_limit_error, api_error.

Error codes

CodeStatusMeaning
missing_api_key401No Authorization header. Send Authorization: Bearer v77_…
invalid_api_key401The key is wrong or was revoked.
insufficient_role403The key's role can't do this. Use a key with the role shown in the reference.
validation_failed400A field is missing or invalid. param names the field.
invalid_json400The body isn't valid JSON.
invalid_parameter400A query parameter has a value that isn't allowed.
parameter_missing400A required query parameter is missing.
invalid_limit400limit must be 1–100.
invalid_cursor400cursor isn't a next_cursor value from this API.
invalid_idempotency_key400Idempotency-Key is longer than 255 characters.
unknown_question400An answers key isn't a classification question id.
unknown_control400No control with that code. See GET /controls.
unknown_event400Not a webhook event type. See GET /webhook-events.
invalid_url400Webhook URLs must be public HTTPS addresses.
invalid_target400The red-team target must be a public HTTPS address.
plan_limit_reached402Your plan's limit (e.g. number of high-risk systems or storage) is reached. kind, used and limit say which.
resource_missing404No object with that id in this workspace.
not_classified404The system has no classification yet (409 on endpoints that need one). Classify it first.
no_assessment409The system has no assessment. Classifying it opens one.
idempotency_key_reused409This Idempotency-Key was used for a different request.
idempotency_in_progress409A request with this Idempotency-Key is still running. Retry shortly.
content_unavailable410The evidence file is no longer stored.
file_too_large413Evidence files can be at most 25 MB.
unsupported_media_type415Evidence must be sent as multipart/form-data.
evidence_required422A control can't be marked implemented without evidence linked to it.
rate_limited429Too many requests. Wait Retry-After seconds.
internal_error500Something failed on our side. Retry with the same Idempotency-Key; contact us with the request_id if it persists.
target_failed502The model you asked us to red-team didn't respond.