# HTTP Response

#### HTTP Response

**400 BAD REQUEST**

**Error: Missing required values for the keys.**\
Method: POST\
Status: 400 BAD REQUEST\
Body:

```json
jsonCopyEdit{
  "key": [
    "This field is required."
  ]
}
```

**Error: Incorrect value provided for the key.**\
Example: Passing 'en23' instead of 'en' in the 'language' key.\
Method: POST\
Status: 400 BAD REQUEST\
Body:

```json
jsonCopyEdit{
  "key": [
    "A valid {type} is required."
  ]
}
```

**Error: Incorrect format of the value.**\
Occurs when the value provided is not of the correct type.\
Method: POST\
Status: 400 BAD REQUEST\
Body:

```json
jsonCopyEdit{
  "key": [
    "\"{value}\" is not a valid {choices}."
  ]
}
```

**401 UNAUTHORIZED**

**Error: Missing access token.**\
No access token provided.\
Authorization type: Bearer Token\
Method: GET, POST, DELETE, PUT\
Status: 401 UNAUTHORIZED\
Body:

```json
jsonCopyEdit{
  "detail": "Authentication credentials were not provided."
}
```

**Error: Invalid token format.**\
Occurs when there is a mistake in the token (e.g., missing or incorrect characters).\
Authorization type: Bearer Token\
Method: GET, POST, DELETE, PUT\
Status: 401 UNAUTHORIZED\
Body:

```json
jsonCopyEdit{
  "detail": "Error decoding signature."
}
```

**404 NOT FOUND**

**Error: Data operation does not exist through the provided ID in the URL path.**\
Example: `/rest-api/phonebook/{id}`\
Method: GET, POST, DELETE, PUT\
Status: 404 NOT FOUND\
Body:

```json
jsonCopyEdit{
  "detail": "Not found."
}
```
