Skip to main content
POST

Retrying a support operation

Send an optional idempotency_key (at most 128 characters) with any support operation: a plain operator message, tell, whisper, takeover, end, or close. Use Idempotency-Key as a header fallback when the body key is absent, null, or blank. A nonblank body key takes precedence and is preserved exactly, including surrounding whitespace. Without an effective key, requests follow the existing behavior and are not deduplicated.
A key identifies one operation across your account’s support namespace. Inbound-message keys use a separate namespace. Retry with the same session, command, exact message text, and effective operator identity. Message whitespace is significant; omitted and null messages are equivalent, as are omitted and null commands. For JWT-authenticated requests, the server uses the authenticated operator’s email and ignores any body operator_email. Gateway requests use operator_email after trimming surrounding whitespace; a blank email is treated as absent. Authentication and session ownership are checked again before any replay. An already reserved key remains bound to its operation. Retries never automatically take over a pending operation. in_progress can persist if a process dies before recording its final outcome; it does not prove that the execution is still running. Investigate a prolonged pending state before resubmitting. Completion records the operation’s final server result, including any deferred delivery attempt result. The existing meaning of delivery success stays the same. Unknown outcomes are never automatically re-executed or expired to allow execution. This contract does not promise exactly-once external delivery or a retention period beyond the stored receipt. Support keys are not automatically echoed in chat delivery callbacks. The callback’s idempotency_key field correlates inbound turns.

Authorizations

API-Token
string
header
required

16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.

Headers

Idempotency-Key
string

Optional support-operation key, used only when the body idempotency_key is absent, null, or blank. A nonblank body key wins and is preserved exactly, including surrounding whitespace. Scoped account-wide within the support namespace, separately from inbound-message keys.

Maximum string length: 128
Example:

"support-close-4718a326-1"

Path Parameters

id
string
required

The session UUID (from Create Session or Get Active Session).

Example:

"4718a326-417b-4dda-90d0-21fd65a11cb8"

Body

application/json
command
enum<string> | null

Control command to apply. Omit to send a plain operator message (requires the session to be in support mode).

Available options:
takeover,
tell,
whisper,
end,
close
Example:

"close"

message
string | null

Message text. Required for a plain operator message and for the tell command; optional context for takeover.

Example:

"A human agent is joining the conversation."

idempotency_key
string | null

Optional key for this exact support operation. A nonblank body key is preserved exactly, including surrounding whitespace, and takes precedence over Idempotency-Key; absent, null, or blank falls back to the header. Reuse the same key with the same session, command, exact message, and effective operator identity when retrying. Without an effective key, no deduplication occurs.

Maximum string length: 128
Example:

"support-close-4718a326-1"

operator_email
string | null

Optional operator email for gateway requests. Surrounding whitespace is trimmed and a blank email is treated as absent. For JWT-authenticated requests, the server always uses the authenticated user email and ignores this body field. The effective identity is part of the idempotency fingerprint.

Example:

"agent@yourco.com"

Response

Operation completed, or an existing command outcome such as busy. A completed keyed operation replays its saved result and status without repeating effects; completion records the final server result, including any deferred delivery attempt result. The response data includes state, session_id, and command; additional fields depend on the command (e.g. reply for tell, active_human for takeover). A busy outcome means nothing ran; retry with the same key and operation. Existing delivery-success semantics are unchanged.

success
boolean
Example:

true

data
object