# Error Response

> Status code is 400 or higher. Mostly '400'.
>
> Error Response is __JSON Object__ that has a key, __`message`__.
>
> `message` is JSON Object that consists of `msg` and `error_code`.

## **Structure**

|               | key              | description                              |
|---------------|------------------|------------------------------------------|
| __`message`__ |                  |                                          |
|               | __`msg`__        | explanation about what causes the error. |
|               | __`error_code`__ | code of the error.                       |

## **Error Codes**

> While each API has different `error_code`s, there are also common `error_code`s like the below.

| status code | error code            | description                                                                |
|-------------|-----------------------|----------------------------------------------------------------------------|
| `401`       | `auth/not-authorized` | `Authoriazation` value in headers is not valid. Please check your api key. |
| `403`       | `auth/not-authorized` | Your api-key is not allowed to perform this API. Please [contact our sales team](https://typecast.ai/contact). |


<details open>
<summary>Example</summary>

```json
    {
      "message": {
        "msg": "not authorized",
        "error_code": "auth/not-authorized"
      }
    }
```

</details>