latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Contacts

Get contacts autocomplete suggestions

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Contacts/getContactsAutocomplete" target="_blank">Try in sandbox</a><br>Get contacts autocomplete suggestions by given search terms.

get/api/v2/contacts/autocomplete

Query parameters

limitinteger

The number of results per page.

querystring required

Find recipients by specified search query.

lists0 | 1

Should lists be returned or not?

Response

Autocomplete data has been returned with success.

entityIdinteger required

Id of entity. 0 if object is a reply.

entityType'reply' | 'contact' | 'list' required

Entry type:

  • contact if it is related to a contact;
  • list if it is related to a contact list;
  • reply if it is related to an incoming message.
valuestring required

ID of the contact/list if entityType is contact/list OR phone number if entityType is reply.

labelstring required

Name of the contact/list if entityType is contact/list OR phone number if entityType is reply.

sharedBystring required

If contact or list was shared by another sub-account, the name of this user will be shown.

isSharedboolean required

If contact or list was shared by another sub-account then true will be set.

avatarstring nullable required

Contact avatar URI.

favoritedboolean required

If contact has been marked as favorite.

userIdinteger required

Owner ID of the contact/list (if it was shared).

countryNamestring required
qpositioninteger required
rpositioninteger required

Example response

[
  {
    "entityId": 362,
    "entityType": "contact",
    "label": "Homer Simpson",
    "sharedBy": "John Doe",
    "isShared": true,
    "avatar": "avatars/dummy_avatar.png",
    "favorited": true,
    "userId": 33,
    "countryName": "Australia"
  }
]