Post through an incoming webhook
POST
Terminal window
/api/public/apps/hooks/{token}
Needs the incoming-webhook permission on the app. The secret URL is the credential: send no token.
Posts text to the channel the webhook was made for, as the app. The body matches Slack’s, so existing tools work: without text, Slack’s attachments (pretext, title, text, fields) become the text.
Parameters
Section titled “Parameters”| Name | In | Required | Meaning |
|---|---|---|---|
token |
path | yes | string |
| Field | Type | Required | Meaning |
|---|---|---|---|
text |
string | no | Up to 8000 characters. |
attachments |
array of object | no | Used only when text is missing. |
Example
Section titled “Example”curl -X POST "https://amedeus.app/api/public/apps/hooks/<secret>" \ -H 'Content-Type: application/json' \ -d '{}'const response = await fetch("https://amedeus.app/api/public/apps/hooks/<secret>", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({}),});const result = await response.json(); // { ok: true, … } or { ok: false, error, message }import jsonimport urllib.request
request = urllib.request.Request( "https://amedeus.app/api/public/apps/hooks/<secret>", data=json.dumps({}).encode(), headers={ "Content-Type": "application/json", "User-Agent": "my-app/1.0", }, method="POST",)with urllib.request.urlopen(request) as response: result = json.load(response) # a 4xx or 5xx raises urllib.error.HTTPErrorResponse
Section titled “Response”| Field | Type | Required | Meaning |
|---|---|---|---|
ok |
true |
yes | |
id |
uuid | yes |
{ "ok": true, "id": "52f4c823-8e7f-4349-bb98-1ac8683aad13"}Errors
Section titled “Errors”Failures answer { "ok": false, "error": "<code>", "message": "…" }; see Errors.
400: The request isn’t valid.404: The URL is wrong or was replaced.429: Slow down;Retry-Aftersays for how many seconds.