Error response format
Most error responses follow this shape:401 and 500 — may return an empty body or a plain-text message depending on where in the request lifecycle the failure occurs.
Error codes
400 Bad Request
Your request was understood but contained invalid or missing data.-
A required field is missing from the request body. For example, creating a dataset without providing
repositoryId. -
The request body is malformed JSON. Verify that your payload is valid and that you have set
Content-Type: application/json. -
An OData
$filterexpression references a column that does not exist in the dataset. The error message will look like:Check the column names in the dataset exactly as they appear — column names are case-sensitive.
401 Unauthorized
Your request did not include valid credentials, or no credentials were provided at all. Common causes and fixes:-
Missing API key — Include your API key via HTTP Basic Auth or the
?apiKey=query parameter. See the API overview for the correct format. -
Key in the wrong field — When using Basic Auth, the API key must be the username, not the password. A common mistake is reversing these:
- Invalid or revoked key — Verify your key in Alphacast account settings. If you recently regenerated it, update any integrations that use the old key.
402 Payment Required
The action you attempted requires a higher membership tier than your current plan provides.- Creating an additional private repository beyond your plan’s limit.
- Fetching data from a paid-tier provider while on a free plan.
- Downloading data that exceeds your plan’s monthly export quota.
403 Forbidden
Your credentials are valid, but you do not have permission to perform this action on the requested resource. Common causes:- You are attempting to write to (or delete from) a repository where you only have Read permission. Contact the repository owner to request Write access.
- You are trying to access a private resource that belongs to another account.
404 Not Found
The resource you requested does not exist.- The dataset or repository ID in the URL is wrong. Double-check the ID in the Alphacast UI or via a
GET /datasetslist request. - The resource was deleted after you last retrieved its ID.
409 Conflict
The request could not be completed because it conflicts with an existing resource.- Creating a dataset with a name that already exists in the same repository.
- Uploading data with a column manifest that conflicts with the dataset’s existing column types.
- Saving a provider API key while another concurrent request is updating the same key.
429 Too Many Requests
You hit a rate limit. Alphacast does not enforce a global API limit, but the provider connectors honor each upstream’s limits on your behalf — if FRED, BLS, or any other source caps requests per minute or per day, Alphacast surfaces that as a429.
- The upstream provider’s rate limit was reached. Save your own API key with
PUT /user-keys/{slug}to raise the limit (especially for FRED and BLS, which are far more generous with an authenticated key). - Many concurrent series fetches against the same provider. Serialize the calls or add backoff.
500 Internal Server Error
An unexpected error occurred on the server. This is not caused by your request. What to do:- Wait a moment and retry the request — transient errors often resolve on their own.
- If the error persists, note the endpoint, request body, and approximate time of the failure, then contact Alphacast support.
For errors that originate inside a provider connector, the response message is sanitized — it does not include upstream URLs, internal tokens, or stack traces. The unredacted detail is kept in Alphacast’s server logs, so include the endpoint and timestamp when filing a support request.
A
500 response is never caused by invalid input in your request. If you see one consistently for the same request, it is a server-side issue worth reporting.503 Service Unavailable
The API is temporarily unable to handle the request, typically because of a deploy in progress or an overloaded backend dependency. What to do: retry with exponential backoff. Most503 responses clear within a few seconds.
504 Gateway Timeout
The request took longer than the gateway timeout to complete. Most often this happens on long-running operations such as fetching the full history of a large provider series, or downloading a very wide dataset. What to do:- Narrow the response: pass
$top,$last, or$filtertoGET /datasets/{id}/data, or restrict the date range when fetching provider series. - Retry the same request after a short delay — transient timeouts often resolve.
Debugging checklist
If you are not sure which error applies to your situation, work through this checklist:- Check the status code — The HTTP status in the response headers is always the authoritative signal.
- Read the error message — The
errorfield in the JSON body usually describes the problem specifically. - Confirm authentication — Re-run the request with
curl -vto inspect theAuthorizationheader being sent. - Validate your JSON — Paste your request body into a JSON validator to catch syntax errors before sending.
- Verify resource IDs — Fetch the parent resource (e.g.,
GET /repositories) to confirm the IDs you are using still exist. - Check column names in filters — If using
$filter, list the dataset columns first withGET /datasets/{id}/columnsto confirm exact names.