---
title: "Allocate credits to a client"
method: POST
path: "/v1/ai/credits/client/allocate"
tags: ["Credits"]
---

# Allocate credits to a client

`POST /v1/ai/credits/client/allocate`

## Request

- Base URL: `https://api.lindo.ai`
- URL: `https://api.lindo.ai/v1/ai/credits/client/allocate`
- Auth: HTTP bearer

Allocates credits from the workspace to a specific client. Requires client ownership verification.

## Request body

- AllocateClientCreditsRequest
  - `client_id` string, required: The ID of the client to allocate credits to
  - `credit_type` 'monthly' | 'purchased' | 'daily', required: Type of credits to allocate
  - `amount` number, required: Number of credits to allocate (must be positive)
  - `source` string: Source of the allocation (e.g. bonus, purchase)
  - `notes` string: Optional notes for the allocation

## Response `200`

Credits allocated successfully

- AllocateClientCreditsResponse
  - `success` true, required
  - `result` object, required
    - `allocation` object
      - `id` string, required
      - `client_id` string, required
      - `credit_type` string, required
      - `amount` number, required
      - `remaining` number, required
      - `source` string, required
      - `status` string, required
      - `created_at` string, required
    - `message` string
    - `balance` object, nullable, required
      - `monthly` number, required
      - `purchased` number, required
      - `daily` number, required
      - `total` number, required

## Other responses

- `400`: Invalid request - missing fields or invalid values
- `401`: Unauthorized - invalid or missing API key
- `403`: Forbidden - client does not belong to workspace
- `500`: Internal server error

---

[API](https://skmtc.dev/lindo/apis/lindo-unified-api.md) · [All operations](https://skmtc.dev/lindo/apis/lindo-unified-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lindo/apis/lindo-unified-api/revisions/2672f34525a4?raw)
