Use this endpoint to retrieve (GET), update (PUT), or optout/unsubscribe (DELETE) a contact. To create a new contact, use the POST method for the contacts-collection API.
Click a method to view its documentation
Privileges required: contacts:write
Update the information for an existing contact specified by the contactId
path parameter (REQUIRED).
NOTE: When you update a resource using a PUT, all properties are updated, overwriting all existing property values. Any properties left blank or not included in the PUT will be overwritten with a null value.
PUT: https://api.constantcontact.com/v2/contacts/{contactId} |
|||
name |
type |
default |
description |
---|---|---|---|
action_by |
query |
ACTION_BY_OWNER |
Identifies who originated the action of adding the contact:
|
api_key |
query |
REQUIRED; The API key for the application |
|
contactId |
path |
Specifies the contact being updated |
{ "addresses": [ { "line1": "47 Shawmut Ave.", "line2": "Suite 404", "city": "Boston", "address_type": "BUSINESS", "state_code": "MA", "country_code": "us", "postal_code": "02158" } ], "lists": [ { "id": "1" } ], "email_addresses": [ { "email_address": "username1@example.com" } ], "prefix_name": "Mr.", "first_name": "Ronald", "last_name": "Martone", "job_title": "Systems Analyst 3", "company_name": "System Optimizations", "home_phone": "555-555-5555", "work_phone": "555-555-5555", "cell_phone": "555-555-5555", "fax": "555-555-5555", "custom_fields": [ { "name": "CustomField1", "value": "Has control of $25 million budget" } ] }
code |
description |
---|---|
200 |
Contact was successfully updated |
400 |
Either JSON was malformed or there was a data validation error |
401 |
Authentication failure |
404 |
Contact not found for ID |
406 |
Unsupported Accept Header value, must be application/json |
415 |
Unsupported content-type in the header, use application/json |
500 |
Internal server error occurred |
property |
type(max length) |
description |
---|
{ "id": "1237272667", "status": "ACTIVE", "fax": "555-555-5555", "addresses": [ { "id": "613f6340-8a7f-11e2-ba64-00163e68e976", "line1": "47 Shawmut Ave.", "line2": "Suite 404", "city": "Boston", "address_type": "BUSINESS", "state":"Massachusetts", "state_code": "MA", "country_code": "us", "postal_code": "02158", "sub_postal_code": "" } ], "notes": [], "confirmed": false, "lists": [ { "id": "1", "status": "ACTIVE" } ], "source": "API", "email_addresses": [ { "id": "61348dd0-8a7f-11e2-ba64-00163e68e976", "status": "ACTIVE", "confirm_status": "NO_CONFIRMATION_REQUIRED", "opt_in_source": "ACTION_BY_OWNER", "opt_in_date": "2013-03-11T19:10:47.000Z", "email_address": "username1@example.com" } ], "prefix_name": "Mr.", "first_name": "Ronald", "last_name": "Martone", "job_title": "Systems Analyst 3", "company_name": "System Optimizations", "home_phone": "", "work_phone": "555-555-5555", "cell_phone": "555-555-5555", "custom_fields": [ { "name": "CustomField1", "value": "Has control of $25 million budget" } ], "created_date": "2013-03-11T19:10:47.000Z", "modified_date": "2013-03-11T19:43:47.000Z", "source_details": "Server Flow App" }