# Testing

> The Testing operations of the Kabu API: test-mode helpers with no side effects.

Test-mode helpers with no side effects.

Generated from the contract, version `2.0.0-draft.2` ([OpenAPI](/openapi.yaml)). Base URL `https://usekabu.com/api`. Errors are problem details, each [code](/docs/errors) with its own page.

## `POST /v2/test/messages/{message_id}/responses` · Respond to an ask (test keys only)

Lets a test-mode agent exercise every decision without a human. Live keys get 403.

- **Auth:** an API key.
- **Scopes:** `messages:write`.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `message_id` | path | string | yes | A `msg_…` id. |
| `Idempotency-Key` | header | string, at most 255 characters | no | Retry-safe key. For messages, sessions and responses it binds to the created object for its life; elsewhere for 24 h. |

**Request body**: [ResponseInput](/docs/api/responses#schema-ResponseInput).

| Status | Means | Body |
|---|---|---|
| `200` | OK | [Message](/docs/api/messages#schema-Message) |
| `4XX` | Error | [Problem](/docs/api/discovery#schema-Problem) |
| `5XX` | Error | [Problem](/docs/api/discovery#schema-Problem) |

```sh
curl -X POST "https://usekabu.com/api/v2/test/messages/$MESSAGE_ID/responses" \
  -H "Authorization: Bearer $KABU_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"decision":"approve"}'
```
