Webhooks & public links

No sign-in: the token in the address is the secret. /hook/<token> starts a flow; /hook/a/<token> and /hook/w/<token> are the approval and form links Flows emails.

MethodPathSummary
GET/hook/w/:tokenOpen a form link
POST/hook/w/:tokenAnswer a form link
GET/hook/a/:tokenOpen an approval link
POST/hook/a/:tokenAnswer an approval link
ALL/hook/:tokenStart a flow (webhook)

#Open a form link

GET/hook/w/:token
Address
https://<your-org>.brambleit.cloud/flows/hook/w/:token
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
tokenrequiredstring

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/hook/w/%E2%80%A6', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Answer a form link

POST/hook/w/:token
Address
https://<your-org>.brambleit.cloud/flows/hook/w/:token
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
tokenrequiredstring

Request body JSON

NameTypeDescription
decisionstring
notestring

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/hook/w/%E2%80%A6', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"decision":"string","note":"string"}),
});
const data = await res.json();

#Open an approval link

GET/hook/a/:token
Address
https://<your-org>.brambleit.cloud/flows/hook/a/:token
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
tokenrequiredstring

Response

A redirect.

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/hook/a/%E2%80%A6', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Answer an approval link

POST/hook/a/:token
Address
https://<your-org>.brambleit.cloud/flows/hook/a/:token
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
tokenrequiredstring

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/hook/a/%E2%80%A6', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#Start a flow (webhook)

ALL/hook/:token

Any method the trigger allows. See Flows webhooks for the request and reply.

Address
https://<your-org>.brambleit.cloud/flows/hook/:token
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
tokenrequiredstring

Response 200

Errors

StatusMessage
404Not found
405This webhook expects …
401Missing or wrong secret header
429Too many requests
409The flow is still busy with the last call

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/hook/%E2%80%A6', {
  method: 'ALL',
  credentials: 'include',
});
const data = await res.json();