Skip to Content
Lead Management API

Lead Management API

The Lead Management API allows you to manage leads in your TaskIP CRM system. You can create, read, update, and delete leads, track lead statuses and sources, manage notes and files, and convert leads into contacts.

Endpoints Overview

MethodEndpointDescription
GET/api/public-v1/leadGet all leads
POST/api/public-v1/leadCreate a new lead
GET/api/public-v1/lead/{id}Get a specific lead
PUT/api/public-v1/lead/{id}Update a lead
DELETE/api/public-v1/lead/{id}Delete a lead
POST/api/public-v1/lead/bulk-deleteDelete multiple leads
POST/api/public-v1/lead/send-email/{id}Send email to a lead
POST/api/public-v1/lead/{id}/convertConvert lead to contact
GET/api/public-v1/lead/notes/{lead_id}Get all notes for a lead
POST/api/public-v1/lead/notes/{lead_id}Create a note for a lead
PUT/api/public-v1/lead/notes/{lead_id}Update a lead note
DELETE/api/public-v1/lead/notes/{lead_id}Delete a lead note
GET/api/public-v1/lead/files/{lead_id}Get files for a lead
POST/api/public-v1/lead/files/{lead_id}Upload files to a lead
DELETE/api/public-v1/lead/files/bulk-delete/{lead_id}Bulk delete lead files
GET/api/public-v1/lead-attributeGet all lead attributes
POST/api/public-v1/lead-attributeCreate a lead attribute
GET/api/public-v1/lead-attribute/{id}Get a specific lead attribute
PUT/api/public-v1/lead-attribute/{id}Update a lead attribute
DELETE/api/public-v1/lead-attribute/{id}Delete a lead attribute

Get All Leads

Retrieve a paginated list of all leads in your system.

GET /api/public-v1/lead

Request Headers

X-Secret-Key: your-secret-key-here Content-Type: application/json

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by name, email, or company
itemintegerNoResults per page (default: 10, use 0 for all)
is_convertedintegerNo0 = active leads, 1 = converted leads
status_idintegerNoFilter by lead attribute status ID
source_idintegerNoFilter by lead attribute source ID
assigned_tointegerNoFilter by assigned user ID
from_datedateNoFilter from interaction date (Y-m-d)
to_datedateNoFilter to interaction date (Y-m-d)
sort_bystringNoSort field: name, lead_interaction_date, status
sort_orderstringNoSort direction: asc or desc (default: desc)

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/lead?search=john&item=10&is_converted=0" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "message": "All leads successfully fetched", "data": [ { "id": 1, "first_name": "John", "last_name": "Doe", "full_name": "John Doe", "email": "john@example.com", "phone_number": "01700000000", "website": "https://example.com", "company_id": 2, "company": { "id": 2, "name": "Acme Corp", "email": "company@acmecorp.com", "phone_number": "01700000000" }, "value": 5000.00, "currency": "USD", "lead_interaction_date": "2026-04-01", "assigned_to": [], "country_id": 1, "country": "United States", "state_id": 2, "state": "California", "city_id": 3, "city": "San Francisco", "address": "123 Main Street", "zip_code": "94105", "description": "Interested in premium plan", "created_by": 1, "converted": 0, "converted_contact_id": null, "converted_at": null, "statuses": [], "sources": [], "groups": [], "custom_fields": [], "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-01T10:00:00.000000Z" } ], "links": { "first": "https://public-api.taskip.net/api/public-v1/lead?page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "https://public-api.taskip.net/api/public-v1/lead", "per_page": 10, "to": 1 } }

Create a Lead

Create a new lead in your system.

POST /api/public-v1/lead

Request Headers

X-Secret-Key: your-secret-key-here Content-Type: application/json

Request Body

