Contact Management

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

MethodEndpointDescription
GET/api/public-v1/contactGet all contacts
POST/api/public-v1/contactCreate 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-deleteDelete 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

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination (default: 1)
limitintegerNoNumber of contacts per page (default: 50)
searchstringNoSearch term for contact name or email
sortstringNoSort field (name, email, created_at)
orderstringNoSort 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

FieldTypeRequiredDescription
first_namestringYesContact's first name
last_namestringNoContact's last name
emailstringYesContact's email address (must be unique)
phone_codestringNoPhone country code (max 5 chars)
phone_numberstringNoContact's phone number (max 18 chars)
company_idintegerNoAssociated company ID
positionstringNoJob position/title
country_idintegerNoCountry ID
state_idintegerNoState ID
city_idintegerNoCity ID
addressstringNoContact's address
zip_codestringNoZIP/postal code (max 8 chars)
timezonestringNoContact's timezone
imageintegerNoProfile image media ID
access_portalintegerNoPortal access (0 or 1)
passwordstringRequired if access_portal=1Password (min 6, max 191 chars)
custom_fieldsobjectNoCustom field data
invite_clientbooleanNoSend 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

ParameterTypeRequiredDescription
idintegerYesContact 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

ParameterTypeRequiredDescription
idintegerYesContact 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

ParameterTypeRequiredDescription
contactintegerYesContact 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

FieldTypeRequiredDescription
contact_idsarrayYesArray 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

ParameterTypeRequiredDescription
idintegerYesContact ID to invite

Request Body

FieldTypeRequiredDescription
messagestringNoCustom invitation message
send_emailbooleanNoWhether to send email invitation (default: true)
access_levelstringNoClient 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 CodeError TypeDescription
400Bad RequestInvalid request data or missing required fields
401UnauthorizedInvalid or missing X-Secret-Key
404Not FoundContact not found
409ConflictEmail already exists (for create/update)
422Validation ErrorRequest data failed validation
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."],
    "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.