Skip to Content
Credits

Grant credits

POST
/partner/customers/{customerId}/credits

Adds a lot of amount credits that expires at expires_at (required, in the future: 422 CREDIT_EXPIRY_REQUIRED otherwise). The Idempotency-Key header is required: a grant with a key this customer already used returns that grant (200) instead of adding credits again, for good (not only for 24 hours). Credits are spent soonest expiry first.

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

Required. A grant repeated with the same key returns the first grant instead of adding credits again, for as long as the lot exists.

Length8 <= length <= 200

Request Body

application/json
  1. body
amount*integer
Formatint64
Range1 <= value <= 1000000000
expires_at?string

Required, in the future (422 CREDIT_EXPIRY_REQUIRED otherwise).

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

Response Body

The grant made earlier with this Idempotency-Key

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' \  -H 'Idempotency-Key: inv-2026-12-1042' \  -H 'Content-Type: application/json' \  -d '{  "amount": 500,  "expires_at": "2027-01-31T21:00:00Z",  "reason": "December package"}'
Example Response
{  "data": {    "balance": {      "available": 500,      "next_expiry": "2027-01-31T21:00:00Z",      "next_expiry_amount": 500,      "reserved": 0    },    "lot": {      "amount": 500,      "created_at": "2026-12-01T09:00:00Z",      "expired_at": null,      "expires_at": "2027-01-31T21:00:00Z",      "id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000101",      "idempotency_key": "inv-2026-12-1042",      "reason": "December package",      "remaining": 500,      "reserved": 0,      "source": "grant"    }  },  "meta": {    "request_id": "019a8c2e-4f1b-7fff-9c3d-5e7a1000ffff"  }}