zinn-agents

POST /v1/agents/{agentId}/memory

Buy N GB of extra memory for this agent, billed monthly per GB.

All zinn-agents endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The endpoint checks agents.manage, billing.payment.manage; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/agents/{agentId}/memory \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "gb": <integer> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Needs agents.manage and billing.payment.manage. Priced unit × gb in the chosen currency, taxed, and renewed monthly like every add-on; the agent restarts with the new memory within minutes. With no stored payment method nothing is charged: the purchase waits and 422 PAYMENT_METHOD_REQUIRED carries payment (the order to pay in place). Refused BEFORE any charge with 403 MEMORY_NOT_OPEN (not on sale yet), 409 MEMORY_NOT_RUNNING (paused agent or unpaid plan), 409 MEMORY_CEILING (one agent uses at most 8 GB), 409 MEMORY_POOL_FULL, 400 MEMORY_QUANTITY. Never bought twice by a repeat: an Idempotency-Key retry replays the first answer, and the same caller asking for the same GB on the same agent within 60 seconds (a double click, a retry with a fresh key) gets 200 naming the purchase already made — nothing is charged again.

Parameters

NameTypeRequiredWhat it is
agentId (path)stringYes—
Idempotency-Key (header)stringNoClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Request body

NameTypeRequiredWhat it is
gbintegerYes—
currencystringNoThe currency the customer was quoted in.
gatewaystringNoThe payment rail the customer chose.

Response

NameTypeRequiredWhat it is
purchase_idstringYes—
gbintegerYes—
statusstringYes—
memoryAgentMemoryYes—

Errors this endpoint can return

400 · 401 · 403 · 404 · 409 · 422