Modify a Contact

Update an existing contact’s information by replacing all included fields with the values in the request and clearing the value for any unspecified fields. Or optionally update only the fields specified by sending the ‘Update’ parameter.

HTTP POST

POST /api/2013-12-01/Contacts/[Agency ID]/[Contact ID]
You must POST at least the following to update a contact.

Parameter Description
First The contact’s first name. Maximum of 16 characters.

You may also set the following information when updating a 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 contact’s last name. Maximum of 16 characters.
Organization The contact’s organization. Maximum of 1,024 characters.
Tags The 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 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”
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”
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”
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”
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”
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.
Update Can be one of the following; “All” (default) or “Present”. When set to “Present”, only fields that were provided in the request will be changed. When set to “All”, fields that are not provided in the request will have their values cleared.
Example Request

$ curl -XPOST https://[Site Name].readyop.com/api/2013-12-01/Contacts/[Agency ID]/[Contact ID] \
    -d "First=Alexander" \
    -d "Last=Graham" \
    -d "Phone_0_Number=+12223334444" \
    -d "Phone_0_Textable=Y" \
    -d "Phone_0_Type=Cell" \
    -d "Phone_1_Number=+13334445555" \
    -d "Phone_1_Textable=N" \
    -d "Phone_1_Type=Desk" \
    -d "Email_0_Address=alexander@email.com" \
    -d "Email_0_Type=Work" \
    -d "Objects[]=1234" \
    -d "Objects[]=5678" \
    -u "[API Account ID]:[API Token]"

Request Result

{
    Contact ID: 86369,
    Agency ID: 1,
    Agencies: [
        1,
        2
    ],
    Custom ID: "",
    User ID: 228,
    Owner ID: "",
    Status: "Active",
    First: "Alexander",
    Last: "Grahm",
    Organization: "",
    Tags: "",
    Title: "",
    PIN: "",
    Custom 1: "",
    Custom 2: "",
    Custom 3: "",
    Custom 4: "",
    Custom 5: "",
    Custom 6: "",
    Custom 7: "",
    Custom 8: "",
    Custom 9: "",
    Custom 10: "",
    Phones: [
        {
            Number: "+13204563470",
            Textable: "Y",
            Type: "Cell"
        },
        {
            Number: "+3159773",
            Textable: "N",
            Type: "Desk"
        }
    ],
    Emails: [
        {
            Address: "alexander@hotmail.com",
            Type: "Work"
        }
    ],
    Objects: [
        1234,
        5678
    ]
}