Skip to main content
POST
/
v1
/
sessions
/
{session_id}
/
conversion
Record Conversion
curl --request POST \
  --url https://api.zelinqa.ai/v1/sessions/{session_id}/conversion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "outcome": "purchase",
  "metadata": {
    "order_value": 1290,
    "currency": "EUR"
  }
}
'
{
  "conversion_id": "cv_4a7b9c0d1e2f3a4b5c6d7e8f",
  "request_id": "req_77a8b9c0d1e2f3a4"
}

Authorizations

Authorization
string
header
required

Pass your NBQ API key in the Authorization header: Bearer nbq_live_xxx

Headers

Idempotency-Key
string<uuid>
required

A client-generated unique key (UUID recommended). Safe to retry with the same key.

Path Parameters

session_id
string
required

The session ID used when calling /v1/next-questions.

Body

application/json
outcome
enum<string>
required

The outcome of the conversation.

Available options:
purchase,
lead,
abandon,
other
Example:

"purchase"

metadata
object

Free-form key/value details for your own use. Not interpreted by NBQ. Maximum 4096 bytes serialized.

Example:
{ "order_value": 1290, "currency": "EUR" }

Response

Conversion recorded

conversion_id
string

Identifier of the recorded conversion.

Example:

"cv_4a7b9c0d1e2f3a4b5c6d7e8f"

request_id
string

Unique ID for this request. Include in any support request.

Example:

"req_77a8b9c0d1e2f3a4"