mirror of https://github.com/zulip/zulip.git
outgoing-webhooks.md: Document example endpoint responses.
This commit is contained in:
parent
10570d508f
commit
5c8b774628
|
@ -109,15 +109,38 @@ is helpful to distinguish deliberate non-responses from bugs.)
|
||||||
|
|
||||||
### Example incoming payload
|
### Example incoming payload
|
||||||
|
|
||||||
|
This is an example of the JSON payload that the Zulip server will `POST`
|
||||||
|
to your server:
|
||||||
|
|
||||||
{generate_code_example|zulip-outgoing-webhook-payload|fixture}
|
{generate_code_example|zulip-outgoing-webhook-payload|fixture}
|
||||||
|
|
||||||
|
### Example response payloads
|
||||||
|
|
||||||
|
Here's an example of the JSON your server should respond with if
|
||||||
|
you would not like to send a response message:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"response_not_required": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Here's an example of the JSON your server should respond with if
|
||||||
|
you would like to send a response message:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"content": "Hey, we just received something from Zulip!"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Slack-format webhook format
|
## Slack-format webhook format
|
||||||
|
|
||||||
This interface translates the Zulip's outgoing webhook's request into
|
This interface translates Zulip's outgoing webhook's request into
|
||||||
Slack's outgoing webhook request. Hence the outgoing webhook bot
|
the format that Slack expects. Hence the outgoing webhook bot
|
||||||
would be able to post data to URLs which support Slack's outgoing
|
would be able to post data to URLs which support Slack-style
|
||||||
webhooks. Here's how we fill in the fields that a Slack format
|
webhook payloads. Here's how we fill in the fields that a
|
||||||
webhook expects:
|
Slack-format webhook expects:
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
Loading…
Reference in New Issue