Send Contact Message via WhatsApp Instance
POST
/v1/instance/{{INSTANCE_ID}}/message/send/contactThis API allows sending a contact card through a specific WhatsApp instance. It enables sharing detailed contact information, such as name, phone number, organization, and email, with the recipient.
Request Parameters
Path Parameters
instance_id
(string) - The unique identifier of the WhatsApp instance. Replacecaaq85kdxw
with your actual instance ID.
Headers
Authorization
(string, required) - Bearer token for authentication. Replace{{ZAPLY_AUTH_TOKEN}}
with your API token.Content-Type
(string, required) - Specifies that the request body is in JSON format. Useapplication/json
.
Request Body
The body should be in JSON format and include the following parameters:
number
(string, required) - The phone number of the recipient, including the country code.- Example:
"918367875645"
- Example:
contact
(object, required) - Contact details of the person to be shared. This object must include the following properties:number
(string, required) - The phone number of the contact, including the country code.- Example:
"16589563245"
- Example:
lastname
(string, required) - The last name of the contact.- Example:
"Smith"
- Example:
firstname
(string, required) - The first name of the contact.- Example:
"John"
- Example:
organization
(string, optional) - The organization the contact belongs to.- Example:
"ABC Inc"
- Example:
email
(string, optional) - The email address of the contact.- Example:
"john@abc.com"
- Example:
Example JSON Request Body:
{
"number": "918367875645",
"contact": {
"number": "16589563245",
"lastname": "Smith",
"firstname": "John",
"organization": "ABC Inc",
"email": "john@abc.com"
}
}
Error Codes
400 Bad Request
- Invalid input parameters (e.g., missing required fields).401 Unauthorized
- Invalid or missingAuthorization
token.404 Not Found
- Instance ID does not exist.500 Internal Server Error
- Server encountered an unexpected condition.
Request
{
"number": "918147069203",
"contact": {
"number": "16589563245",
"lastname": "Smith",
"firstname": "John",
"organization": "ABC Inc",
"email": "john@abc.com"
}
}
Request samples
Responses
{}