API Guide Items- Contacts - Add New Contact

Contacts - Add New Contact

POST yourdomain.com/api/contacts/

Header

json
Field Type Description
Authorization String

Basic Access Authentication token

Parameter

json
Field Type Description
customer_id Number

Mandatory Customer id.

firstname String

Mandatory First Name

lastname String

Mandatory Last Name

email String

Mandatory E-mail

title (optional) String

Optional Position

phonenumber (optional) String

Optional Phone Number

direction (optional) String

Optional Direction (rtl or ltr)

Default value: rtl

password (optional) String

Optional password (only required if you pass send_set_password_email parameter)

is_primary (optional) String

Optional Primary Contact (set on or don't pass it)

Default value: on

donotsendwelcomeemail (optional) String

Optional Do Not Send Welcome Email (set on or don't pass it)

send_set_password_email (optional) String

Optional Send Set Password Email (set on or don't pass it)

permissions (optional) Array

Optional Permissions for this contact(["1", "2", "3", "4", "5", "6" ])
[
"1", // Invoices permission
"2", // Estimates permission
"3", // Contracts permission
"4", // Proposals permission
"5", // Support permission
"6" // Projects permission
]

invoice_emails (optional) String

Optional E-Mail Notification for Invoices (set value same as name or don't pass it)

Default value: invoice_emails

estimate_emails (optional) String

Optional E-Mail Notification for Estimate (set value same as name or don't pass it)

Default value: estimate_emails

credit_note_emails (optional) String

Optional E-Mail Notification for Credit Note (set value same as name or don't pass it)

Default value: credit_note_emails

project_emails (optional) String

Optional E-Mail Notification for Project (set value same as name or don't pass it)

Default value: project_emails

ticket_emails (optional) String

Optional E-Mail Notification for Tickets (set value same as name or don't pass it)

Default value: ticket_emails

task_emails (optional) String

Optional E-Mail Notification for Task (set value same as name or don't pass it)

Default value: task_emails

contract_emails (optional) String

Optional E-Mail Notification for Contract (set value same as name or don't pass it)

Default value: contract_emails

Success 200

json
Field Type Description
status Boolean

Request status.

message String

Contact added successfully.

Error 4xx

json
Name Type Description
status Boolean

Request status

message String

Contact add fail

email String

This Email is already exists

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contact added successfully"
}
HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contact add fail"
}

Did you find this article useful?