API/Error messages
Get started
Error messages
The EasyFreelance API uses HTTP status codes to indicate whether a request succeeded. The status code is the primary contract – the wording of the messages may change.
- Codes in The 2XX series means the request was processed without errors.
- Codes in The 4XX series means the request failed based on the information submitted.
- Codes in The 5XX series means an error on EasyFreelance's servers.
For 4XX responses, the response also contains information in response body that describes the cause of the error.
Status codes
| Code | Name | Meaning |
|---|---|---|
200 | OK | The request was processed. |
201 | Created | The resource was created – for example payouts, a login link or a verification session. |
400 | Bad Request | Client error or validation error. See the formats below. |
401 | Unauthorized | Missing, invalid or expired token / API key. |
403 | Forbidden | The resource exists, but belongs to another partner. |
404 | Not Found | The resource does not exist, or is not linked to your partner account. |
422 | Unprocessable Entity | Validation rejected by the framework – for example a return URL that is not approved. |
429 | Too Many Requests | The rate limit of 500 calls per minute has been exceeded. |
5XX | Server Error | An error on our side. Try again, and get in touch if it persists. |
Three formats
Which format you get depends on where in the stack the error occurs. Build your client on the status code first, and read the fields below as additional information.
1. Partner format: error
Most partner endpoints return an object with the key error. The value is either a string or a structured list.
{
"error": "User not found"
}2. Validation error: error + data
Validation errors that occur on otherwise valid requests are structured slightly differently. These are returned with status code 400, and the response contains the field names as keys in data-object.
{
"error": "Validation error",
"data": {
"email": [
"The email has already been taken."
]
}
}3. Framework format: message + errors
Some operations go through the framework's own validator and respond with 422 with message and errors.
{
"message": "The given data was invalid.",
"errors": {
"partner_return_url": [
"The partner return url has already been registered."
]
}
}429 and Retry-After
The rate limit is shared by the entire partner account: 500 requests per minute across all /api/v1-routes. If you exceed it, you get 429, and the response may include the header Retry-After with the number of seconds until the window resets.
Polling the verification status is the most common source of 429 among partners. Poll every 2–5 seconds, stop when the status is terminal, and consider employee.verified-webhook instead of frequent polling.
400 from idempotency keys
If you send the header Idempotency-key, the value must be a valid UUID – otherwise the API responds 400. If the key is already stored for your partner, the API also responds 400. See Idempotency.