Logo
Platform updates
Leads

Create lead

Create a new lead in the OtoniStark system

POST

/ user / lead

This endpoint allows you to create a new lead in the OtoniStark system.

Request body

phone_number string required

The phone number of the lead in E.164 format (e.g. +1234567890)


campaign_id integer required

The ID of the campaign to create the lead for


variables object

The variables to pass to the lead

customer_name string default:"<string>"

The name of the customer


email string default:"<string>"

The email of the customer



allow_dupplicate boolean

Whether to allow duplicate leads in a campaign.


secondary_contacts array

Array of secondary contact leads to createlead

phone_number string required

The phone number of the secondary contact in E.164 format


variables object

The variables to pass to the secondary contact


customer_name string default:"<string>"

The name of the secondary contact


email string default:"<string>"

The email of the secondary contact



Response

message string default:"Lead created successfully"

The message of the response


data object

The lead data object

id integer

The unique ID of the created lead


campaign_id integer

The ID of the campaign this lead belongs to


phone_number string

The phone number of the lead in E.164 format


variables object

The variables associated with the lead

customer_name string default:"<string>"

The name of the customer


email string default:"<string>"

The email of the customer



status string default:"created"

The status of the lead


created_at string

The timestamp when the lead was created


updated_at string

The timestamp when the lead was updated


campaign object

The campaign object

id integer

The id of the campaign


name string

The name of the campaign


secondary_contacts array

Array of secondary contact leads associated with this lead

id integer

The id of the secondary contact lead


phone_number string

The phone number of the secondary contact in E.164 format


variables object

The variables associated with the secondary contact


status string

The status of the secondary contact


created_at string

The created at date of the secondary contact


updated_at string

The updated at date of the secondary contact

Create lead
200 Response
{
  "message": "Lead created successfully",
  "data": {
    "id": 1,
    "campaign_id": 1,
    "phone_number": "+1234567890",
    "variables": {
      "customer_name": "John Doe",
      "email": "john.doe@example.com"
    },
    "status": "created",
    "created_at": "2025-06-30 11:53:20",
    "updated_at": "2025-06-30 11:53:20",
    "campaign": {
      "id": 1,
      "name": "My new campaign"
    },
    "secondary_contacts": [
      {
        "id": 2,
        "phone_number": "+1234567891",
        "variables": {
          "customer_name": "Jane Doe Secondary",
          "email": "jane.doe.secondary@example.com"
        },
        "status": "created",
        "created_at": "2025-06-30 11:53:20",
        "updated_at": "2025-06-30 11:53:20"
      },
      {
        "id": 3,
        "phone_number": "+1234567892",
        "variables": {
          "customer_name": "Bob Doe Office",
          "email": "bob.doe.office@example.com"
        },
        "status": "created",
        "created_at": "2025-06-30 11:53:20",
        "updated_at": "2025-06-30 11:53:20"
      }
    ]
  }
}