Create a new contact and return it’s instance resource.
HTTP POST
POST /api/2013-12-01/Contacts/[Agency ID]
You must POST at least the following to create a new contact.
| Parameter | Description |
|---|---|
| First | The new contact’s first name. Maximum of 16 characters. |
You may also set the following information when creating your new contact. We recommend providing as much information as possible to make interacting with your contact’s as easy as possible.
| Parameter | Description |
|---|---|
| Custom_ID | The custom ID field, can be provided for your own reference when exporting and managing your contacts. Maximum of 255 characters. |
| Last | The new contact’s last name. Maximum of 16 characters. |
| Organization | The new contact’s organization. Maximum of 1,024 characters. |
| Tags | The new contact’s tags, we recommend separating each tag by either a comma “,” or semicolon “;”. Whichever delimiter you specify, it is also highly recommended you use the same delimiter consistently. Maximum of 1,024 characters. |
| Title | The new contact’s title. Maximum of 1,024 characters. |
| Phone_0_Number | The 1st phone number for the contact. Should be prefixed with a plus “+” and should include the country code. Must be at least 3 digits. |
| Phone_0_Textable | Whether or not this phone number is able to receive text messages. Specify “Y” or “N”. |
| Phone_0_Type | The type of phone number. Can be one of the following; “Cell”, “Desk”, “Home”, “Work”, “Work Cell” |
| Phone_1_Number | The 2nd phone number for the contact. Should be prefixed with a plus “+” and should include the country code. Must be at least 3 digits. |
| Phone_1_Textable | Whether or not this phone number is able to receive text messages. Specify “Y” or “N”. |
| Phone_1_Type | The type of phone number. Can be one of the following; “Cell”, “Desk”, “Home”, “Work”, “Work Cell” |
| Phone_2_Number | The 3rd phone number for the contact. Should be prefixed with a plus “+” and should include the country code. Must be at least 3 digits. |
| Phone_2_Textable | Whether or not this phone number is able to receive text messages. Specify “Y” or “N”. |
| Phone_2_Type | The type of phone number. Can be one of the following; “Cell”, “Desk”, “Home”, “Work”, “Work Cell” |
| Phone_3_Number | The 4th phone number for the contact. Should be prefixed with a plus “+” and should include the country code. Must be at least 3 digits. |
| Phone_3_Textable | Whether or not this phone number is able to receive text messages. Specify “Y” or “N”. |
| Phone_3_Type | The type of phone number. Can be one of the following; “Cell”, “Desk”, “Home”, “Work”, “Work Cell” |
| Phone_4_Number | The 5th phone number for the contact. Should be prefixed with a plus “+” and should include the country code. Must be at least 3 digits. |
| Phone_4_Textable | Whether or not this phone number is able to receive text messages. Specify “Y” or “N”. |
| Phone_4_Type | The type of phone number. Can be one of the following; “Cell”, “Desk”, “Home”, “Work”, “Work Cell” |
| PIN | Maximum of 10 numbers. |
| Custom_1 | Custom data field 1 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_2 | Custom data field 2 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_3 | Custom data field 3 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_4 | Custom data field 4 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_5 | Custom data field 5 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_6 | Custom data field 6 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_7 | Custom data field 7 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_8 | Custom data field 8 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_9 | Custom data field 9 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Custom_10 | Custom data field 10 for the agency (the field’s labels in the roster itself can be renamed, though they will always be as Custom_# in the API) |
| Email_0_Address | The 1st e-mail address for this contact. |
| Email_0_Type | The type of e-mail address. Can be one of the following; “Home”, “Work” |
| Email_1_Address | The 2nd e-mail address for this contact. |
| Email_1_Type | The type of e-mail address. Can be one of the following; “Home”, “Work” |
| Email_2_Address | The 3rd e-mail address for this contact. |
| Email_2_Type | The type of e-mail address. Can be one of the following; “Home”, “Work” |
| Email_3_Address | The 4th e-mail address for this contact. |
| Email_3_Type | The type of e-mail address. Can be one of the following; “Home”, “Work” |
| Email_4_Address | The 5th e-mail address for this contact. |
| Email_4_Type | The type of e-mail address. Can be one of the following; “Home”, “Work” |
| Agencies[] | An array of Agency ID’s this contact should be linked to. |
| Objects[] | An array of Object ID’s this contact should be assigned to. |
Example Request
$ curl -XPOST https://[Site Name].readyop.com/api/2013-12-01/Contacts/[Agency ID] \
-d "Custom_ID=AZ123" \
-d "First=John" \
-d "Last=Doe" \
-d "Organization=My%20Company" \
-d "Title=Chief%20of%20Awesome" \
-d "Tags=Pizza%2C%20Beer%2C%20Hazmat" \
-d "Objects[]=1234" \
-d "Objects[]=5678" \
-u "[API Account ID]:[API Token]"
Request Result
{
"Contact ID": 106752,
"Agency ID": 1,
"Agencies": {
1
},
"Custom ID": "AZ123",
"User ID": "",
"Owner ID": "",
"Status": "Active",
"First": "John",
"Last": "Doe",
"Organization": "My Company",
"Tags": "Pizza, Beer, Hazmat",
"Title": "Chief of Awesome",
"PIN": "",
"Custom 1": "",
"Custom 2": "",
"Custom 3": "",
"Custom 4": "",
"Custom 5": "",
"Custom 6": "",
"Custom 7": "",
"Custom 8": "",
"Custom 9": "",
"Custom 10": "",
"Phones": [],
"Emails": [],
"Objects": [
1234,
5678
]
}