/** * Constant Contact API v3 * Swagger build version 3.0.2475 * * The version of the OpenAPI document: 1.0.116 * Contact: webservices@constantcontact.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import { RequestArgs, BaseAPI } from '../base'; import { CreateContactRequest } from '../models'; import { CreateOrUpdateContact200Response } from '../models'; import { CreateOrUpdateContactRequest } from '../models'; import { GetAllContacts200Response } from '../models'; import { GetContactById200Response } from '../models'; import { GetContactCounts200Response } from '../models'; import { GetContactIdXrefs200Response } from '../models'; import { GetSmsEngagementHistory200ResponseInner } from '../models'; import { UpdateContactRequest } from '../models'; /** * ContactsApi - axios parameter creator * @export */ export declare const ContactsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new contact resource; you must include the `create_source` property and at least one of the following properties when creating a new contact: `first_name`, `last_name`, or `email_address` (`email_address` must be unique for each contact). * @summary POST (create) a Contact * @param {CreateContactRequest} createContactRequest The JSON payload defining the contact * @param {*} [options] Override http request option. * @throws {RequiredError} */ createContact: (createContactRequest: CreateContactRequest, options?: RawAxiosRequestConfig) => Promise; /** * Use this method to create a new contact or update an existing contact. This method uses the `email_address` string value you include in the request body to determine if it should create an new contact or update an existing contact. Updates to existing contacts are partial updates. This method only updates the contact properties you include in the request body. Updates append new contact lists or custom fields to the existing `list_memberships` or `custom_fields` arrays.

Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.

When this method creates a new contact, it returns a 201 response code. When this method updates an existing contact, it returns a 200 response code. Updating a deleted contact restores the contact. The method automatically modifies the contact\'s `permission_to_send` and `opt_in_source` properties depending on the [Confirmed Opt-In](https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-email-campaigns-to-your-contacts-by-using-confirmed-opt-in) Constant Contact account setting: If Confirmed Opt-in is _enabled_, this method automatically sets the `permission_to_send` property as pending\\_confirmation for new contacts. If Confirmed Opt-in is _disabled_, this method automatically sets the `permission_to_send` property as explicit and the `opt_in_source` property as `Contact` for new contacts. Updated contacts have their `permission_to_send` property set as explicit. * @summary Create or Update a Contact * @param {CreateOrUpdateContactRequest} createOrUpdateContactRequest A JSON request body payload that contains the contact resource you are creating or updating. The request body must contain the `email_address` property and the `list_memberships` array. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrUpdateContact: (createOrUpdateContactRequest: CreateOrUpdateContactRequest, options?: RawAxiosRequestConfig) => Promise; /** * Deletes the contact identified by the contact_id path parameter. Deleted contacts won\'t receive email from you, and they don\'t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be revived, or added back to an account. Learn how to [revive deleted contacts](/api_guide/contacts_delete.html#revive). * @summary DELETE a Contact * @param {string} contactId Unique ID of contact to DELETE * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteContact: (contactId: string, options?: RawAxiosRequestConfig) => Promise; /** * Use this method to return a collection of contacts. Use the query parameters to search for contacts that match specific contact properties and subresourse properties as criteria. For example, you can search using the contact\'s `email` address, `lists` memberships, and by the date range that a contact was created or updated. Use the `limit` query parameter to limit the number of results returned per page. Use the `include` query parameter to include contact sub-resources in the response and `include_count` to include the total number of contacts that meet your specified search criteria. By default, this method returns all contacts that are not deleted. Use the `status` query parameter with the value `all` to return all contacts including deleted contacts. * @summary GET Contacts Collection * @param {GetAllContactsStatusEnum} [status] Use the `status` query parameter to search for contacts by status. This parameter accepts one or more comma separated values: `all`, `active`, `deleted`, `not_set`, `pending_confirmation`, `temp_hold`, and `unsubscribed`. * @param {string} [email] Use the `email` query parameter to search for a contact using a specific email address. * @param {string} [lists] Use the `lists` query parameter to search for contacts that are members of one or more specified lists. Use a comma to separate multiple `list_id` values, up to a maximum of 25. * @param {string} [segmentId] Use to get contacts that meet the segment criteria for a single specified `segment_id`. This query parameter can only be combined with the limit query parameter. When using the `segment_id` query parameter, the V3 API may return a 202 response code instead of a 200 response. The 202 response code indicates that your request has been accepted, but not fully completed. Retry sending your API request to return the completed results and a 200 response code. * @param {string} [tags] Use to get contact details for up to 50 specified tags. Use a comma to separate each `tag_id`. * @param {string} [updatedAfter] Use `updated_after` to search for contacts that have been updated after the date you specify. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [updatedBefore] Use `updated_before` to search for contacts that have been updated before a specified date. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdAfter] Use `created_after` to search for contacts created after a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdBefore] Use `created_before` to search for contacts created before a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [optoutAfter] Use `optout_after` to search for contacts that unsubscribed after a specified date. * @param {string} [optoutBefore] Use `optout_before` to search for contacts that unsubscribed before a specified date. * @param {GetAllContactsIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `taggings`, `notes`,`phone_numbers`, `street_addresses`, `sms_channel`. * @param {GetAllContactsSmsStatusEnum} [smsStatus] Use to get contacts by their SMS status. This parameter accepts one or more comma separated values: `all`, `explicit`, `unsubscribed`, `pending_confirmation`, `not_set`. * @param {boolean} [includeCount] Set `include_count=true` to include the total number of contacts (`contacts_count`) that meet all search criteria in the response body. * @param {number} [limit] Specifies the number of results displayed per page of output in the response, from 1 - 500, default = 50. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllContacts: (status?: GetAllContactsStatusEnum, email?: string, lists?: string, segmentId?: string, tags?: string, updatedAfter?: string, updatedBefore?: string, createdAfter?: string, createdBefore?: string, optoutAfter?: string, optoutBefore?: string, include?: GetAllContactsIncludeEnum, smsStatus?: GetAllContactsSmsStatusEnum, includeCount?: boolean, limit?: number, options?: RawAxiosRequestConfig) => Promise; /** * This endpoint GETs a specific contact resource (contact_id). Use the `include` query parameter to add any of the available contact sub-resources to the response payload. * @summary GET a Contact * @param {string} contactId Unique ID of contact to GET * @param {GetContactByIdIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `phone_numbers`, `street_addresses`, `notes`, `sms_channel`, and `taggings`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactById: (contactId: string, include?: GetContactByIdIncludeEnum, options?: RawAxiosRequestConfig) => Promise; /** * Use to get the total contacts count for the account and the total contact-consent counts for each consent state. Optionally, to include the total number of contacts that subscribed within the last 30 days in the results, use `new_subscribers` in the `include` query parameter. To optimize open rates, reduce spam reports, and help grow your business, you must value your contact\'s consent to receive or to not receive your emails. * @summary GET Contact Consent Counts * @param {GetContactCountsIncludeEnum} [include] Use to return the total number of contacts that subscribed within the last 30 days in the results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactCounts: (include?: GetContactCountsIncludeEnum, options?: RawAxiosRequestConfig) => Promise; /** *

Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.

This GET call retrieves a collection of cross-referenced contact sequence IDs (`id` used in the V2 API) and UUIDs (`contact_id` used in the V3 API). This endpoint is intended for developers who have an existing V2 API integration, and are migrating their users to a new V3 API integration. The V2 and V3 APIs use different resource ID formats. Use the `sequence_ids` query parameter to specify a set of comma delimited V2 contacts ids to cross-referenced with their V3 `contact_ids`. See [Migrating to V3](/api_guide/migration_overview.html) to learn more. * @summary GET a collection of V2 and V3 API contact IDs * @param {string} sequenceIds Comma delimited list of V2 API contact `ids` to cross-reference with the V3 API `contact_id` value. Endpoint accepts a maximum of 500 ids at a time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactIdXrefs: (sequenceIds: string, options?: RawAxiosRequestConfig) => Promise; /** * Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details. * @summary GET SMS Engagement History for a Contact * @param {string} contactId The contact\'s unique ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSmsEngagementHistory: (contactId: string, options?: RawAxiosRequestConfig) => Promise; /** * The PUT method updates an existing contact. You must include the `update_source` property in the PUT request payload. To restore a deleted contact you must specify the `update_source` as `Account`. When updating any resource using PUT, all properties are updated, overwriting all previous values. Any properties left blank or not included in the request are overwritten with null value - however this does not apply to contact subresources. Add or change any of the subresources by including them in the PUT request payload. Omitted subresources are not overwritten with null. If the contact being updated is deleted, the contact will be revived. * @summary PUT (update) a Contact * @param {string} contactId Unique ID of contact to update * @param {UpdateContactRequest} updateContactRequest JSON payload defining the contact object, with updates. Any properties left blank or not included in the PUT payload are overwritten with null value - does not apply to contact subresources. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateContact: (contactId: string, updateContactRequest: UpdateContactRequest, options?: RawAxiosRequestConfig) => Promise; }; /** * ContactsApi - functional programming interface * @export */ export declare const ContactsApiFp: (configuration?: Configuration) => { /** * Creates a new contact resource; you must include the `create_source` property and at least one of the following properties when creating a new contact: `first_name`, `last_name`, or `email_address` (`email_address` must be unique for each contact). * @summary POST (create) a Contact * @param {CreateContactRequest} createContactRequest The JSON payload defining the contact * @param {*} [options] Override http request option. * @throws {RequiredError} */ createContact(createContactRequest: CreateContactRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this method to create a new contact or update an existing contact. This method uses the `email_address` string value you include in the request body to determine if it should create an new contact or update an existing contact. Updates to existing contacts are partial updates. This method only updates the contact properties you include in the request body. Updates append new contact lists or custom fields to the existing `list_memberships` or `custom_fields` arrays.

Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.

When this method creates a new contact, it returns a 201 response code. When this method updates an existing contact, it returns a 200 response code. Updating a deleted contact restores the contact. The method automatically modifies the contact\'s `permission_to_send` and `opt_in_source` properties depending on the [Confirmed Opt-In](https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-email-campaigns-to-your-contacts-by-using-confirmed-opt-in) Constant Contact account setting: If Confirmed Opt-in is _enabled_, this method automatically sets the `permission_to_send` property as pending\\_confirmation for new contacts. If Confirmed Opt-in is _disabled_, this method automatically sets the `permission_to_send` property as explicit and the `opt_in_source` property as `Contact` for new contacts. Updated contacts have their `permission_to_send` property set as explicit. * @summary Create or Update a Contact * @param {CreateOrUpdateContactRequest} createOrUpdateContactRequest A JSON request body payload that contains the contact resource you are creating or updating. The request body must contain the `email_address` property and the `list_memberships` array. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrUpdateContact(createOrUpdateContactRequest: CreateOrUpdateContactRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes the contact identified by the contact_id path parameter. Deleted contacts won\'t receive email from you, and they don\'t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be revived, or added back to an account. Learn how to [revive deleted contacts](/api_guide/contacts_delete.html#revive). * @summary DELETE a Contact * @param {string} contactId Unique ID of contact to DELETE * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteContact(contactId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this method to return a collection of contacts. Use the query parameters to search for contacts that match specific contact properties and subresourse properties as criteria. For example, you can search using the contact\'s `email` address, `lists` memberships, and by the date range that a contact was created or updated. Use the `limit` query parameter to limit the number of results returned per page. Use the `include` query parameter to include contact sub-resources in the response and `include_count` to include the total number of contacts that meet your specified search criteria. By default, this method returns all contacts that are not deleted. Use the `status` query parameter with the value `all` to return all contacts including deleted contacts. * @summary GET Contacts Collection * @param {GetAllContactsStatusEnum} [status] Use the `status` query parameter to search for contacts by status. This parameter accepts one or more comma separated values: `all`, `active`, `deleted`, `not_set`, `pending_confirmation`, `temp_hold`, and `unsubscribed`. * @param {string} [email] Use the `email` query parameter to search for a contact using a specific email address. * @param {string} [lists] Use the `lists` query parameter to search for contacts that are members of one or more specified lists. Use a comma to separate multiple `list_id` values, up to a maximum of 25. * @param {string} [segmentId] Use to get contacts that meet the segment criteria for a single specified `segment_id`. This query parameter can only be combined with the limit query parameter. When using the `segment_id` query parameter, the V3 API may return a 202 response code instead of a 200 response. The 202 response code indicates that your request has been accepted, but not fully completed. Retry sending your API request to return the completed results and a 200 response code. * @param {string} [tags] Use to get contact details for up to 50 specified tags. Use a comma to separate each `tag_id`. * @param {string} [updatedAfter] Use `updated_after` to search for contacts that have been updated after the date you specify. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [updatedBefore] Use `updated_before` to search for contacts that have been updated before a specified date. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdAfter] Use `created_after` to search for contacts created after a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdBefore] Use `created_before` to search for contacts created before a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [optoutAfter] Use `optout_after` to search for contacts that unsubscribed after a specified date. * @param {string} [optoutBefore] Use `optout_before` to search for contacts that unsubscribed before a specified date. * @param {GetAllContactsIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `taggings`, `notes`,`phone_numbers`, `street_addresses`, `sms_channel`. * @param {GetAllContactsSmsStatusEnum} [smsStatus] Use to get contacts by their SMS status. This parameter accepts one or more comma separated values: `all`, `explicit`, `unsubscribed`, `pending_confirmation`, `not_set`. * @param {boolean} [includeCount] Set `include_count=true` to include the total number of contacts (`contacts_count`) that meet all search criteria in the response body. * @param {number} [limit] Specifies the number of results displayed per page of output in the response, from 1 - 500, default = 50. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllContacts(status?: GetAllContactsStatusEnum, email?: string, lists?: string, segmentId?: string, tags?: string, updatedAfter?: string, updatedBefore?: string, createdAfter?: string, createdBefore?: string, optoutAfter?: string, optoutBefore?: string, include?: GetAllContactsIncludeEnum, smsStatus?: GetAllContactsSmsStatusEnum, includeCount?: boolean, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * This endpoint GETs a specific contact resource (contact_id). Use the `include` query parameter to add any of the available contact sub-resources to the response payload. * @summary GET a Contact * @param {string} contactId Unique ID of contact to GET * @param {GetContactByIdIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `phone_numbers`, `street_addresses`, `notes`, `sms_channel`, and `taggings`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactById(contactId: string, include?: GetContactByIdIncludeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use to get the total contacts count for the account and the total contact-consent counts for each consent state. Optionally, to include the total number of contacts that subscribed within the last 30 days in the results, use `new_subscribers` in the `include` query parameter. To optimize open rates, reduce spam reports, and help grow your business, you must value your contact\'s consent to receive or to not receive your emails. * @summary GET Contact Consent Counts * @param {GetContactCountsIncludeEnum} [include] Use to return the total number of contacts that subscribed within the last 30 days in the results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactCounts(include?: GetContactCountsIncludeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** *

Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.

This GET call retrieves a collection of cross-referenced contact sequence IDs (`id` used in the V2 API) and UUIDs (`contact_id` used in the V3 API). This endpoint is intended for developers who have an existing V2 API integration, and are migrating their users to a new V3 API integration. The V2 and V3 APIs use different resource ID formats. Use the `sequence_ids` query parameter to specify a set of comma delimited V2 contacts ids to cross-referenced with their V3 `contact_ids`. See [Migrating to V3](/api_guide/migration_overview.html) to learn more. * @summary GET a collection of V2 and V3 API contact IDs * @param {string} sequenceIds Comma delimited list of V2 API contact `ids` to cross-reference with the V3 API `contact_id` value. Endpoint accepts a maximum of 500 ids at a time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactIdXrefs(sequenceIds: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details. * @summary GET SMS Engagement History for a Contact * @param {string} contactId The contact\'s unique ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSmsEngagementHistory(contactId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * The PUT method updates an existing contact. You must include the `update_source` property in the PUT request payload. To restore a deleted contact you must specify the `update_source` as `Account`. When updating any resource using PUT, all properties are updated, overwriting all previous values. Any properties left blank or not included in the request are overwritten with null value - however this does not apply to contact subresources. Add or change any of the subresources by including them in the PUT request payload. Omitted subresources are not overwritten with null. If the contact being updated is deleted, the contact will be revived. * @summary PUT (update) a Contact * @param {string} contactId Unique ID of contact to update * @param {UpdateContactRequest} updateContactRequest JSON payload defining the contact object, with updates. Any properties left blank or not included in the PUT payload are overwritten with null value - does not apply to contact subresources. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateContact(contactId: string, updateContactRequest: UpdateContactRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ContactsApi - factory interface * @export */ export declare const ContactsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a new contact resource; you must include the `create_source` property and at least one of the following properties when creating a new contact: `first_name`, `last_name`, or `email_address` (`email_address` must be unique for each contact). * @summary POST (create) a Contact * @param {CreateContactRequest} createContactRequest The JSON payload defining the contact * @param {*} [options] Override http request option. * @throws {RequiredError} */ createContact(createContactRequest: CreateContactRequest, options?: any): AxiosPromise; /** * Use this method to create a new contact or update an existing contact. This method uses the `email_address` string value you include in the request body to determine if it should create an new contact or update an existing contact. Updates to existing contacts are partial updates. This method only updates the contact properties you include in the request body. Updates append new contact lists or custom fields to the existing `list_memberships` or `custom_fields` arrays.

Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.

When this method creates a new contact, it returns a 201 response code. When this method updates an existing contact, it returns a 200 response code. Updating a deleted contact restores the contact. The method automatically modifies the contact\'s `permission_to_send` and `opt_in_source` properties depending on the [Confirmed Opt-In](https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-email-campaigns-to-your-contacts-by-using-confirmed-opt-in) Constant Contact account setting: If Confirmed Opt-in is _enabled_, this method automatically sets the `permission_to_send` property as pending\\_confirmation for new contacts. If Confirmed Opt-in is _disabled_, this method automatically sets the `permission_to_send` property as explicit and the `opt_in_source` property as `Contact` for new contacts. Updated contacts have their `permission_to_send` property set as explicit. * @summary Create or Update a Contact * @param {CreateOrUpdateContactRequest} createOrUpdateContactRequest A JSON request body payload that contains the contact resource you are creating or updating. The request body must contain the `email_address` property and the `list_memberships` array. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrUpdateContact(createOrUpdateContactRequest: CreateOrUpdateContactRequest, options?: any): AxiosPromise; /** * Deletes the contact identified by the contact_id path parameter. Deleted contacts won\'t receive email from you, and they don\'t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be revived, or added back to an account. Learn how to [revive deleted contacts](/api_guide/contacts_delete.html#revive). * @summary DELETE a Contact * @param {string} contactId Unique ID of contact to DELETE * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteContact(contactId: string, options?: any): AxiosPromise; /** * Use this method to return a collection of contacts. Use the query parameters to search for contacts that match specific contact properties and subresourse properties as criteria. For example, you can search using the contact\'s `email` address, `lists` memberships, and by the date range that a contact was created or updated. Use the `limit` query parameter to limit the number of results returned per page. Use the `include` query parameter to include contact sub-resources in the response and `include_count` to include the total number of contacts that meet your specified search criteria. By default, this method returns all contacts that are not deleted. Use the `status` query parameter with the value `all` to return all contacts including deleted contacts. * @summary GET Contacts Collection * @param {GetAllContactsStatusEnum} [status] Use the `status` query parameter to search for contacts by status. This parameter accepts one or more comma separated values: `all`, `active`, `deleted`, `not_set`, `pending_confirmation`, `temp_hold`, and `unsubscribed`. * @param {string} [email] Use the `email` query parameter to search for a contact using a specific email address. * @param {string} [lists] Use the `lists` query parameter to search for contacts that are members of one or more specified lists. Use a comma to separate multiple `list_id` values, up to a maximum of 25. * @param {string} [segmentId] Use to get contacts that meet the segment criteria for a single specified `segment_id`. This query parameter can only be combined with the limit query parameter. When using the `segment_id` query parameter, the V3 API may return a 202 response code instead of a 200 response. The 202 response code indicates that your request has been accepted, but not fully completed. Retry sending your API request to return the completed results and a 200 response code. * @param {string} [tags] Use to get contact details for up to 50 specified tags. Use a comma to separate each `tag_id`. * @param {string} [updatedAfter] Use `updated_after` to search for contacts that have been updated after the date you specify. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [updatedBefore] Use `updated_before` to search for contacts that have been updated before a specified date. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdAfter] Use `created_after` to search for contacts created after a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdBefore] Use `created_before` to search for contacts created before a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [optoutAfter] Use `optout_after` to search for contacts that unsubscribed after a specified date. * @param {string} [optoutBefore] Use `optout_before` to search for contacts that unsubscribed before a specified date. * @param {GetAllContactsIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `taggings`, `notes`,`phone_numbers`, `street_addresses`, `sms_channel`. * @param {GetAllContactsSmsStatusEnum} [smsStatus] Use to get contacts by their SMS status. This parameter accepts one or more comma separated values: `all`, `explicit`, `unsubscribed`, `pending_confirmation`, `not_set`. * @param {boolean} [includeCount] Set `include_count=true` to include the total number of contacts (`contacts_count`) that meet all search criteria in the response body. * @param {number} [limit] Specifies the number of results displayed per page of output in the response, from 1 - 500, default = 50. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllContacts(status?: GetAllContactsStatusEnum, email?: string, lists?: string, segmentId?: string, tags?: string, updatedAfter?: string, updatedBefore?: string, createdAfter?: string, createdBefore?: string, optoutAfter?: string, optoutBefore?: string, include?: GetAllContactsIncludeEnum, smsStatus?: GetAllContactsSmsStatusEnum, includeCount?: boolean, limit?: number, options?: any): AxiosPromise; /** * This endpoint GETs a specific contact resource (contact_id). Use the `include` query parameter to add any of the available contact sub-resources to the response payload. * @summary GET a Contact * @param {string} contactId Unique ID of contact to GET * @param {GetContactByIdIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `phone_numbers`, `street_addresses`, `notes`, `sms_channel`, and `taggings`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactById(contactId: string, include?: GetContactByIdIncludeEnum, options?: any): AxiosPromise; /** * Use to get the total contacts count for the account and the total contact-consent counts for each consent state. Optionally, to include the total number of contacts that subscribed within the last 30 days in the results, use `new_subscribers` in the `include` query parameter. To optimize open rates, reduce spam reports, and help grow your business, you must value your contact\'s consent to receive or to not receive your emails. * @summary GET Contact Consent Counts * @param {GetContactCountsIncludeEnum} [include] Use to return the total number of contacts that subscribed within the last 30 days in the results. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactCounts(include?: GetContactCountsIncludeEnum, options?: any): AxiosPromise; /** *

Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.

This GET call retrieves a collection of cross-referenced contact sequence IDs (`id` used in the V2 API) and UUIDs (`contact_id` used in the V3 API). This endpoint is intended for developers who have an existing V2 API integration, and are migrating their users to a new V3 API integration. The V2 and V3 APIs use different resource ID formats. Use the `sequence_ids` query parameter to specify a set of comma delimited V2 contacts ids to cross-referenced with their V3 `contact_ids`. See [Migrating to V3](/api_guide/migration_overview.html) to learn more. * @summary GET a collection of V2 and V3 API contact IDs * @param {string} sequenceIds Comma delimited list of V2 API contact `ids` to cross-reference with the V3 API `contact_id` value. Endpoint accepts a maximum of 500 ids at a time. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getContactIdXrefs(sequenceIds: string, options?: any): AxiosPromise; /** * Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details. * @summary GET SMS Engagement History for a Contact * @param {string} contactId The contact\'s unique ID. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSmsEngagementHistory(contactId: string, options?: any): AxiosPromise>; /** * The PUT method updates an existing contact. You must include the `update_source` property in the PUT request payload. To restore a deleted contact you must specify the `update_source` as `Account`. When updating any resource using PUT, all properties are updated, overwriting all previous values. Any properties left blank or not included in the request are overwritten with null value - however this does not apply to contact subresources. Add or change any of the subresources by including them in the PUT request payload. Omitted subresources are not overwritten with null. If the contact being updated is deleted, the contact will be revived. * @summary PUT (update) a Contact * @param {string} contactId Unique ID of contact to update * @param {UpdateContactRequest} updateContactRequest JSON payload defining the contact object, with updates. Any properties left blank or not included in the PUT payload are overwritten with null value - does not apply to contact subresources. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateContact(contactId: string, updateContactRequest: UpdateContactRequest, options?: any): AxiosPromise; }; /** * ContactsApi - object-oriented interface * @export * @class ContactsApi * @extends {BaseAPI} */ export declare class ContactsApi extends BaseAPI { /** * Creates a new contact resource; you must include the `create_source` property and at least one of the following properties when creating a new contact: `first_name`, `last_name`, or `email_address` (`email_address` must be unique for each contact). * @summary POST (create) a Contact * @param {CreateContactRequest} createContactRequest The JSON payload defining the contact * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ createContact(createContactRequest: CreateContactRequest, options?: RawAxiosRequestConfig): Promise>; /** * Use this method to create a new contact or update an existing contact. This method uses the `email_address` string value you include in the request body to determine if it should create an new contact or update an existing contact. Updates to existing contacts are partial updates. This method only updates the contact properties you include in the request body. Updates append new contact lists or custom fields to the existing `list_memberships` or `custom_fields` arrays.

Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.

When this method creates a new contact, it returns a 201 response code. When this method updates an existing contact, it returns a 200 response code. Updating a deleted contact restores the contact. The method automatically modifies the contact\'s `permission_to_send` and `opt_in_source` properties depending on the [Confirmed Opt-In](https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-email-campaigns-to-your-contacts-by-using-confirmed-opt-in) Constant Contact account setting: If Confirmed Opt-in is _enabled_, this method automatically sets the `permission_to_send` property as pending\\_confirmation for new contacts. If Confirmed Opt-in is _disabled_, this method automatically sets the `permission_to_send` property as explicit and the `opt_in_source` property as `Contact` for new contacts. Updated contacts have their `permission_to_send` property set as explicit. * @summary Create or Update a Contact * @param {CreateOrUpdateContactRequest} createOrUpdateContactRequest A JSON request body payload that contains the contact resource you are creating or updating. The request body must contain the `email_address` property and the `list_memberships` array. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ createOrUpdateContact(createOrUpdateContactRequest: CreateOrUpdateContactRequest, options?: RawAxiosRequestConfig): Promise>; /** * Deletes the contact identified by the contact_id path parameter. Deleted contacts won\'t receive email from you, and they don\'t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be revived, or added back to an account. Learn how to [revive deleted contacts](/api_guide/contacts_delete.html#revive). * @summary DELETE a Contact * @param {string} contactId Unique ID of contact to DELETE * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ deleteContact(contactId: string, options?: RawAxiosRequestConfig): Promise>; /** * Use this method to return a collection of contacts. Use the query parameters to search for contacts that match specific contact properties and subresourse properties as criteria. For example, you can search using the contact\'s `email` address, `lists` memberships, and by the date range that a contact was created or updated. Use the `limit` query parameter to limit the number of results returned per page. Use the `include` query parameter to include contact sub-resources in the response and `include_count` to include the total number of contacts that meet your specified search criteria. By default, this method returns all contacts that are not deleted. Use the `status` query parameter with the value `all` to return all contacts including deleted contacts. * @summary GET Contacts Collection * @param {GetAllContactsStatusEnum} [status] Use the `status` query parameter to search for contacts by status. This parameter accepts one or more comma separated values: `all`, `active`, `deleted`, `not_set`, `pending_confirmation`, `temp_hold`, and `unsubscribed`. * @param {string} [email] Use the `email` query parameter to search for a contact using a specific email address. * @param {string} [lists] Use the `lists` query parameter to search for contacts that are members of one or more specified lists. Use a comma to separate multiple `list_id` values, up to a maximum of 25. * @param {string} [segmentId] Use to get contacts that meet the segment criteria for a single specified `segment_id`. This query parameter can only be combined with the limit query parameter. When using the `segment_id` query parameter, the V3 API may return a 202 response code instead of a 200 response. The 202 response code indicates that your request has been accepted, but not fully completed. Retry sending your API request to return the completed results and a 200 response code. * @param {string} [tags] Use to get contact details for up to 50 specified tags. Use a comma to separate each `tag_id`. * @param {string} [updatedAfter] Use `updated_after` to search for contacts that have been updated after the date you specify. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [updatedBefore] Use `updated_before` to search for contacts that have been updated before a specified date. To search for updated contacts within a date range, specify both `updated_after` and `updated_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdAfter] Use `created_after` to search for contacts created after a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [createdBefore] Use `created_before` to search for contacts created before a specified date. To search for contacts created within a date range, specify both `created_after` and `created_before` dates. Accepts ISO-8601 formatted dates. * @param {string} [optoutAfter] Use `optout_after` to search for contacts that unsubscribed after a specified date. * @param {string} [optoutBefore] Use `optout_before` to search for contacts that unsubscribed before a specified date. * @param {GetAllContactsIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `taggings`, `notes`,`phone_numbers`, `street_addresses`, `sms_channel`. * @param {GetAllContactsSmsStatusEnum} [smsStatus] Use to get contacts by their SMS status. This parameter accepts one or more comma separated values: `all`, `explicit`, `unsubscribed`, `pending_confirmation`, `not_set`. * @param {boolean} [includeCount] Set `include_count=true` to include the total number of contacts (`contacts_count`) that meet all search criteria in the response body. * @param {number} [limit] Specifies the number of results displayed per page of output in the response, from 1 - 500, default = 50. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ getAllContacts(status?: GetAllContactsStatusEnum, email?: string, lists?: string, segmentId?: string, tags?: string, updatedAfter?: string, updatedBefore?: string, createdAfter?: string, createdBefore?: string, optoutAfter?: string, optoutBefore?: string, include?: GetAllContactsIncludeEnum, smsStatus?: GetAllContactsSmsStatusEnum, includeCount?: boolean, limit?: number, options?: RawAxiosRequestConfig): Promise>; /** * This endpoint GETs a specific contact resource (contact_id). Use the `include` query parameter to add any of the available contact sub-resources to the response payload. * @summary GET a Contact * @param {string} contactId Unique ID of contact to GET * @param {GetContactByIdIncludeEnum} [include] Use `include` to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: `custom_fields`, `list_memberships`, `phone_numbers`, `street_addresses`, `notes`, `sms_channel`, and `taggings`. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ getContactById(contactId: string, include?: GetContactByIdIncludeEnum, options?: RawAxiosRequestConfig): Promise>; /** * Use to get the total contacts count for the account and the total contact-consent counts for each consent state. Optionally, to include the total number of contacts that subscribed within the last 30 days in the results, use `new_subscribers` in the `include` query parameter. To optimize open rates, reduce spam reports, and help grow your business, you must value your contact\'s consent to receive or to not receive your emails. * @summary GET Contact Consent Counts * @param {GetContactCountsIncludeEnum} [include] Use to return the total number of contacts that subscribed within the last 30 days in the results. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ getContactCounts(include?: GetContactCountsIncludeEnum, options?: RawAxiosRequestConfig): Promise>; /** *

Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.

This GET call retrieves a collection of cross-referenced contact sequence IDs (`id` used in the V2 API) and UUIDs (`contact_id` used in the V3 API). This endpoint is intended for developers who have an existing V2 API integration, and are migrating their users to a new V3 API integration. The V2 and V3 APIs use different resource ID formats. Use the `sequence_ids` query parameter to specify a set of comma delimited V2 contacts ids to cross-referenced with their V3 `contact_ids`. See [Migrating to V3](/api_guide/migration_overview.html) to learn more. * @summary GET a collection of V2 and V3 API contact IDs * @param {string} sequenceIds Comma delimited list of V2 API contact `ids` to cross-reference with the V3 API `contact_id` value. Endpoint accepts a maximum of 500 ids at a time. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ getContactIdXrefs(sequenceIds: string, options?: RawAxiosRequestConfig): Promise>; /** * Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details. * @summary GET SMS Engagement History for a Contact * @param {string} contactId The contact\'s unique ID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ getSmsEngagementHistory(contactId: string, options?: RawAxiosRequestConfig): Promise>; /** * The PUT method updates an existing contact. You must include the `update_source` property in the PUT request payload. To restore a deleted contact you must specify the `update_source` as `Account`. When updating any resource using PUT, all properties are updated, overwriting all previous values. Any properties left blank or not included in the request are overwritten with null value - however this does not apply to contact subresources. Add or change any of the subresources by including them in the PUT request payload. Omitted subresources are not overwritten with null. If the contact being updated is deleted, the contact will be revived. * @summary PUT (update) a Contact * @param {string} contactId Unique ID of contact to update * @param {UpdateContactRequest} updateContactRequest JSON payload defining the contact object, with updates. Any properties left blank or not included in the PUT payload are overwritten with null value - does not apply to contact subresources. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ updateContact(contactId: string, updateContactRequest: UpdateContactRequest, options?: RawAxiosRequestConfig): Promise>; } /** * @export */ export declare const GetAllContactsStatusEnum: { readonly All: "all"; readonly Active: "active"; readonly Deleted: "deleted"; readonly NotSet: "not_set"; readonly PendingConfirmation: "pending_confirmation"; readonly TempHold: "temp_hold"; readonly Unsubscribed: "unsubscribed"; }; export type GetAllContactsStatusEnum = typeof GetAllContactsStatusEnum[keyof typeof GetAllContactsStatusEnum]; /** * @export */ export declare const GetAllContactsIncludeEnum: { readonly CustomFields: "custom_fields"; readonly ListMemberships: "list_memberships"; readonly PhoneNumbers: "phone_numbers"; readonly StreetAddresses: "street_addresses"; readonly Taggings: "taggings"; readonly Notes: "notes"; readonly SmsChannel: "sms_channel"; }; export type GetAllContactsIncludeEnum = typeof GetAllContactsIncludeEnum[keyof typeof GetAllContactsIncludeEnum]; /** * @export */ export declare const GetAllContactsSmsStatusEnum: { readonly All: "all"; readonly Explicit: "explicit"; readonly Unsubscribed: "unsubscribed"; readonly PendingConfirmation: "pending_confirmation"; readonly NotSet: "not_set"; }; export type GetAllContactsSmsStatusEnum = typeof GetAllContactsSmsStatusEnum[keyof typeof GetAllContactsSmsStatusEnum]; /** * @export */ export declare const GetContactByIdIncludeEnum: { readonly CustomFields: "custom_fields"; readonly ListMemberships: "list_memberships"; readonly PhoneNumbers: "phone_numbers"; readonly StreetAddresses: "street_addresses"; readonly Taggings: "taggings"; readonly Notes: "notes"; }; export type GetContactByIdIncludeEnum = typeof GetContactByIdIncludeEnum[keyof typeof GetContactByIdIncludeEnum]; /** * @export */ export declare const GetContactCountsIncludeEnum: { readonly NewSubscriber: "new_subscriber"; }; export type GetContactCountsIncludeEnum = typeof GetContactCountsIncludeEnum[keyof typeof GetContactCountsIncludeEnum];