Skip to Content
Credits

Adjust credits

POST
/partner/customers/{customerId}/credits/adjustments

A signed correction with a reason. A negative amount takes credits from the available balance, soonest expiry first; more than is available is 402 INSUFFICIENT_CREDITS (the balance never goes below zero). A positive amount adds a lot like a grant and needs expires_at (422 CREDIT_EXPIRY_REQUIRED).

Scope: partner.manage. Rate limit: 300 requests per minute per API key.

Authorization

apiKey partner.manage
headerAuthorizationBearer <msk_live_…>

An API key created under API keys in the panel: Authorization: Bearer msk_live_…. The key's scopes decide which operations it may call.

Scope: partner.manage

Path Parameters

customerId*string

The sub-customer's id (not its external_id).

Formatuuid

Header Parameters

Idempotency-Key?string

Retry-safe POST: a repeated request with the same key replays the first successful response for 24 hours. Rejected requests (4xx/5xx) are not remembered, so a corrected request may reuse the key.

Length8 <= length <= 200

Request Body

application/json
  1. body
amount*integer

Credits to add (positive) or take away (negative); not 0.

Formatint64
Range-1000000000 <= value <= 1000000000
expires_at?string

Required for a positive amount.

Formatdate-time
reason*string
Length1 <= length <= 500

Response Body

Adjusted

application/json
  1. response
data*
meta*
Example Request
curl -X POST 'https://app.messora.tech/api/v1/partner/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/credits/adjustments' \  -H 'Content-Type: application/json' \  -d '{  "amount": -20,  "reason": "Duplicate grant on 1 December"}'
Example Response
{  "data": {    "balance": {      "available": 440,      "next_expiry": "2027-01-31T21:00:00Z",      "next_expiry_amount": 440,      "reserved": 40    },    "entries": [      {        "actor_type": "user",        "amount": -20,        "created_at": "2026-12-02T10:00:00Z",        "id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000301",        "kind": "adjust",        "lot_id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000101",        "reason": "Duplicate grant on 1 December",        "reference": "",        "reservation_id": null      }    ],    "lot": null  },  "meta": {    "request_id": "019a8c2e-4f1b-7fff-9c3d-5e7a1000ffff"  }}