Syntax
int confirmContact( string api_key, int list_id, int contact_id );
Parameters
api_key
(string)Key for accessing the API. See Getting Started for more information.
list_id
(int)The ID of the List containing the Contact.
contact_id
(int)The ID of the Contact to confirm.
Return Value
Returns the Contact ID on success.
Examples
The example code confirms the Contact 234 on List 1234567.
$list_id = 1234567; // can be obtained using searchLists()
$contact_id = 234; // can be obtained using searchContacts()
$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('confirmContact', $list_id, $contact_id);
$contact_id = 234; // can be obtained using searchContacts()
$api = new Api($url, 'YOURAPIKEY');
$api->invokeMethod('confirmContact', $list_id, $contact_id);
{
"id": 1,
"method": "confirmContact",
"params": [
"YOURAPIKEY",
1234567,
234
]
}
"id": 1,
"method": "confirmContact",
"params": [
"YOURAPIKEY",
1234567,
234
]
}
{
"id": 1,
"result": 234,
"error": null
}
"id": 1,
"result": 234,
"error": null
}
Remarks
The method triggers the double opt in Autoresponder or Campaign events for the Contact.
Error Codes
This method may return the following error codes in addition to the standard error codes:
Code | Error | Description |
---|---|---|
303 |
Unable to Load List | list_id is not a valid List |
304 |
Unable to Load Contact | contact_id is not a valid Contact in the List |
302 |
Undefined Error: Contact Confirm Failed | An internal error occurred |