[core] Name endpoints and webhooks

This commit is contained in:
allburov committed 2023-09-17 15:59:27 +07:00
1 parent 9413376138
commit 399e27e24e
5 files changed
+5 -5

No files matched your search

@@ -15,7 +15,7 @@ Parameters in path that you can find in below endpoints:
- `{session}` - use the session name for Whatsapp instance that you created with `POST /api/session/start` endpoint
- `{chatId}` - chat id in format `123123123123@[c.us|g.us]`, `c.us` for direct chats and `g.us` for groups.
## Methods
## Endpoints
### Get all chats
Get all chats
`GET /api/{session}/chats`
@@ -54,7 +54,7 @@ The response you get back:
You must save the `id` field from the response in your database so that you can identify the poll for which you receive
a vote (see webhook events below).
## Events
## Webhooks
### poll.vote
@@ -129,7 +129,7 @@ You can subscribe to presence information by calling `POST /api/{session}/presen
You can get later presence information for the chat with above `GET` endpoints or by listening to `presence.update`
webhook.
## Events
## Webhooks
### presence.update
You can subscribe to `presence.update` webhook event to get the most recent presence information.
@@ -36,7 +36,7 @@ Start a new session with configured `message` event in webhooks - call `POST /ap
After that WAHA'll send events (see below) about new messages to an endpoint you provided.
## Events
## Webhooks
Here's examples of message-related events.
Read [Webhooks ->]({{< relref "/docs/how-to/webhooks" >}}) to find how to set them up.
@@ -108,7 +108,7 @@ docker run -it -e "WHATSAPP_HOOK_EVENTS=*" -e WHATSAPP_HOOK_URL=https://httpbin.
## Events
## Webhooks
### message