REST API v1 · Developers · API reference

Flows API reference

All 3 Flows endpoints of the BotGG REST API v1: scopes, parameters, fields, errors and ready-to-run curl, JavaScript and Python examples.

Developer docs
On this page

Endpoints

Paths are relative to https://console.botgg.app/api/v1. Send your API key as Authorization: Bearer botgg_…; IDs are strings.

Flows endpoints
EndpointScopeDescription
GET/guilds/{guildId}/flowsflows:readList flows
GET/guilds/{guildId}/flows/runs/{executionId}flows:readGet a flow run
POST/guilds/{guildId}/flows/{workflowId}/runsflows:runRun a flow

Besides its own errors below, every endpoint can return these common ones:

List flows

GET/guilds/{guildId}/flows

Scope: flows:read

Needs this feature enabled on the server: Flows

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)

Response

Response fields · 200
FieldTypeRequiredDescription
itemsarray of objectYes
items[].idintegerYes
items[].namestringYes
items[].descriptionstring | nullYes
items[].enabledbooleanYes
items[].triggerTypestring | nullYese.g. trigger.manual, trigger.webhook, trigger.discord.messageCreated
items[].runnablebooleanYesCan be run with POST …/runs (enabled + Manual or Webhook trigger)
items[].updatedAtstring | nullYes
Response · 200
{
  "items": [
    {
      "id": 98765,
      "name": "Example",
      "description": "example",
      "enabled": true,
      "triggerType": "example",
      "runnable": true,
      "updatedAt": "2026-10-07T12:00:00.000Z"
    }
  ]
}

Examples

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/flows" \
  -H "Authorization: Bearer $BOTGG_API_KEY"
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678/flows', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/flows",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Get a flow run

GET/guilds/{guildId}/flows/runs/{executionId}

Scope: flows:read

Status of a run (any run of this server’s flows); output is the last node’s output once it finished.

Needs this feature enabled on the server: Flows

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)
executionIdpathstringYes

Response

Response fields · 200
FieldTypeRequiredDescription
executionIdintegerYes
workflowIdintegerYes
statusstringYesrunning | success | error | stopped | cancelled
outputany | nullYesThe last node’s output (finished runs only)
errorstring | nullYes
startedAtstring | nullYes
finishedAtstring | nullYes
durationMsinteger | nullYes
Response · 200
{
  "executionId": 98765,
  "workflowId": 98765,
  "status": "example",
  "output": null,
  "error": "example",
  "startedAt": "2026-10-07T12:00:00.000Z",
  "finishedAt": "2026-10-07T12:00:00.000Z",
  "durationMs": 10
}

Examples

curl
curl -s "https://console.botgg.app/api/v1/guilds/123456789012345678/flows/runs/234567890123456789" \
  -H "Authorization: Bearer $BOTGG_API_KEY"
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678/flows/runs/234567890123456789', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os
import requests

res = requests.get(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/flows/runs/234567890123456789",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Run a flow

POST/guilds/{guildId}/flows/{workflowId}/runs

Scope: flows:runSensitiveIdempotency-Key

Only enabled flows with a Manual or Webhook trigger. A Webhook flow runs as if its webhook URL was called with input as the JSON body. Counts toward the plan’s daily runs. 202 { executionId, status: "running" }, or with wait: true 200 with the final status and output (202 when it is still running after the timeout — poll GET …/flows/runs/{executionId}).

Needs this feature enabled on the server: Flows

Parameters
NameInTypeRequiredDescription
guildIdpathstringYesYour server’s ID · Discord ID (string)
workflowIdpathstringYes
Idempotency-KeyheaderstringNoOptional. Send a unique value (a UUID) and reuse it when you retry: the change happens only once. How it works

Request body

Request body
FieldTypeRequiredDescription
inputanyNoTrigger data (any JSON): $trigger for Manual flows, $trigger.body for Webhook flows
waitbooleanNoWait for the run to finish (default false → 202 right after it started)
timeoutSecondsintegerNoLongest wait; default = the flow timeout + 5 s
1–120

Response

Response fields · 202
FieldTypeRequiredDescription
executionIdintegerYes
workflowIdintegerYes
statusstringYesrunning | success | error | stopped | cancelled
outputany | nullYesThe last node’s output (finished runs only)
errorstring | nullYes
startedAtstring | nullYes
finishedAtstring | nullYes
durationMsinteger | nullYes
Response · 202
{
  "executionId": 98765,
  "workflowId": 98765,
  "status": "example",
  "output": null,
  "error": "example",
  "startedAt": "2026-10-07T12:00:00.000Z",
  "finishedAt": "2026-10-07T12:00:00.000Z",
  "durationMs": 10
}

Examples

curl
curl -s -X POST "https://console.botgg.app/api/v1/guilds/123456789012345678/flows/234567890123456789/runs" \
  -H "Authorization: Bearer $BOTGG_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"input":null,"wait":true,"timeoutSeconds":3600}'
JavaScript (fetch)
// Node.js 18+ (built-in fetch) — on your server, never in a browser
const res = await fetch('https://console.botgg.app/api/v1/guilds/123456789012345678/flows/234567890123456789/runs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.BOTGG_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(), // reuse it when you retry this request
  },
  body: JSON.stringify({
    input: null,
    wait: true,
    timeoutSeconds: 3600,
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${res.status} ${data.error}: ${data.message}`);
console.log(data);
Python (requests)
import os, uuid
import requests

res = requests.post(
    "https://console.botgg.app/api/v1/guilds/123456789012345678/flows/234567890123456789/runs",
    headers={
        "Authorization": f"Bearer {os.environ['BOTGG_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),  # reuse it when you retry this request
    },
    json={
        "input": None,
        "wait": True,
        "timeoutSeconds": 3600,
    },
    timeout=10,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{res.status_code} {data['error']}: {data['message']}")
print(data)

Errors

Ready to level up your server?

Add BotGG for free, then switch features on in the web console.