open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Contacts Client API

Generated client method reference for the contacts namespace.

Client Contacts Methods Wally

Contacts Client API

Generated file warning: this page is generated by packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.

This page documents 10 schema-registry client methods in the contacts namespace.

blockContact

Block a contact

Overview

PropValue
Namespacecontacts
Actionupdate
Functionalityboth
Positional parameter ordercontactId
AliasescontactBlock, contacts.block, contacts.contactBlock
Deprecated aliasescontactBlock, contacts.contactBlock
Licensenone
WAPI overridecontactBlock
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/contacts/blockblockContactActive
AliasPUT/api/blockContactblockContactActive
Deprecated aliasPUT/api/contactBlockcontactBlockDeprecated
Deprecated aliasPUT/api/contacts/contactBlockcontacts.contactBlockDeprecated

Usage

const result = await client.blockContact({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.block({
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/contacts/block" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean

checkNumberStatusInsiders

Check if number is on WhatsApp

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter ordercontactId
Aliasescontacts.checkNumberStatus
Deprecated aliases-
Licenseinsiders
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/checkNumberStatuscheckNumberStatusActive
AliasGET/api/checkNumberStatuscheckNumberStatusActive

Usage

const result = await client.checkNumberStatus({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.checkNumberStatus({
  contactId: "447123456789@c.us",
});
curl -G "http://localhost:8080/api/contacts/checkNumberStatus" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "contactId=447123456789@c.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown

checkReadReceipts

Check read receipts setting

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter ordercontactId
Aliasescontacts.checkReadReceipts, contacts.getReadReceipts, getReadReceipts
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/checkReadReceiptscheckReadReceiptsActive
AliasGET/api/checkReadReceiptscheckReadReceiptsActive
AliasGET/api/contacts/getReadReceiptscontacts.getReadReceiptsActive
AliasGET/api/getReadReceiptsgetReadReceiptsActive

Usage

const result = await client.checkReadReceipts({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.checkReadReceipts({
  contactId: "447123456789@c.us",
});
curl -G "http://localhost:8080/api/contacts/checkReadReceipts" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "contactId=447123456789@c.us"

Parameters

Prop

Type

Output

PropValue
Return typeboolean | string

getAllContacts

Retrieves all contacts

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter order-
Aliasescontacts.all, contacts.getAll, contacts.list, listContacts
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/getAllgetAllContactsActive
AliasGET/api/contacts/allcontacts.allActive
AliasGET/api/contacts/listcontacts.listActive
AliasGET/api/getAllContactsgetAllContactsActive
AliasGET/api/listContactslistContactsActive

Usage

const result = await client.getAllContacts({});
const result = await client.contacts.getAll({});
curl -X GET "http://localhost:8080/api/contacts/getAll" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{}'

Parameters

This method does not define input parameters.

Output

PropValue
Return typeunknown[]

getBlockedIds

Get blocked contact IDs

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter order-
Aliasescontacts.getBlockedIds
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/getBlockedIdsgetBlockedIdsActive
AliasGET/api/getBlockedIdsgetBlockedIdsActive

Usage

const result = await client.getBlockedIds({});
const result = await client.contacts.getBlockedIds({});
curl -X GET "http://localhost:8080/api/contacts/getBlockedIds" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{}'

Parameters

This method does not define input parameters.

Output

PropValue
Return typestring[]

getCommonGroups

Get common groups with contact

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter ordercontactId
Aliasescontacts.getCommonGroups
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/getCommonGroupsgetCommonGroupsActive
AliasGET/api/getCommonGroupsgetCommonGroupsActive

Usage

const result = await client.getCommonGroups({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.getCommonGroups({
  contactId: "447123456789@c.us",
});
curl -G "http://localhost:8080/api/contacts/getCommonGroups" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "contactId=447123456789@c.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown

getContact

Get specific contact

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter ordercontactId
Aliasescontacts.get
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/getgetContactActive
AliasGET/api/getContactgetContactActive

Usage

const result = await client.getContact({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.get({
  contactId: "447123456789@c.us",
});
curl -G "http://localhost:8080/api/contacts/get" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "contactId=447123456789@c.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown

getNumberProfileInsiders

Get profile of number

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter ordercontactId
Aliasescontacts.getNumberProfile
Deprecated aliases-
Licenseinsiders
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/getNumberProfilegetNumberProfileActive
AliasGET/api/getNumberProfilegetNumberProfileActive

Usage

const result = await client.getNumberProfile({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.getNumberProfile({
  contactId: "447123456789@c.us",
});
curl -G "http://localhost:8080/api/contacts/getNumberProfile" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "contactId=447123456789@c.us"

Parameters

Prop

Type

Output

PropValue
Return typeunknown

getProfilePicture

Get profile picture from server

Overview

PropValue
Namespacecontacts
Actionread
Functionalityboth
Positional parameter orderchatId
Aliasescontacts.getProfilePicFromServer, contacts.getProfilePicture, getProfilePicFromServer
Deprecated aliasescontacts.getProfilePicFromServer, getProfilePicFromServer
Licensenone
WAPI overridegetProfilePicFromServer
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/contacts/getProfilePicturegetProfilePictureActive
Deprecated aliasGET/api/contacts/getProfilePicFromServercontacts.getProfilePicFromServerDeprecated
Deprecated aliasGET/api/getProfilePicFromServergetProfilePicFromServerDeprecated
AliasGET/api/getProfilePicturegetProfilePictureActive

Usage

const result = await client.getProfilePicture({
  chatId: "447123456789@c.us",
});
const result = await client.contacts.getProfilePicture({
  chatId: "447123456789@c.us",
});
curl -G "http://localhost:8080/api/contacts/getProfilePicture" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "chatId=447123456789@c.us"

Parameters

Prop

Type

Output

PropValue
Return typestring

unblockContact

Unblock a contact

Overview

PropValue
Namespacecontacts
Actionupdate
Functionalityboth
Positional parameter ordercontactId
Aliasescontacts.contactUnblock, contacts.unblock, contactUnblock
Deprecated aliasescontacts.contactUnblock, contactUnblock
Licensenone
WAPI overridecontactUnblock
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/contacts/unblockunblockContactActive
Deprecated aliasPUT/api/contacts/contactUnblockcontacts.contactUnblockDeprecated
Deprecated aliasPUT/api/contactUnblockcontactUnblockDeprecated
AliasPUT/api/unblockContactunblockContactActive

Usage

const result = await client.unblockContact({
  contactId: "447123456789@c.us",
});
const result = await client.contacts.unblock({
  contactId: "447123456789@c.us",
});
curl -X PUT "http://localhost:8080/api/contacts/unblock" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "contactId": "447123456789@c.us"
  }'

Parameters

Prop

Type

Output

PropValue
Return typeboolean
Wally the Walrus typing

Was this helpful?

Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!

On this page