Contacts
This endpoint makes an HTTP GET request to retrieve groups from the WPBox API. It requires a token parameter in the query string. The parameter showContacts can also be included in the query string with a value of "no". The request does not contain a request body.
Response
The response to the request has a status code of 200 and returns a JSON object. The object includes a status field and an array of groups, where each group has an id, name, company_id, deleted_at, created_at, and updated_at fields.
noNo content
No content
Get Contacts
This endpoint retrieves the list of contacts.
Request
Endpoint
GET api/wpbox/getContacts
Query Parameters
token(string, required): The authentication token.
Response
status(string): The status of the response.contacts(array): An array of contact objects with the following properties:id(integer): The unique identifier of the contact.name(string): The name of the contact.phone(string): The phone number of the contact.avatar(string): The avatar URL of the contact.country_id(integer): The ID of the country associated with the contact.company_id(integer): The ID of the company associated with the contact.deleted_at(string): The date and time when the contact was deleted, if applicable.created_at(string): The date and time when the contact was created.updated_at(string): The date and time when the contact was last updated.last_reply_at(string): The date and time of the last reply from the contact.last_client_reply_at(string): The date and time of the last reply from the client.last_support_reply_at(string): The date and time of the last reply from the support team.last_message(string): The last message sent by the contact.is_last_message_by_contact(integer): Indicates if the last message was sent by the contact (1) or not (0).has_chat(integer): Indicates if the contact has an active chat (1) or not (0).resolved_chat(integer): Indicates if the chat with the contact is resolved (1) or not (0).user_id(integer): The ID of the user associated with the contact, if applicable.enabled_ai_bot(integer): Indicates if the AI bot is enabled for the contact (1) or not (0).
Example:
No content
No content
Get Contact
This endpoint retrieves data for single contact
Request
Endpoint
GET api/wpbox/getSingleContact
Query Parameters
token(string, required): The authentication token.phone ( string, optional if contact_id is there )
contact_d ( string, optional if phone_id is there )
Response
status(string): The status of the response.contact(array): Contact objects with
No content
No content
Make Contact
This endpoint allows you to make contact with a user.
The request should be sent to
api/wpbox/makeContactusing the HTTP POST method.
Request Body
The request body should be in the raw format and include the following parameters:
token(string): The token for authentication.phone(string): The phone number of the contact.name(string): The name of the contact. Optionalgroups(string): Comma separated list of groups. Optionalcustom(object): The custom fields of the contact. Optional
Response
Status: 200 OK
status(string): The status of the contact request.contact(object): Details of the contact including id, name, phone, avatar, country_id, company_id, deleted_at, created_at, updated_at, last_reply_at, last_client_reply_at, last_support_reply_at, last_message, is_last_message_by_contact, has_chat, resolved_chat, user_id, and enabled_ai_bot.
Europe,AsiaJohn DoeSuccess
Success
Last updated