FieldTypeRequiredDescription
first_namestringYesLead’s first name (max 100 chars)
last_namestringNoLead’s last name (max 100 chars)
emailstringYesLead’s email address (must be unique)
phone_numberstringNoLead’s phone number
websitestringNoLead’s website URL
company_idintegerNoExisting company ID
valuenumericNoLead deal value
currencystringNoCurrency code (e.g. USD)
lead_interaction_datedateNoDate of interaction (Y-m-d format)
assigned_toarrayNoArray of user IDs to assign
status_idsarrayNoArray of lead attribute IDs (status type)
source_idsarrayNoArray of lead attribute IDs (source type)
groupsarrayNoArray of lead group IDs
country_idintegerNoCountry ID
state_idintegerNoState ID
city_idintegerNoCity ID
addressstringNoLead’s address
zip_codestringNoZIP / postal code
descriptionstringNoAdditional notes or description
custom_fieldsarrayNoArray of custom field objects

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "555-0123", "website": "https://example.com", "company_id": 2, "value": 5000, "currency": "USD", "lead_interaction_date": "2026-04-01", "status_ids": [1], "source_ids": [3], "description": "Interested in premium plan" }'

JavaScript Example

const leadData = { first_name: "John", last_name: "Doe", email: "john.doe@example.com", phone_number: "555-0123", website: "https://example.com", company_id: 2, value: 5000, currency: "USD", lead_interaction_date: "2026-04-01", status_ids: [1], source_ids: [3], description: "Interested in premium plan" }; const response = await fetch('https://public-api.taskip.net/api/public-v1/lead', { method: 'POST', headers: { 'X-Secret-Key': 'your-secret-key-here', 'Content-Type': 'application/json' }, body: JSON.stringify(leadData) }); const result = await response.json();

Example Response

{ "msg": "Lead Created", "data": { "id": 1, "first_name": "John", "last_name": "Doe", "full_name": "John Doe", "email": "john.doe@example.com", "phone_number": "555-0123", "website": "https://example.com", "company_id": 2, "company": null, "value": 5000.00, "currency": "USD", "lead_interaction_date": "2026-04-01", "assigned_to": [], "country_id": 1, "country": "United States", "state_id": 2, "state": "California", "city_id": 3, "city": "San Francisco", "address": "123 Main Street", "zip_code": "94105", "description": "Interested in premium plan", "created_by": 1, "converted": 0, "converted_contact_id": null, "converted_at": null, "statuses": [], "sources": [], "groups": [], "custom_fields": [], "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-01T10:00:00.000000Z" } }

Get a Specific Lead

Retrieve the full details of a specific lead by ID.

GET /api/public-v1/lead/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesLead ID

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/lead/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "msg": "Lead Details", "data": { "id": 1, "first_name": "John", "last_name": "Doe", "full_name": "John Doe", "email": "john.doe@example.com", "phone_number": "555-0123", "website": "https://example.com", "company_id": 2, "company": { "id": 2, "name": "Acme Corp", "email": "company@acmecorp.com", "phone_number": "01700000000" }, "value": 5000.00, "currency": "USD", "lead_interaction_date": "2026-04-01", "assigned_to": [], "country_id": 1, "country": "United States", "state_id": 2, "state": "California", "city_id": 3, "city": "San Francisco", "address": "123 Main Street", "zip_code": "94105", "description": "Interested in premium plan", "created_by": 1, "converted": 0, "converted_contact_id": null, "converted_at": null, "statuses": [ { "id": 1, "name": "New", "type": 1, "color": "#3498db", "order": 1 } ], "sources": [ { "id": 3, "name": "Website", "type": 2, "color": "#2ecc71", "order": 1 } ], "groups": [], "activities": [], "custom_fields": [], "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-01T10:00:00.000000Z" } }

Update a Lead

Update an existing lead’s information.

PUT /api/public-v1/lead/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesLead ID to update

Request Body

Same fields as Create a Lead. first_name is required; all other fields are optional — only include fields you want to change.

Example Request

curl -X PUT "https://public-api.taskip.net/api/public-v1/lead/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "first_name": "John", "phone_number": "555-9999", "value": 7500, "description": "Follow-up scheduled for next quarter" }'

Python Example

import requests headers = { 'X-Secret-Key': 'your-secret-key-here', 'Content-Type': 'application/json' } update_data = { "first_name": "John", "phone_number": "555-9999", "value": 7500, "description": "Follow-up scheduled for next quarter" } response = requests.put( 'https://public-api.taskip.net/api/public-v1/lead/1', headers=headers, json=update_data ) result = response.json()

