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

# API response codes

> Key response codes you may encounter while using the Kit API

## 401 | Unauthorized

We return the Unauthorized error in a variety of situations, including:

* the authentication method is configured incorrectly or not included on the call
* an API key is sent in an `Authorization: Bearer` header. Send an API key only in the `X-Kit-Api-Key` header.
* the incorrect authentication method is used. The bulk and purchase endpoints accept only OAuth. A request to these endpoints with an API key gets the error `OAuth authentication required`. See [API keys](https://developers.kit.com/api-reference/authentication.md#api-keys).
* an account no longer has access to apps (due to their trial lapsing, being on a free account, failed account payment etc.)

In order to troubleshoot this yourself, please check the error message, which will help you understand why access is not being granted. If this issue persists, please reach out to support.

## 413 | Too many bulk requests

If you try to enqueue too many bulk requests at once, you'll receive an error response with a `413` status code, which your code should gracefully handle. Details on [handling bulk processing can be found here](https://developers.kit.com/api-reference/bulk-and-async-processing.md).

## 422 | Bad data

When you create or update a field, you may receive an error response with status code `422` if any fields contain bad data or required fields are missing.

## 429 | Rate limiting

You get a `429` response when you send more requests than your rate limit allows. See [Rate limits](https://developers.kit.com/api-reference/rate-limits.md) for the limits, the response format, and how to handle a `429`.

## 500 | Internal server errors

If the server is overloaded or you encounter a bug, you will receive a response with status code `500`. Try again after a short period, and if you continue to encounter an error, please raise the issue with support.


## Related topics

- [API Authentication](https://developers.kit.com/api-reference/authentication.md)
- [Upgrading to V4](https://developers.kit.com/api-reference/upgrading-to-v4.md)
- [API Overview](https://developers.kit.com/api-reference/overview.md)
- [OAuth authorization](https://developers.kit.com/plugins/oauth-authorization.md)
- [Proof Key for Code Exchange (PKCE) flow](https://developers.kit.com/api-reference/oauth-proof-key-for-code-exchange-flow.md)


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