End SMS conversation
POST/sms/conversations/end
Ends the chat with a contact: every automation run waiting on a reply from that number is cancelled, so a later reply no longer continues the flow. Pass our_number to end only the conversation on that workspace number. Messages already sent are unaffected, and the contact is not unsubscribed. Returns how many runs were ended, which is 0 when nothing was waiting. Works without credits.
Requires
Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.Body application/json
- contactstringrequiredThe contact's phone number.
- our_numberstringnullableoptionalLimit to the conversation on this workspace number.
Response 200 OK
Conversation ended.
- contactstringoptionalThe contact number
- our_numberstringnullableoptionalThe workspace number the match was scoped to
- ended_runsintegeroptionalHow many waiting automation runs were cancelled.
Errors
- 400Bad RequestValidation failed / malformed request.
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.