Write a stored document
PUT
Creates or replaces one document. Each field the manifest declares must have its type. A document over the plan's size limit, a collection over its document limit or a workspace over its store limit is refused with 413 and the limit named. Fields the manifest marks indexed are also kept so you can query on them; one marked personal is indexed only as a keyed hash.
Requires an API key with the workspace:write scope.
apiKeyheader
AuthorizationBearer <token>A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.
id*stringThe agent id.
collection*stringThe collection id.
docId*stringThe document id.
application/json- body
value*The document: a JSON object. It may not hold a key named $spans.
The document replaced
application/json- response
document*created*booleancurl -X PUT "https://api.vlayers.ai/v1/agents/$AGENT_ID/store/$COLLECTION/docs/$DOC_ID" \ -H "Authorization: Bearer $VOICELAYER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "value": { "status": "open", "total": 42 } }'Example Response
{ "document": { "collection": "orders", "id": "order-1001", "value": { "status": "open", "total": 42 }, "updatedAt": "2026-10-20T15:04:05.000Z" }, "created": true}