Example Response

{ "msg": "Lead Updated", "data": { "id": 1, "first_name": "John", "last_name": "Doe", "full_name": "John Doe", "email": "john.doe@example.com", "phone_number": "555-9999", "value": 7500.00, "currency": "USD", "description": "Follow-up scheduled for next quarter", "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-07T10:00:00.000000Z" } }

Delete a Lead

Permanently delete a specific lead from your system.

DELETE /api/public-v1/lead/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesLead ID to delete

Example Request

curl -X DELETE "https://public-api.taskip.net/api/public-v1/lead/1" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "msg": "Lead Deleted Successfully" }

Bulk Delete Leads

Delete multiple leads at once.

POST /api/public-v1/lead/bulk-delete

Request Body

FieldTypeRequiredDescription
idsarrayYesArray of lead IDs to delete

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead/bulk-delete" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3] }'

Example Response

{ "msg": "Lead Deleted Successfully" }

Send Email to a Lead

Send a custom email directly to a lead.

POST /api/public-v1/lead/send-email/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesLead ID to email

Request Body

FieldTypeRequiredDescription
subjectstringYesEmail subject (max 255 chars)
messagestringYesEmail body content

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead/send-email/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "subject": "Following up on your inquiry", "message": "Hi John, I wanted to follow up on our previous conversation and share some exciting updates about our premium plan." }'

Example Response

{ "msg": "Email sent to lead successfully." }
⚠️

Requirements: The lead must have a valid email address and your workspace mail must be connected before using this endpoint. A 422 error will be returned if either condition is not met.


Convert Lead to Contact

Convert a lead into a contact. This creates a new contact using the lead’s information.

POST /api/public-v1/lead/{id}/convert

Path Parameters

ParameterTypeRequiredDescription
idintegerYesLead ID to convert

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead/1/convert" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "msg": "Lead converted to contact successfully.", "data": { "id": 5, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "555-0123", "country_id": 1, "country": "United States", "address": "123 Main Street", "zip_code": "94105" } }

Lead Notes

Manage notes attached to a specific lead.


Get Lead Notes

Retrieve all notes for a specific lead.

GET /api/public-v1/lead/notes/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/lead/notes/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "msg": "Lead Notes Fetched", "data": [ { "id": 1, "lead_id": 1, "note": "Follow up scheduled for next week", "title": "Follow Up", "media": null, "created_by": { "id": 1, "name": "Admin User", "email": "admin@example.com" }, "created_at": "2026-04-01 10:00:00" } ] }

Create a Lead Note

Add a new note to a specific lead.

POST /api/public-v1/lead/notes/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Request Body

FieldTypeRequiredDescription
titlestringYesNote title
notestringYesNote content
imageintegerNoMedia upload ID for attachment

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead/notes/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "title": "Follow Up", "note": "Follow up scheduled for next week. Client expressed strong interest in the enterprise plan." }'

Example Response

{ "msg": "Note Created", "data": { "id": 1, "lead_id": 1, "note": "Follow up scheduled for next week. Client expressed strong interest in the enterprise plan.", "title": "Follow Up", "media": null, "created_by": { "id": 1, "name": "Admin User", "email": "admin@example.com" }, "created_at": "2026-04-07 10:00:00" } }

Update a Lead Note

Update an existing note on a lead.

PUT /api/public-v1/lead/notes/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Request Body

FieldTypeRequiredDescription
note_idintegerYesID of the note to update
titlestringYesUpdated note title
notestringYesUpdated note content
imageintegerNoMedia upload ID for attachment

Example Request

curl -X PUT "https://public-api.taskip.net/api/public-v1/lead/notes/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "note_id": 1, "title": "Follow Up (Updated)", "note": "Follow up rescheduled to next month. Budget approval is pending." }'

Example Response

