Idempotency
Retry writes safely without messaging a customer twice.
Send an Idempotency-Key header with any POST, PUT, PATCH or DELETE request:
curl -X POST https://api.resolido.com/v1/conversations/chat_k17…/reply \
-H "Authorization: Bearer $RESOLIDO_API_KEY" \
-H "Idempotency-Key: 4f1c2d8e-order-1042-shipped" \
-H "Content-Type: application/json" \
-d '{"text": "Your parcel left our warehouse today.", "then": "resolve"}'- Required for
customer_facingoperations (replies, emails, invitations, activating an agent) – without it they fail withidempotency_key_required. - Use a unique value per intended action, 8–128 characters of letters, digits and
_ . : -(a UUID works). - Retrying with the same key and the same request returns the stored response – the action runs only once.
- The same key with a different request fails with
idempotency_mismatch; while the first request is still running you getidempotency_in_progress. - Keys are kept for 24 hours.
The SDK and CLI add a key to every write automatically.
Replying safely
POST /conversations/{conversationId}/reply also accepts ifLastCustomerMessageId: the id of the newest customer message you answered. If the customer wrote again in the meantime, the reply is not sent and you get 409 conflict, so an agent never answers an outdated question.