2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).
Codes in the 5xx range indicate an error with folk’s servers.
Error response
The error response contains a singleerror object that includes the following properties:
code: The code that identifies the error.message: A human-readable description of the error.documentationUrl: An URL to the documentation that describes the error.timestamp: The timestamp when the error occurred.requestId: The request identifier.
4xx errors that could be handled programmatically (e.g., validation errors) include a details property that provides more information about the error.
Refer to each specific error in order to see if a details property is available and its shape.
Error list
The errors that could be returned by folk’s API are the following:Bad request
Status code:400The request was malformed or invalid.
Unauthorized
Status code:401Access to the resource is unauthorized. This error is usually returned when the API key is invalid or not provided. Always make sure to provide an API key in the
Authorization header.Read more about authentication in the authentication section.
Forbidden
Status code:403Access to the resource is forbidden. This error is usually returned when the API key doesn’t have permissions to perform the operation.
Not found
Status code:404The requested resource was not found. This error is usually returned when a resource that is being requested doesn’t exist.
Unprocessable entity
Status code:422The request contains invalid data. This error is usually returned when there is a validation error in the body or query parameters of the request. The
details object includes an array of issues describing each validation rule that has failed validation. You can find an exaustive list of all available properties on the official Zod documentation.
Rate limiting
Status code:429The rate limit for the operation has been exceeded. The
details object offers additional information about the rate limit and the reset time. It includes the following properties:
limit: The maximum number of requests allowed per minute.remaining: The number of requests remaining in the current rate limit window.retryAfter: The ISO 8601 Datetime when the rate limit will be reset.
Internal server error
Status code:500An error occurred on the server. If this error is returned, it means folk’s servers encountered an error while processing the request.
If the error persists, please contact support and include the
requestId shown in the response.
Service unavailable
Status code:503The service is temporarily unavailable. If this error is returned, it means folk’s servers are temporarily unavailable.
folk strives to keep the service available at all times, but sometimes it’s necessary to perform maintenance or upgrades. If the error persists, please contact support and include the
requestId shown in the response.