> ## Documentation Index
> Fetch the complete documentation index at: https://help.pelion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Response and error codes

> Understand the HTTP status codes returned by the Pelion Portal API and how to respond to errors.

The success or failure of an API call is indicated by the [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) returned in the response.

## Types of status codes

Status codes are grouped into ranges by type.

| Range | Description |
| - | - |
| `2xx` | The call was successful. |
| `4xx` | The call failed due to an invalid request input. |
| `5xx` | The call failed due to an internal server error. |

The following table describes some example status and error codes you might see when using the API.

| Code | Description |
| - | - |
| `200` | The call was successful. |
| `400` | Error: one or more of the fields in the request body was not provided in your call. |
| `403` | Error: you do not have the user permission(s) required to perform this action. |
| `404` | Error: the requested resource was not found. |
| `429` | Error: you have reached the rate limit. |
| `503` | Error: the service is unavailable. |

## Respond to errors

An error in the 4xx range indicates a problem with the information provided in your call. For example, you might have provided a resource identifier that does not exist on your account. Review your call against the [API Reference](https://connectivity-eu.pelion.com/api-reference/) documentation and validate that the resources you identified exist on your account.

An error in the 5xx range indicates a temporary problem with the service.

## Rate limits

You can make a maximum of 500 requests every 60 seconds. The limit applies across the whole API, not to each endpoint. When you reach the limit, the API returns a `429` status code until the limit resets.

The response headers show how close you are to the limit.

| Header | Example | Description |
| - | - | - |
| `x-ratelimit-limit` | `500` | The maximum number of requests allowed in the timeframe. |
| `x-ratelimit-remaining` | `499` | The number of requests you have left in the timeframe. |
| `x-ratelimit-reset` | `50` | The number of seconds until the limit resets. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.