# List Contacts

List all contacts in the project. Note that, if a WhatsApp contact is returned, the display_name field of that contact may be populated with the WhatsApp display name (if the name is already stored on the server and the display_name field has not been overwritten by the user).

Endpoint: GET /v1/projects/{project_id}/contacts
Version: 1.0
Security: Basic, oAuth2

## Path parameters:

  - `project_id` (string, required)
    The unique ID of the project. You can find this on the Sinch Dashboard.

## Query parameters:

  - `page_size` (integer)
    Optional. The maximum number of contacts to fetch. The default is 10
and the maximum is 20.

  - `page_token` (string)
    Optional. Next page token previously returned if any.

  - `external_id` (string)
    Optional. Contact identifier in an external system. If used, channel and identity query parameters can't be used.

  - `channel` (string)
    Optional. Specifies a channel, and must be set to one of the enum values. If set, the identity parameter must be set and external_id can't be used. Used in conjunction with identity to uniquely identify the specified channel identity.
    Enum: "WHATSAPP", "RCS", "SMS", "MESSENGER", "VIBERBM", "MMS", "INSTAGRAM", "TELEGRAM", "KAKAOTALK", "KAKAOTALKCHAT", "LINE", "WECHAT", "APPLEBC"

  - `identity` (string)
    Optional. If set, the channel parameter must be set and external_id can't be used. Used in conjunction with channel to uniquely identify the specified channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.

## Response 200 fields (application/json):

  - `contacts` (array)
    List of contacts belonging to the specified project.

  - `contacts.channel_identities` (array)
    List of channel identities.

  - `contacts.channel_identities.identity` (string, required)
    The channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.

  - `contacts.channel_identities.channel` (string, required)
    The identifier of the channel you want to include. Must be one of the enum values.
    Enum: same as `channel` (13 values)

  - `contacts.channel_identities.app_id` (string)
    Required if using a channel that uses app-scoped channel identities. Currently, FB Messenger, Instagram, LINE, and WeChat use app-scoped channel identities, which means contacts will have different channel identities on different Conversation API apps. These can be thought of as virtual identities that are app-specific and, therefore, the app_id must be included in the API call.

  - `contacts.channel_priority` (array)
    List of channels defining the channel priority.
    Enum: same as `channel` (13 values)

  - `contacts.display_name` (string)
    The display name. A default 'Unknown' will be assigned if left empty.

  - `contacts.email` (string)
    Email of the contact.

  - `contacts.external_id` (string)
    Contact identifier in an external system.

  - `contacts.id` (string)
    The ID of the contact.
    Example: "{CONTACT_ID}"

  - `contacts.language` (string)
    Enum: "AF", "SQ", "AR", "AZ", "BN", "BG", "CA", "ZH", "ZH_CN", "ZH_HK", "ZH_TW", "HR", "CS", "DA", "NL", "EN", "EN_GB", "EN_US", "ET", "FIL", "FI", "FR", "DE", "EL", "GU", "HA", "HE", "HI", "HU", "ID", "GA", "IT", "JA", "KN", "KK", "KO", "LO", "LV", "LT", "MK", "MS", "ML", "MR", "NB", "FA", "PL", "PT", "PT_BR", "PT_PT", "PA", "RO", "RU", "SR", "SK", "SL", "ES", "ES_AR", "ES_ES", "ES_MX", "SW", "SV", "TA", "TE", "TH", "TR", "UK", "UR", "UZ", "VI", "ZU"

  - `contacts.metadata` (string)
    Metadata associated with the contact. Up to 1024 characters long.

  - `next_page_token` (string)
    Token that should be included in the next list contacts request to
fetch the next page.

## Response 400 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)


