Admin API errors
The Admin APIs return these HTTP status codes when a call fails. When the response has a body, it follows the Problem Details format (RFC 9457).
Status codes
| Status code | Meaning | Response body |
|---|---|---|
400 | The data in the request is invalid. | Usually a Problem Details body, often with an errors object that lists the invalid fields. A few endpoints return a short text message instead. |
401 | The call couldn’t be authenticated. | Usually no body. |
403 | The user or external system calling the API doesn’t have the permission it requires. | Usually no body. |
404 | The URL doesn’t match an API, or an ID in the URL doesn’t match an existing object. | Often a Problem Details body with more information. |
409 | Conflict – someone else changed the object after you read it, or the object already exists (for example, the user already has an authenticator app). | A Problem Details body. |
500 | An internal server error – for example a deadlock, a database timeout, or the database can’t be reached. | A Problem Details body. |
501 | The request is valid but not supported – for example, a combination of values the API doesn’t support, or a feature that isn’t included in your Authway edition (for example, adding an OpenID Connect or SAML sign-in method for an organisation on Starter). | A Problem Details body. |
503 | A temporary infrastructure problem. Try again later. | – |
Authway returns 501 rather than 400 for requests that are valid but not supported, so you find
most of them while you develop and test your integration. A 400 can still happen in production,
for example when end users enter invalid data.
Problem Details body
The body has these members:
| Member | Content |
|---|---|
type | A link that identifies the kind of error, based on the status code (for example a link to RFC 9110). about:blank if there is no link for the status code. |
title | A short, general description of the error, based on the status code. |
status | The HTTP status code. |
detail | A description of this occurrence of the error. |
instance | Identifies this occurrence of the error, in the format urn:uuid:<id>. Include it when you contact support. |
traceId | The trace ID of the request. Include it when you contact support. |
errors | Only when there are validation errors: an object that maps each field name to its error messages. |
The instance is a UUID created from the W3C trace ID of the request, so it identifies the same
request as the trace ID in logs. If the request has no W3C trace ID, instance is a new UUID, and
traceId holds the ID the server uses for the request.
Related
- Admin APIs – authentication, tenant-bound APIs and object IDs.
- Admin API reference – the responses each endpoint can return.