Files
remanso-jetstream/docs/Remanso Jetstream API/webhooks/Add one or more webhook subscriptions.bru
Julien Calixte 4ff3ea6644 docs(api): add Bruno collection for Jetstream API
Excludes docs/ from deno fmt and deno lint so the Bruno
files don't break formatting and lint checks in CI.
2026-06-07 12:04:37 +02:00

207 lines
2.7 KiB
Plaintext

meta {
name: Add one or more webhook subscriptions
type: http
seq: 2
}
post {
url: {{baseUrl}}/:did/webhooks
body: json
auth: bearer
}
params:path {
did:
}
auth:bearer {
token: {{token}}
}
body:json {
{
"method": "",
"url": "",
"token": "",
"verb": ""
}
}
example {
name: 201 Response
description: One subscription per requested verb.
request: {
url: {{baseUrl}}/:did/webhooks
method: POST
mode: json
params:path: {
did:
}
body:json: {
{
"method": "",
"url": "",
"token": "",
"verb": ""
}
}
}
response: {
headers: {
Content-Type: application/json
}
status: {
code: 201
text: Created
}
body: {
type: json
content: '''
[
{
"id": 0,
"did": "",
"method": "",
"url": "",
"verb": ""
}
]
'''
}
}
}
example {
name: 400 Response
description: Malformed input.
request: {
url: {{baseUrl}}/:did/webhooks
method: POST
mode: json
params:path: {
did:
}
body:json: {
{
"method": "",
"url": "",
"token": "",
"verb": ""
}
}
}
response: {
headers: {
Content-Type: application/json
}
status: {
code: 400
text: Bad Request
}
body: {
type: json
content: '''
{
"error": ""
}
'''
}
}
}
example {
name: 401 Response
description: Missing or invalid bearer token.
request: {
url: {{baseUrl}}/:did/webhooks
method: POST
mode: json
params:path: {
did:
}
body:json: {
{
"method": "",
"url": "",
"token": "",
"verb": ""
}
}
}
response: {
headers: {
Content-Type: application/json
}
status: {
code: 401
text: Unauthorized
}
body: {
type: json
content: '''
{
"error": ""
}
'''
}
}
}
example {
name: 403 Response
description: Token is valid but the caller is not authorized for this resource.
request: {
url: {{baseUrl}}/:did/webhooks
method: POST
mode: json
params:path: {
did:
}
body:json: {
{
"method": "",
"url": "",
"token": "",
"verb": ""
}
}
}
response: {
headers: {
Content-Type: application/json
}
status: {
code: 403
text: Forbidden
}
body: {
type: json
content: '''
{
"error": ""
}
'''
}
}
}