# Troubleshooting Contacts API error responses

This topic lists all the possible error responses you might encounter while using the Contacts API and how to resolve them.

## Working with errors

This section captures a list of common HTTP errors you might encounter and possible solutions to fix them.

| HTTP Error Code | OTA Error Code | Description | Reason and Possible Fix |
| --- | --- | --- | --- |
| HTTP 400 Bad Request | 150 | Changes are not permitted. | Can occur when trying to create a contact of type `general` using the `PUT` method given they already exist. Try to update the existing contacts. |
| HTTP 400 Bad Request | 320 | Invalid value. | The API returns `errors.details` and `errors.description` that captures which part of the request body contains invalid values and a description to help you troubleshoot the error.  To know more about the exact fields with invalid values, parse the `errors.details.fields`. For some fields, the API also returns allowed values.  For example, a request with an empty `contacts` array returns the description `Too many or too few ContactProfileType=general Entries are present for this property`. Include exactly one contact of type `general`. |
| HTTP 400 Bad Request | 321 | Required field missing. | Use the `errors.details` and `errors.description` field to identify the missing required fields and a description to help you troubleshoot the error.  To know more about the exact fields with missing values, parse the `errors.details.fields`. |
| HTTP 400 Bad Request | 394 | Invalid item. | Can occur when you specify an unknown parameter in the request. Make sure to specify the right parameters. |
| HTTP 400 Bad Request | 450 | Unable to process | Can occur due to an incorrect endpoint URL/HTTP method or invalid JSON body. Make sure to use the correct endpoint URL/HTTP method and check that the request has a valid JSON body. |
| HTTP 400 Bad Request | 635 | Data not found. | Occurs when the request body is empty. The API returns the description `No valid input found`. Send a request body that contains the `contacts` array. |
| HTTP 401 Unauthorized | - | - | Occurs when the bearer token is missing or invalid. The `errors` entry has an empty `message` and `code`, and `details` is `null`. Provide a valid bearer token in the `Authorization` header. |
| HTTP 403 Forbidden | 450 | Unable to process | Occurs when the request is not permitted for the property in the request path, for example when the property belongs to another account. When you use `PUT`, it also occurs when your provider is not certified for the Contacts API. The API returns the description `Forbidden`. Make sure to use the ID of a property that your account manages, and complete certification for the Contacts API. |
| HTTP 404 Not Found | 635 | Data not found. | Occurs when the property ID in the request path is not valid, for example when it contains letters. The API returns the description `Not found`. Make sure to use the correct numeric property ID. |

## Working with warnings

Some requests succeed but return a warning in the `warnings` array. The request returns HTTP 200 and the rest of the request is processed.

| HTTP Status Code | OTA Warning Code | Description | Reason and Possible Fix |
| --- | --- | --- | --- |
| HTTP 200 OK | 450 | `Contract Contact Ignored` (message: `Unable to process`) | Occurs when a contact in the request has `contract` as its `contact_profiles.type`. The Contacts API does not support this type, so it ignores that contact. The ignored contact is not returned by `GET` requests or when you retrieve the property details.  The `details.fields` value identifies the ignored entry, for example `$.contacts[4].contact_profiles[0].type`. Remove the `contract` contact from the request, or use a supported contact type.  If the request contains more than one `contract` contact, the API instead returns HTTP 400 with error code `320`. |

The following is an example warning response:

```json
{
  "warnings": [
    {
      "message": "Unable to process",
      "code": 450,
      "details": {
        "fields": "$.contacts[4].contact_profiles[0].type"
      },
      "description": "Contract Contact Ignored"
    }
  ],
  "errors": [],
  "meta": {
    "ruid": "<request-id>"
  }
}
```

## Quick Actions

→ To create and manage contact details, see [Managing contact details.](/connectivity/docs/contacts-api/implementing-contacts-api-ga)
→ To learn more about the Contacts API use cases, see [Contacts API implementation use cases.](/connectivity/docs/contacts-api/contacts-api-usecases/)
