Request Status Codes

You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong and do some rudimentary debugging (before contacting support). A successful request will be returned with status code 200.


Status codes

Here is a list of the different categories of status codes returned by the currencyapi API. Use these to understand if a request was successful.

  • Name
    200
    Type
    Description

    A 200 status code indicates a successful response.

  • Name
    403
    Type
    Description

    A 403 status code indicates that you are not allowed to use this endpoint, please upgrade your plan.

  • Name
    404
    Type
    Description

    A 404 status code indicates that a requested endpoint does not exist.

  • Name
    422
    Type
    Description

    A validation error, please check the list of validation errors: here

  • Name
    429
    Type
    Description

    A 429 status code indicates that you have hit your rate limit or your monthly limit. For more requests please upgrade your plan.

  • Name
    500
    Type
    Description

    A 500 status code indicates a internal server error - let us know: support@currencyapi.com


Validation errors

Here is a list of the different categories of status codes returned by the currencyapi API. Use these to understand if a request was successful.

  • Name
    Invalid currencies
    Type
    Description

    One of the selected currencies is invalid, to get a full list of all currencies you can use the /currencies endpoint.

  • Name
    Invalid base_currency
    Type
    Description

    The selected base_currency is invalid, to get a full list of all currencies you can use the /currencies endpoint.

  • Name
    Invalid date
    Type
    Description

    The date is not a valid date. Please use the following format: YYYY-MM-DD

  • Name
    Chronological order issue: datetime_start
    Type
    Description

    The datetime_start must be a date before or equal to datetime_end

  • Name
    Invalid datetime_start
    Type
    Description

    The datetime_start is not a valid date. Datetime for the start of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime)

  • Name
    Chronological order issue: datetime_end
    Type
    Description

    The datetime_start must be a date before or equal to datetime_end

  • Name
    Invalid datetime_end
    Type
    Description

    The datetime_start is not a valid date. Datetime for the end of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime)

  • Name
    Invalid accuracy
    Type
    Description

    The selected accuracy is invalid. Possible Values: day, hour, quarter_hour, minute, default: day