Query CRM Contacts
Retrieve a list of CRM contacts
/crm/contacts
Create CRM Contact
Create new CRM Contact
/crm/contacts
Parameters
Name |
Required |
Type/Format |
Description |
createdByUserId |
yes |
String |
ID of a user, a new dependency is created on behalf of |
contactType |
no |
String |
Contact type ID |
firstName |
yes |
String |
Contact first name |
lastName |
no |
String |
Contact last name |
email |
no |
String |
Contact email address |
phone |
no |
String |
Contact phone number |
contactOwnerUserId |
no |
String |
ID of a user marked as owner of this CRM contact |
notes |
no |
Text |
Text notes associated with this contact |
customFieldsData |
no |
Object |
Custom fields data as FIELD-ID : VALUE object |
Sample CURL →
curl -X POST
https://api.goodday.work/2.0/crm/contacts
-H "Content-Type: application/json"
-H "gd-api-token: AUTH-TOKEN"
-d '{
"createdByUserId": "USER-ID",
"firstName": "Alex",
"lastName": "Kim",
"phone": "555-123-4567",
"email": "alex@abc.com",
"contactType": "",
"contactOwnerUserId": "USER-ID",
"notes": "some notes here",
"customFieldsData": {
"KEY": "VALUE"
}
}'
Get CRM Contact
Get Contact details
/crm/contact/CONTACT-ID
Response
Sample response →
{
"contact": {
"companyId": "COMPANY-ID",
"contactOwnerUserId": "USER-ID",
"contactType": "TYPE-ID",
"crmAccountId": null,
"customFieldsData": {
"KEY": "VALUE"
},
"email": "alex@abc.com",
"firstName": "Alex",
"id": "CONTACT-ID",
"isDeleted": false,
"lastName": "Kim",
"notes": null,
"phone": "555-123-4567",
"userId": null
},
"tasks": [
{
"id": "TASK-ID",
"shortId": "1234",
"taskStatusId": "TASK-STATUS-ID",
"taskTypeId": "TASK-TYPE-ID",
"title": "Linked task title"
}
]
}
Delete CRM Contact
Delete CRM Contact
/crm/contact/CONTACT-ID
Update CRM Contact
Update CRM Contact
/crm/contact/CONTACT-ID
Parameters
Name |
Required |
Type/Format |
Description |
updatedByUserId |
yes |
String |
ID of a user, a CRM contact is updated on behalf of |
contactType |
no |
String |
Contact type ID |
crmAccountId |
no |
String |
CRM Account ID this contact belongs too |
firstName |
no |
String |
Contact first name |
lastName |
no |
String |
Contact last name |
email |
no |
String |
Contact email address |
phone |
no |
String |
Contact phone number |
contactOwnerUserId |
no |
String |
ID of a user marked as owner of this CRM contact |
notes |
no |
Text |
Text notes associated with this contact |
customFieldsData |
no |
Object |
Custom fields data as FIELD-ID : VALUE object |
Query CRM Accounts
Retrieve a list of CRM accounts
/crm/accounts
Response
Sample response →
[
{
"accountOwnerUserId": "USER-ID",
"contacts": [
"CONTACT1-ID",
"CONTACT2-ID"
],
"customFieldsData": {
"KEY": VALUE,
...
},
"email": "info@abc.com",
"id": "ACCOUNT-ID",
"isDeleted": false,
"name": "ABC Inc",
"notes": "",
"phone": "555-123-4567",
"website": "abc.com"
},
...
]
Create CRM Account
Create new CRM Account
/crm/accounts
Parameters
Name |
Required |
Type/Format |
Description |
createdByUserId |
yes |
String |
ID of a user, a new dependency is created on behalf of |
name |
yes |
String |
Account name |
email |
no |
String |
Contact email address |
phone |
no |
String |
Account primary phone number |
website |
no |
String |
Website URL |
accountOwnerUserId |
no |
String |
ID of a user marked as owner of this CRM account |
notes |
no |
Text |
Text notes associated with this account |
customFieldsData |
no |
Object |
Custom fields data as FIELD-ID : VALUE object |
Sample CURL →
curl -X POST
https://api.goodday.work/2.0/crm/accounts
-H "Content-Type: application/json"
-H "gd-api-token: AUTH-TOKEN"
-d '{
"createdByUserId": "USER-ID",
"name": "Abc",
"phone": "555-123-4567",
"email": "alex@abc.com",
"contactOwnerUserId": "USER-ID",
"notes": "some notes here",
"customFieldsData": {
"KEY": "VALUE"
}
}'
Get CRM Account
Get Account details
/crm/account/ACCOUNT-ID
Response
Sample response →
{
"account": {
"companyId": "COMPANY-ID",
"contactOwnerUserId": "USER-ID",
"customFieldsData": {
"KEY": "VALUE"
},
"email": "alex@abc.com",
"name": "ABC Inc",
"id": "ACCOUNT-ID",
"isDeleted": false,
"notes": null,
"phone": "555-123-4567",
"website": "abc.com"
},
"contacts": [
CONTACT1-ID,
CONTACT2-ID,
...
]
}
Delete CRM Account
Delete CRM Account
/crm/account/ACCOUNT-ID
Update CRM Account
Update CRM Account
/crm/account/ACCOUNT-ID
Parameters
Name |
Required |
Type/Format |
Description |
updatedByUserId |
yes |
String |
ID of a user, a CRM account is updated on behalf of |
name |
no |
String |
Account name |
email |
no |
String |
Account email address |
phone |
no |
String |
Account phone number |
website |
no |
String |
Account website URL |
accountOwnerUserId |
no |
String |
ID of a user marked as owner of this CRM account |
notes |
no |
Text |
Text notes associated with this contact |
customFieldsData |
no |
Object |
Custom fields data as FIELD-ID : VALUE object |
Assigning CRM contacts/account to a task
Link a selected task with a CRM Account or CRM Contact(s)
/task/TASK-ID/update
Parameters
Name |
Required |
Type/Format |
Description |
userId |
yes |
String |
User on behalf of whom API will execute update |
crmContactIds |
no |
String array |
Array of CRM contacts i.e. [CONTACT1-ID, CONTACT2-ID] |
crmAccountId |
no |
String |
CRM Account Id |
Sample CURL →
curl -X PUT
https://api.goodday.work/2.0/task/TASK-ID/update
-H "Content-Type: application/json"
-H "gd-api-token: AUTH-TOKEN"
-d '{
"userId": "USER-ID",
"crmContactIds":"[CONTACT1-ID, CONTACT2-ID]",
"crmAccountId":"ACCOUNT-ID"
}'