{ "msg": "Note Updated", "data": { "id": 1, "lead_id": 1, "note": "Follow up rescheduled to next month. Budget approval is pending.", "title": "Follow Up (Updated)", "media": null, "created_by": { "id": 1, "name": "Admin User", "email": "admin@example.com" }, "created_at": "2026-04-01 10:00:00" } }

Delete a Lead Note

Delete a specific note from a lead.

DELETE /api/public-v1/lead/notes/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Request Body

FieldTypeRequiredDescription
note_idintegerYesID of the note to delete

Example Request

curl -X DELETE "https://public-api.taskip.net/api/public-v1/lead/notes/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "note_id": 1 }'

Example Response

{ "msg": "Note Deleted" }

Lead Files

Manage files and media attachments on a specific lead.


Get Lead Files

Retrieve all files uploaded to a specific lead.

GET /api/public-v1/lead/files/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by file title
itemintegerNoResults per page (default: 10)

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/lead/files/1?item=10" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "data": [ { "id": 1, "title": "proposal.pdf", "path": "tenants/tenant-1/media/proposal.pdf", "mime_type": "application/pdf", "size": 204800, "created_by": { "id": 1, "name": "Admin User", "email": "admin@example.com" }, "created_at": "2026-04-01T10:00:00.000000Z" } ], "links": { "first": "https://public-api.taskip.net/api/public-v1/lead/files/1?page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "https://public-api.taskip.net/api/public-v1/lead/files/1", "per_page": 10, "to": 1 } }

Upload Lead Files

Upload one or more media files to a specific lead.

POST /api/public-v1/lead/files/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Request Body (multipart/form-data)

FieldTypeRequiredDescription
filefileConditionalFile to upload (multipart/form-data)
idsarrayConditionalArray of existing media upload IDs to attach

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead/files/1" \ -H "X-Secret-Key: your-secret-key-here" \ -F "file=@/path/to/proposal.pdf"

Example Response

{ "msg": "Files Added Successfully" }

Bulk Delete Lead Files

Delete multiple files from a lead at once.

DELETE /api/public-v1/lead/files/bulk-delete/{lead_id}

Path Parameters

ParameterTypeRequiredDescription
lead_idintegerYesThe lead ID

Request Body

FieldTypeRequiredDescription
idsarrayYesArray of media upload IDs to delete

Example Request

curl -X DELETE "https://public-api.taskip.net/api/public-v1/lead/files/bulk-delete/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "ids": [1, 2, 3] }'

Example Response

{ "msg": "Lead files bulk action success" }

Lead Attributes (Status & Source)

Lead attributes define the statuses (e.g. New, Qualified, Closed) and sources (e.g. Website, Referral, Cold Call) that can be assigned to leads. Use type: 1 for statuses and type: 2 for sources.


Get All Lead Attributes

Retrieve all lead attribute statuses and sources.

GET /api/public-v1/lead-attribute

Query Parameters

