Get API key

    Reference/Chat

    POST/v1/agents/:id/threads

    Create a chat thread

    Create a thread before streaming messages. Save the returned thread id.

    Full URL

    POST https://api.tryleadreach.com/v1/agents/:id/threads

    Headers

    • X-Api-Key (required): your API key from the app Keys tab.
    • Content-Type: application/json (required)

    Path params (in the URL)

    NameTypeRequiredMeaning
    iduuidYesThe agent's id (from Create agent or List agents).

    Query params (after ?)

    None

    Request body (JSON)

    FieldTypeRequiredMeaning
    titlestringNoOptional label for the thread.

    Example request (JSON)

    What you send: headers, and path / query / body when used.

    {
      "headers": {
        "X-Api-Key": "lr_your_key_here",
        "Content-Type": "application/json"
      },
      "path": {
        "id": "a1111111-1111-1111-1111-111111111111"
      },
      "body": {
        "title": "Outreach"
      }
    }

    Example response (JSON)

    Typical successful response shape.

    {
      "thread": {
        "id": "t1111111-1111-1111-1111-111111111111",
        "title": "Outreach",
        "agentId": "a1111111-1111-1111-1111-111111111111"
      }
    }

    Response

    201 with { "thread": { "id": "…", … } }.

    Credits

    0