Skip to main content
POST
Send a workflow event
Preview. Workflow campaigns are being rolled out to pilot accounts.
Use this when a workflow waits for something to happen outside Osvi: a payment, a signed form, a visit. Put an Await block set to Event in the workflow, name the event (for example payment_received), and have your system send that event here with the contact’s phone number when it happens.
  • Early events count. An event that arrives before the contact reaches the Await is kept, and counts the moment they get there (as long as it arrived after they entered the workflow).
  • One event moves one contact on, once. Send a client_event_id to make retries safe.
  • What it brings. Later Conditionals can check the event’s data fields (for example, “amount is greater than 1000”).
  • Testing. In the workflow editor, an Await (event) block waiting in a test run has Send test event, and For your developer shows this request ready to copy.

Authorizations

API-Token
string
header
required

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

Path Parameters

id
integer
required

The workflow campaign's numeric id.

Body

application/json
event
string
required

The event's name, as the Await block names it.

Maximum string length: 100
Example:

"payment_received"

phone
string

The contact's phone number, as in their batch (10-digit Indian mobile numbers and +91 numbers are matched either way). Give this or run_ref.

Maximum string length: 32
Example:

"+919876543210"

run_ref
string

One run, as Logs shows it (R-1042), instead of a phone number. A test run is only reached this way.

Example:

"R-1042"

client_event_id
string

Your own id for the event. Sending the same id again changes nothing (safe retries).

Maximum string length: 200
Example:

"pay_8XK2"

data
object

Anything about the event later blocks can check, up to 8 KB.

Example:

Response

Event received.

success
boolean
Example:

true

data
object