ParameterTypeRequiredDescription
typeintegerNo1 = statuses only, 2 = sources only (omit for all)
itemintegerNoResults per page (default: 10)

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/lead-attribute?type=1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "msg": "Lead Attributes Fetched", "data": [ { "id": 1, "name": "New", "type": 1, "color": "#3498db", "order": 1, "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-01T10:00:00.000000Z" }, { "id": 2, "name": "Website", "type": 2, "color": "#2ecc71", "order": 1, "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-01T10:00:00.000000Z" } ], "links": { "first": "https://public-api.taskip.net/api/public-v1/lead-attribute?page=1", "last": null, "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "https://public-api.taskip.net/api/public-v1/lead-attribute", "per_page": 10, "to": 2 } }

Create a Lead Attribute

Create a new lead status or source attribute.

POST /api/public-v1/lead-attribute

Request Body

FieldTypeRequiredDescription
namestringYesAttribute name (max 191 chars)
typeintegerYes1 = status, 2 = source
colorstringNoHex color code (max 50 chars, e.g. #e74c3c)
orderintegerNoDisplay order

Example Request

curl -X POST "https://public-api.taskip.net/api/public-v1/lead-attribute" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "name": "Qualified", "type": 1, "color": "#e74c3c", "order": 2 }'

Example Response

{ "msg": "Attribute Created", "data": { "id": 3, "name": "Qualified", "type": 1, "color": "#e74c3c", "order": 2, "created_at": "2026-04-07T10:00:00.000000Z", "updated_at": "2026-04-07T10:00:00.000000Z" } }

Get a Specific Lead Attribute

Retrieve the details of a single lead attribute by ID.

GET /api/public-v1/lead-attribute/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesAttribute ID

Example Request

curl -X GET "https://public-api.taskip.net/api/public-v1/lead-attribute/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json"

Example Response

{ "msg": "Attribute Details", "data": { "id": 1, "name": "New", "type": 1, "color": "#3498db", "order": 1, "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-01T10:00:00.000000Z" } }

Update a Lead Attribute

Update an existing lead status or source attribute.

PUT /api/public-v1/lead-attribute/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesAttribute ID to update

Request Body

FieldTypeRequiredDescription
namestringYesAttribute name (max 191 chars)
typeintegerYes1 = status, 2 = source
colorstringNoHex color code (max 50 chars)
orderintegerNoDisplay order

Example Request

curl -X PUT "https://public-api.taskip.net/api/public-v1/lead-attribute/1" \ -H "X-Secret-Key: your-secret-key-here" \ -H "Content-Type: application/json" \ -d '{ "name": "Hot Lead", "type": 1, "color": "#e74c3c", "order": 1 }'

Example Response

{ "msg": "Attribute Updated", "data": { "id": 1, "name": "Hot Lead", "type": 1, "color": "#e74c3c", "order": 1, "created_at": "2026-04-01T10:00:00.000000Z", "updated_at": "2026-04-07T10:00:00.000000Z" } }

Delete a Lead Attribute

Delete a lead status or source attribute.

DELETE /api/public-v1/lead-attribute/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesAttribute ID to delete

Example Request

curl -X DELETE "https://public-api.taskip.net/api/public-v1/lead-attribute/1" \ -H "X-Secret-Key: your-secret-key-here"

Example Response

{ "msg": "Attribute Deleted Successfully" }

Error Responses

Common Error Codes

Status CodeError TypeDescription
400Bad RequestInvalid request data or missing required fields
401UnauthorizedInvalid or missing X-Secret-Key
404Not FoundLead or resource not found
409ConflictEmail already exists (for create/update)
422Validation ErrorRequest data failed validation (e.g. lead already converted, no email configured)
429Too Many RequestsRate limit exceeded

Example Error Response

{ "success": false, "error": "Validation Error", "message": "The given data was invalid", "errors": { "email": ["The email field is required."], "first_name": ["The first name field is required."] }, "status_code": 422 }

Response Schemas

Lead Object

{ "id": "integer", "first_name": "string", "last_name": "string|null", "full_name": "string", "email": "string", "phone_number": "string|null", "website": "string|null", "company_id": "integer|null", "company": "object|null", "value": "numeric|null", "currency": "string|null", "lead_interaction_date": "string (Y-m-d)|null", "assigned_to": "array", "country_id": "integer|null", "country": "string|null", "state_id": "integer|null", "state": "string|null", "city_id": "integer|null", "city": "string|null", "address": "string|null", "zip_code": "string|null", "description": "string|null", "created_by": "integer", "converted": "integer (0 or 1)", "converted_contact_id": "integer|null", "converted_at": "string (ISO 8601)|null", "statuses": "array", "sources": "array", "groups": "array", "custom_fields": "array", "created_at": "string (ISO 8601)", "updated_at": "string (ISO 8601)" }

Lead Attribute Object

{ "id": "integer", "name": "string", "type": "integer (1=status, 2=source)", "color": "string (hex)|null", "order": "integer", "created_at": "string (ISO 8601)", "updated_at": "string (ISO 8601)" }

Pagination Meta Object

{ "current_page": "integer", "from": "integer", "path": "string", "per_page": "integer", "to": "integer" }
💡

Tip: Use the is_converted query parameter on the GET /lead endpoint to separate your active pipeline from already-converted leads. Combine it with status_id or source_id to build powerful filtered views of your lead data.

Last updated on