Mark Converted API

The Mark Converted API allows you to mark a lead as converted in your database. This is particularly useful when conversions happen outside of the chat (e.g., on your website or during a call) and you want to sync this status back into TailorTalk.

If the conversion came with an order, use the Mark Order API instead. It records the order amount and products and marks the lead converted in the same call.

API Endpoint

https://api.tailortalk.ai/api/v1/mark_converted

Headers

Key Value
Authorization Agent <token>

You can find agent_token on the Developer page, under the API Keys tab. Click the eye icon to reveal it, or the copy icon to copy it.

text

Request Body

Parameter Required Description
contact_ids ✅ List of WhatsApp numbers (with country code, e.g., "919876543210", a leading + is fine) or Instagram user IDs

Example Request

{
    "contact_ids": [
        "919876543210",
        "919812345678"
    ]
}

Response Format

The API returns a JSON object confirming the status update. The response payload is wrapped automatically under a data field with success: true:

{
    "data": {
        "message": "Leads marked as converted.",
        "updated_count": 2,
        "not_found": []
    },
    "success": true
}
  • updated_count is the number of leads that changed. A lead that was already converted isn't counted again.
  • not_found lists the contact IDs that didn't match any lead of this agent. They are skipped.

Notes

  • Ensure that the agent access token is included in the request headers.
  • Contacts that match a lead are marked converted even when others in the same request don't match. The request only fails if none of the contacts match a lead.
  • This marks the lead permanently converted (is_converted). That flag never turns itself off, so the customer still shows as converted after they move on to a support question. For sales leads, the lead_status is also set to converted, and it is re-read from the conversation as it continues.
XLinkedIn