Skip to content

Create Lead

Endpoint

POST /api/v1/subscriber/CreateLead

This endpoint allows the creation of a new lead in the ISPCRM system.


Authorization

  • Type: Bearer Token
  • Header:
    Authorization: Bearer <your_token_here>
    

Request Body

  • Content-Type: application/json

JSON Parameters

Parameter Type Required Description
name string Yes Full name of the lead.
email string Yes Email address of the lead.
phone string Yes Phone number of the lead.
address string No Physical address of the lead.
remarks string No Additional remarks or notes.

Example Request

curl -X POST "https://yourispcrmdomain/api/v1/subscriber/CreateLead" \
-H "Authorization: Bearer YOURAPITOKENHERE" \
-H "Content-Type: application/json" \
-d '{
  "name": "John Doe",
  "email": "johndoe@example.com",
  "phone": "1234567890",
  "address": "123 Main St, City",
  "remarks": "Interested in 100 Mbps plan"
}'

Response

Success Response (200 OK)

{
  "success": true,
  "message": "Lead created successfully",
  "data": {
    "lead_id": 101,
    "status": "New"
  }
}

Explanation: - success - Indicates if the request was successful. - message - Confirmation message for the lead creation. - data - Contains lead details: - lead_id - Unique ID of the created lead. - status - Initial status of the lead (e.g., New).


Error Responses

400 Bad Request

{
  "success": false,
  "message": "Invalid request data"
}

Explanation: - This error occurs if the request body contains invalid or missing parameters.


401 Unauthorized

{
  "success": false,
  "message": "Unauthorized"
}

Explanation: - This error occurs if the Bearer Token is invalid or missing.


Example Response

{
  "success": true,
  "message": "Lead created successfully",
  "data": {
    "lead_id": 101,
    "status": "New"
  }
}

Summary

  • Create Lead is used to capture potential customer information in the ISPCRM system.
  • Ensures effective lead management by allowing additional remarks or notes.

For further assistance, contact our support team at support@netgroot.com.