contact

get contact details by ID

Retrieves detailed contact information for a specific contact using their ID. Returns contact details including name, number, business status, and various contact flags.

post/instances/{id}/client/action/get-contact-by-id

Request

  • Base URL: https://waapi.app/api/v1
  • URL: https://waapi.app/api/v1/instances/{id}/client/action/get-contact-by-id
  • Auth: HTTP bearer

Path parameters

idinteger required

Instance ID

Request body

contactIdstring required

Contact ID: <number>@c.us or <lid>@lid.

Example request

{
  "contactId": "1234567890@c.us"
}

Response

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation. Payload: Contact details retrieved successfully.

status'success' | 'error'

Whether the request reached the instance. success here does not mean the action was carried out — that is reported by data.status, which is the authoritative one. A malformed input arrives as status: success with data.status: error.

Example response

{
  "data": {
    "status": "success",
    "data": {
      "id": {
        "server": "c.us",
        "user": "1234567890",
        "_serialized": "1234567890@c.us"
      },
      "number": "1234567890",
      "name": "Contact Name",
      "pushname": "Contact Name",
      "shortName": "Contact",
      "type": "in",
      "isUser": true,
      "isWAContact": true,
      "isMyContact": true
    }
  },
  "links": {
    "self": "https://waapi.app/api/v1/instances/1/client/action/get-contact-by-id"
  },
  "status": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.