Skip to main content
POST
/
v1
/
ai
/
credits
/
client
/
allocate
Allocate credits to a client
curl --request POST \
  --url https://api.lindo.ai/v1/ai/credits/client/allocate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "client_abc123",
  "credit_type": "purchased",
  "amount": 100,
  "source": "bonus",
  "notes": "Monthly credit top-up"
}
'
{
  "success": true,
  "data": {
    "balance": {
      "monthly": 123,
      "purchased": 123,
      "daily": 123,
      "total": 123
    },
    "allocation": {
      "id": "<string>",
      "client_id": "<string>",
      "credit_type": "<string>",
      "amount": 123,
      "remaining": 123,
      "source": "<string>",
      "status": "<string>",
      "created_at": "<string>"
    },
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Enter your API key (starts with lindo_sk_)

Body

application/json
client_id
string
required

The ID of the client to allocate credits to

Example:

"client_abc123"

credit_type
enum<string>
required

Type of credits to allocate

Available options:
monthly,
purchased,
daily
Example:

"purchased"

amount
number
required

Number of credits to allocate (must be positive)

Required range: x >= 1
Example:

100

source
string

Source of the allocation (e.g. bonus, purchase)

Example:

"bonus"

notes
string

Optional notes for the allocation

Example:

"Monthly credit top-up"

Response

Credits allocated successfully

success
enum<boolean>
required
Available options:
true
data
object
required