---
updatedAt: 2026-09-23T02:17:54.000Z
agentTools:
  projectIndex: https://docs.kyshi.co/llms.txt
---

# Responses And Errors

> The response envelope and error model are covered in full on [How The Kyshi API Works](https://docs.kyshi.co/docs/how-the-api-works) and [Errors](https://docs.kyshi.co/docs/error). This page is a short primer for readers working directly in the API Reference.

Successful API responses are wrapped in a consistent envelope.

```json
{
  "status": true,
  "message": "Success",
  "code": 200,
  "data": {}
}
```

For create operations, `code` is usually `201`. For successful reads, `code` is usually `200`.

# Error Shape

Errors use the same top-level structure, with `status` set to `false`.

```json
{
  "status": false,
  "message": "Bad Request",
  "code": 400,
  "data": "amount must not be less than 1"
}
```

Validation errors may place the field-level reason in `data`. Build your integration around the HTTP status code and the `status` boolean, then show or log `message` and `data` for debugging.

# Common Status Codes

| Code  | Meaning                                     | What To Do                                                                     |
| :---- | :------------------------------------------ | :----------------------------------------------------------------------------- |
| `200` | Request completed successfully.             | Read the returned `data`.                                                      |
| `201` | Resource or action created successfully.    | Store returned identifiers and references.                                     |
| `400` | Invalid request.                            | Check required fields, enum values, and data types.                            |
| `401` | Invalid or missing API key.                 | Check `x-api-key` and environment.                                             |
| `403` | Authenticated but not allowed.              | Check business permissions or endpoint access.                                 |
| `404` | Resource not found.                         | Confirm ID, reference, mode, and ownership.                                    |
| `422` | Request understood but cannot be processed. | Check business rules such as unsupported currency or insufficient balance.     |
| `500` | Server error.                               | Retry safely where appropriate and contact support with the request reference. |

# Safe Retry Guidance

Retry read operations safely. For create or payment operations, send your own unique `reference` where the endpoint supports it so retries can be reconciled without creating confusion in your system.