Endpoint
POST https://api.vivi.bot/channelsApi/{channelId}/conversations/triggerAPI reference
View the complete request and response schema in ReDoc.
Before you start
You need:- A configured Twilio Phone, SIP Trunk, Twilio SMS, or Microsoft Teams & Copilot channel.
- The channel ID, available from the channel details page in VIVI.
- An active account or workspace API credential and its
clientId,clientSecret,audience, andtokenUrl.
Request an access token
Exchange your API credentials for an access token. Cache and reuse the token until it is close to expiring.cURL
Authorization: Bearer YOUR_ACCESS_TOKEN.
Request body
string
required
The message or voice prompt to send. Maximum 4,000 characters. Use
{variable} placeholders to personalize the message for each recipient.array
required
One or more recipients. The default maximum is 100 recipients per request. Every recipient contains a channel-specific
target and optional metadata values.string
required
The destination. Its accepted format depends on the channel type. Maximum 256 characters.
object
String values used to replace placeholders in
messageTemplate. Every recipient must provide every variable used by the template. Maximum encoded size: 4 KB per recipient.object
Optional string metadata for your own request context. Maximum encoded size: 8 KB.
Channel examples
ReplaceYOUR_CHANNEL_ID and YOUR_ACCESS_TOKEN in the examples below. The channel ID must belong to the same account as the API credential.
- Twilio Phone
- SIP Trunk
- Twilio SMS
- Microsoft Teams
Use an E.164 phone number, including
+ and the country code. VIVI starts a voice call from the first phone number configured on the channel.Response
The endpoint returns201 Created after processing the batch. A successful HTTP response can contain both successful and failed recipients, so inspect every item in results. Results remain in the same order as the request.
Voice and SMS dispatches normally return
initiating. Microsoft Teams returns completed after provider confirmation. Recipient-specific failures return failed with an error object.
Retries, idempotency, and rate limits
Partial failures
Partial failures
A
201 response means that the batch was processed, not that every recipient succeeded. Retry only results where error.retriable is true, and send a new request containing only those recipients. Generate a new Idempotency-Key for the retry request.Idempotency-Key
Idempotency-Key
The optional
Idempotency-Key header prevents a concurrent duplicate from dispatching twice while the first request is processing. The reservation is released after processing completes, so reusing the key later executes the request again and can create a duplicate.Rate limit
Rate limit
Each workspace accepts 60 trigger requests per rolling 60-second window. A
429 response includes a Retry-After header with the number of seconds to wait.Request errors
Error responses include a stable
code, a human-readable message, a retriable flag, and a request_id for support and log correlation.
