Our API uses HTTP status codes to indicate the success or failure of an API request.
2xx: indicates a successful request
4xx: indicates a failed request due to a developer or user-related error(s)
5xx: indicates a failed request due to a Railway-related issue(s)
Error schema
Name
Type
Description
error_type
string
A broad categorization of the error that delineates by the responsible entity (ex: Railway, the developer, the patient, the EHR, etc). It is safe for programmatic use
error_message
string
A developer-friendly message explaining the error. It is not intended for your customer.
error_code
string
An optional field that categorizes the broad error type in more detail. It is safe for programmatic use.
detail
string[]
An optional array of error messages. It is only included for validation errors (ex: invalid POST request body).
HTTP status code summary
Status Code
Description
200 - OK
Success
400 - Bad Request
A malformed request, not adhering to the endpoint’s specification.
401 - Unauthorized
A valid secret key was not provided.
403 - Forbidden
The provided secret key does not have the required permissions for the API request.
404 - Not Found
The resource does not exist.
429 - Too Many Requests
The rate limits have been exceeded. Wait before retrying.
500 - Server Error
An unexpected error within Railway’s servers.
Error types
The error_type is a broad categorization that delineates by the responsible entity (ex: Railway, the developer, the patient, the EHR, etc).
Error Type
Reason
Resolution
server_error
The error is caused by Railway.
Retry once after 30 seconds. If the issue persists, contact us at [email protected] as the issue is likely not ephemeral.
invalid_request
The error is caused by the developer. Ex: invalid request body parameters.
You will need to update the API request being sent. Ensure you have proper error logging and handling for the various error_codes defined below.
Error codes
An optional field that categorizes the broad error type in more detail.
Error code
Description
resource_not_found
The request was sent to a non-existent resource or a resource the secret key doesn't have access to.
invalid_body_parameters
The API request body contained invalid parameters. Check the endpoint's API specification.
invalid_query_parameters
The API request contained invalid query parameters. Check the endpoint's API specification.
A secret key was not passed in the Authorization header. Read more here.
invalid_secret_key
A valid secret key was not passed in the Authorization header. Read more here.
missing_index_version
The requested endpoint requires an index version. Read more here.
invalid_index_version
An invalid index version was provided; it either doesn't exist or is not associated with the provided secret key. Read more here.
forbidden_index_operation
The requested operation could not be performed on the requested index. This can happen when you are attempting to modify a read-only index. Read more here.
invalid_schedule_id
The provided schedule_id does not exist, is not accessible with the provided secret key, or is not associated with the provided index version.
invalid_patient_id
The provided patient_id does not exist, is not accessible with the provided secret key, or is not associated with the provided index version.
invalid_slot
The provided slot (start_at and/or duration) does not exist or is not available on the schedule anymore.