Contact Management API
The Contact Management API allows you to manage contacts in your TaskIP CRM system. You can create, read, update, and delete contacts, as well as perform bulk operations and client invitations.
Endpoints Overview
Method | Endpoint | Description |
---|---|---|
GET | /api/public-v1/contact | Get all contacts |
POST | /api/public-v1/contact | Create a new contact |
GET | /api/public-v1/contact/{id} | Get a specific contact |
PUT | /api/public-v1/contact/{id} | Update a contact |
DELETE | /api/public-v1/contact/{contact} | Delete a contact |
POST | /api/public-v1/contact/bulk-delete | Delete multiple contacts |
POST | /api/public-v1/contact/invite-client/{id} | Invite a contact as client |
Get All Contacts
Retrieve a list of all contacts in your system.
GET /api/public-v1/contact
Request Headers
X-Secret-Key: your-secret-key-here
Content-Type: application/json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
page | integer | No | Page number for pagination (default: 1) |
limit | integer | No | Number of contacts per page (default: 50) |
search | string | No | Search term for contact name or email |
sort | string | No | Sort field (name , email , created_at ) |
order | string | No | Sort order (asc or desc ) |
Example Request
curl -X GET "https://public-api.taskip.net/api/public-v1/contact?page=1&limit=20" \
-H "X-Secret-Key: your-secret-key-here" \
-H "Content-Type: application/json"
Example Response
{
"message": "All contacts fetched successfully",
"data": [
{
"id": 1,
"user_id": 123,
"company": {
"id": 5,
"name": "Acme Corp",
"domain": "acmecorp.com",
"email": "info@acmecorp.com"
},
"company_id": 5,
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"email": "john.doe@example.com",
"position": "Software Engineer",
"phone_number": "555-0123",
"country_id": 1,
"country": "United States",
"state_id": 5,
"state": "California",
"city_id": 10,
"city": "San Francisco",
"address": "123 Tech Street",
"zip_code": "94105",
"timezone": "America/Los_Angeles",
"details": null,
"reference": null,
"reference_name": null,
"access_portal": 1,
"billings": {
"id": 10,
"contact_id": 1,
"billing_address": null,
"billing_city": null,
"billing_state": null,
"billing_country": null,
"billing_zip": null,
"billing_phone": null,
"tax_number": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"languages": [],
"image": null,
"custom_fields": {
"department": "Engineering",
"lead_source": "Referral"
}
},
{
"id": 2,
"user_id": 124,
"company": {
"id": 3,
"name": "Tech Solutions",
"domain": "techsolutions.com",
"email": "hello@techsolutions.com"
},
"company_id": 3,
"first_name": "Jane",
"last_name": "Smith",
"full_name": "Jane Smith",
"email": "jane.smith@example.com",
"position": "Product Manager",
"phone_number": "555-0124",
"country_id": 1,
"country": "United States",
"state_id": 6,
"state": "New York",
"city_id": 11,
"city": "New York",
"address": "456 Business Ave",
"zip_code": "10001",
"timezone": "America/New_York",
"details": "Experienced product manager",
"reference": "REF-2024-002",
"reference_name": "Website Lead",
"access_portal": 0,
"billings": {
"id": 11,
"contact_id": 2,
"billing_address": "456 Business Ave",
"billing_city": "New York",
"billing_state": "New York",
"billing_country": "United States",
"billing_zip": "10001",
"billing_phone": "555-0124",
"tax_number": "TX-987654321",
"created_at": "2024-01-10T09:20:00Z",
"updated_at": "2024-01-18T16:30:00Z"
},
"languages": [
{
"id": 1,
"code": "en",
"name": "English",
"is_default": true
},
{
"id": 2,
"code": "es",
"name": "Spanish",
"is_default": false
}
],
"image": {
"id": 25,
"url": "https://taskip.net/storage/profile/jane-smith.jpg",
"name": "jane-smith.jpg",
"file_name": "jane-smith.jpg",
"mime_type": "image/jpeg",
"size": 98765,
"collection_name": "profile"
},
"custom_fields": {
"department": "Product",
"lead_source": "Website",
"linkedin": "https://linkedin.com/in/janesmith"
}
}
],
"meta": {
"search": null
}
}
Create a Contact
Create a new contact in your system.
POST /api/public-v1/contact
Request Headers
X-Secret-Key: your-secret-key-here
Content-Type: application/json
Request Body
Field | Type | Required | Description |
---|---|---|---|
first_name | string | Yes | Contact's first name |
last_name | string | No | Contact's last name |
email | string | Yes | Contact's email address (must be unique) |
phone_code | string | No | Phone country code (max 5 chars) |
phone_number | string | No | Contact's phone number (max 18 chars) |
company_id | integer | No | Associated company ID |
position | string | No | Job position/title |
country_id | integer | No | Country ID |
state_id | integer | No | State ID |
city_id | integer | No | City ID |
address | string | No | Contact's address |
zip_code | string | No | ZIP/postal code (max 8 chars) |
timezone | string | No | Contact's timezone |
image | integer | No | Profile image media ID |
access_portal | integer | No | Portal access (0 or 1) |
password | string | Required if access_portal=1 | Password (min 6, max 191 chars) |
custom_fields | object | No | Custom field data |
invite_client | boolean | No | Send client invitation email |
Example Request
curl -X POST "https://public-api.taskip.net/api/public-v1/contact" \
-H "X-Secret-Key: your-secret-key-here" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Alice",
"last_name": "Johnson",
"email": "alice.johnson@example.com",
"phone_code": "+1",
"phone_number": "555-0125",
"company_id": 7,
"position": "Marketing Director",
"address": "123 Business Ave",
"zip_code": "12345",
"access_portal": 1,
"password": "secure123",
"invite_client": true
}'
JavaScript Example
const contactData = {
first_name: "Alice",
last_name: "Johnson",
email: "alice.johnson@example.com",
phone_code: "+1",
phone_number: "555-0125",
company_id: 7,
position: "Marketing Director",
address: "123 Business Ave",
zip_code: "12345",
timezone: "America/New_York",
access_portal: 1,
password: "secure123",
custom_fields: {
department: "Marketing",
lead_source: "Website"
},
invite_client: true
};
const response = await fetch('https://public-api.taskip.net/api/public-v1/contact', {
method: 'POST',
headers: {
'X-Secret-Key': 'your-secret-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify(contactData)
});
const result = await response.json();
Example Response
{
"success": true,
"message": "Contact created successfully",
"data": {
"id": 151,
"user_id": 245,
"company_id": 7,
"company": {
"id": 7,
"name": "Marketing Pro"
},
"first_name": "Alice",
"last_name": "Johnson",
"full_name": "Alice Johnson",
"email": "alice.johnson@example.com",
"position": "Marketing Director",
"phone_number": "555-0125",
"country_id": 1,
"country": "United States",
"state_id": 5,
"state": "New York",
"city_id": 10,
"city": "New York",
"address": "123 Business Ave",
"zip_code": "12345",
"timezone": "America/New_York",
"access_portal": 1,
"billings": {
"billing_address": null,
"billing_city": null,
"billing_state": null,
"billing_country": null,
"billing_zip": null
},
"languages": [],
"image": null,
"custom_fields": {
"department": "Marketing",
"lead_source": "Website"
},
"created_at": "2024-01-25T11:20:00Z",
"updated_at": "2024-01-25T11:20:00Z"
}
}
Get a Specific Contact
Retrieve details of a specific contact by ID.
GET /api/public-v1/contact/{id}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Contact ID |
Example Request
curl -X GET "https://public-api.taskip.net/api/public-v1/contact/151" \
-H "X-Secret-Key: your-secret-key-here" \
-H "Content-Type: application/json"
Example Response
{
"success": true,
"data": {
"id": 151,
"user_id": 245,
"company": {
"id": 7,
"name": "Marketing Pro",
"domain": "marketingpro.com",
"email": "info@marketingpro.com"
},
"company_id": 7,
"first_name": "Alice",
"last_name": "Johnson",
"full_name": "Alice Johnson",
"email": "alice.johnson@example.com",
"position": "Marketing Director",
"phone_number": "555-0125",
"country_id": 1,
"country": "United States",
"state_id": 5,
"state": "New York",
"city_id": 10,
"city": "New York",
"address": "123 Business Ave",
"zip_code": "12345",
"timezone": "America/New_York",
"details": "Met at industry conference 2024",
"reference": "REF-2024-001",
"reference_name": "Conference Lead",
"access_portal": 1,
"billings": {
"id": 15,
"contact_id": 151,
"billing_address": "123 Business Ave",
"billing_city": "New York",
"billing_state": "New York",
"billing_country": "United States",
"billing_zip": "12345",
"billing_phone": "555-0125",
"tax_number": "TX-123456789",
"created_at": "2024-01-25T11:20:00Z",
"updated_at": "2024-01-25T11:20:00Z"
},
"languages": [
{
"id": 1,
"code": "en",
"name": "English",
"is_default": true
},
{
"id": 2,
"code": "es",
"name": "Spanish",
"is_default": false
}
],
"image": {
"id": 42,
"url": "https://taskip.net/storage/profile/alice-johnson.jpg",
"name": "alice-johnson.jpg",
"file_name": "alice-johnson.jpg",
"mime_type": "image/jpeg",
"size": 125843,
"collection_name": "profile"
},
"custom_fields": {
"linkedin": "https://linkedin.com/in/alicejohnson",
"preferred_contact": "email",
"department": "Marketing",
"lead_source": "Conference",
"notes": "Met at industry conference 2024"
}
}
}
Update a Contact
Update an existing contact's information.
PUT /api/public-v1/contact/{id}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Contact ID to update |
Request Body
Same fields as create contact. All fields are optional - only include fields you want to update.
Example Request
curl -X PUT "https://public-api.taskip.net/api/public-v1/contact/151" \
-H "X-Secret-Key: your-secret-key-here" \
-H "Content-Type: application/json" \
-d '{
"position": "Senior Marketing Director",
"phone_number": "555-0126",
"details": "Promoted to senior position. Met at industry conference 2024"
}'
Python Example
import requests
headers = {
'X-Secret-Key': 'your-secret-key-here',
'Content-Type': 'application/json'
}
update_data = {
"position": "Senior Marketing Director",
"phone": "+1-555-0126",
"notes": "Promoted to senior position. Met at industry conference 2024"
}
response = requests.put(
'https://public-api.taskip.net/api/public-v1/contact/151',
headers=headers,
json=update_data
)
result = response.json()
Example Response
{
"msg": "Contact Updated"
}
Delete a Contact
Delete a specific contact from your system.
DELETE /api/public-v1/contact/{contact}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
contact | integer | Yes | Contact ID to delete |
Example Request
curl -X DELETE "https://public-api.taskip.net/api/public-v1/contact/151" \
-H "X-Secret-Key: your-secret-key-here"
Example Response
{
"msg": "Contact Deleted"
}
Bulk Delete Contacts
Delete multiple contacts at once.
POST /api/public-v1/contact/bulk-delete
Request Body
Field | Type | Required | Description |
---|---|---|---|
contact_ids | array | Yes | Array of contact IDs to delete |
Example Request
curl -X POST "https://public-api.taskip.net/api/public-v1/contact/bulk-delete" \
-H "X-Secret-Key: your-secret-key-here" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [151, 152, 153, 154]
}'
Example Response
{
"msg": "Contacts Deleted"
}
Invite Client
Send an invitation to a contact to join as a client in your system.
POST /api/public-v1/contact/invite-client/{id}
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | integer | Yes | Contact ID to invite |
Request Body
Field | Type | Required | Description |
---|---|---|---|
message | string | No | Custom invitation message |
send_email | boolean | No | Whether to send email invitation (default: true) |
access_level | string | No | Client access level (basic , standard , premium ) |
Example Request
curl -X POST "https://public-api.taskip.net/api/public-v1/contact/invite-client/150" \
-H "X-Secret-Key: your-secret-key-here" \
-H "Content-Type: application/json" \
-d '{
"message": "Welcome to our client portal! You now have access to track your projects and invoices.",
"send_email": true,
"access_level": "standard"
}'
Example Response
{
"msg": "Invitation sent success"
}
Error Responses
Common Error Codes
Status Code | Error Type | Description |
---|---|---|
400 | Bad Request | Invalid request data or missing required fields |
401 | Unauthorized | Invalid or missing X-Secret-Key |
404 | Not Found | Contact not found |
409 | Conflict | Email already exists (for create/update) |
422 | Validation Error | Request data failed validation |
429 | Too Many Requests | Rate limit exceeded |
Example Error Response
{
"success": false,
"error": "Validation Error",
"message": "The given data was invalid",
"errors": {
"email": ["The email field is required."],
"name": ["The name field is required."]
},
"status_code": 422
}
Response Schemas
Contact Object
{
"id": "integer",
"name": "string",
"email": "string",
"phone": "string|null",
"company_id": "integer|null",
"company_name": "string|null",
"position": "string|null",
"address": "string|null",
"notes": "string|null",
"status": "string",
"tags": "array|null",
"custom_fields": "object|null",
"created_at": "string (ISO 8601)",
"updated_at": "string (ISO 8601)"
}
Pagination Meta Object
{
"current_page": "integer",
"per_page": "integer",
"total": "integer",
"total_pages": "integer"
}
Tip: Use the search parameter in the GET /contact endpoint to quickly find contacts by name or email. You can also combine it with pagination for efficient searching through large contact lists.