# test

Echo for debugging. Returns the JSON body it received, without clientKey. No key check, no charge.

`POST https://unlock-api.com/test`

## Request parameters

No required parameters. Send any JSON body.

## Request

```json
{
  "clientKey": "YOUR_API_KEY",
  "hello": "world"
}
```

## Response

### Success

```json
{
  "errorId": 0,
  "received": {
    "hello": "world"
  }
}
```

## Response fields

| Name | Type | Description |
|---|---|---|
| `errorId` | Integer | 0 when the request worked, 1 when it did not. |
| `received` | Object | The body that was sent, without clientKey. |

## Code samples

### cURL

```bash
curl -s https://unlock-api.com/test \
  -H "Content-Type: application/json" \
  -d '{"clientKey":"YOUR_API_KEY","hello":"world"}'
```

### Python

```python
import requests

r = requests.post("https://unlock-api.com/test", json={
    "clientKey": "YOUR_API_KEY",
    "hello": "world"
}).json()
print(r)
```

### Node.js

```javascript
const r = await fetch("https://unlock-api.com/test", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "clientKey": "YOUR_API_KEY",
    "hello": "world"
  }),
}).then((res) => res.json());
console.log(r);
```
