Docs
Open dashboard

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

  • contactstringrequired
    The contact's phone number.
  • our_numberstringnullableoptional
    Limit to the conversation on this workspace number.

Response 200 OK

Conversation ended.

  • contactstringoptional
    The contact number
  • our_numberstringnullableoptional
    The workspace number the match was scoped to
  • ended_runsintegeroptional
    How many waiting automation runs were cancelled.

Errors

  • 400Bad Request
    Validation failed / malformed request.
  • 401Unauthorized
    Missing, malformed, or invalid API key.
  • 403Forbidden
    Workspace unavailable, suspended, or paywalled.
  • 429Too Many Requests
    Workspace request limit exceeded; shared across all its API keys.