Skip to main content
The Gumloop API is agent-first: you can create and update agents, start sessions to chat with them, and use chat completions from any OpenAI-compatible client. The Python and JavaScript SDKs wrap all of it. Webhooks, covered next, let an outside service run an agent by calling a URL — no API key, SDK, or polling loop needed.

Agent Webhooks

A webhook trigger gives an agent its own URL. Anything that can send an HTTP POST — Stripe, GitHub, a cron job, an internal script — runs the agent by calling it.
1

Create the trigger

On the agent’s configuration page, open the Triggers section, click + Add, and choose Webhook. Give it a name and either a prompt (drop the Raw JSON badge where the payload should land) or turn on Send raw JSON instead of a prompt.
2

Copy the URL

Gumloop shows the URL as soon as the trigger is created, along with a curl example. You can copy it again any time from the trigger’s detail panel.
3

POST to it

Request & Response

The agent runs in the background, so the response never carries its output. Have the agent report results through a tool (Slack, email, a database write) or check the run in the agent’s history.
The webhook URL is the credential: anyone holding it can run your agent. Store it like a password, and delete the trigger to retire a URL — a new trigger always gets a fresh one.

Finding Your User ID

Many API endpoints require a user_id parameter. You can find your User ID on the Profile Settings page, under your email address.
Click the copy icon next to your User ID to copy it to your clipboard.

Authorization

Agent webhooks need no credentials, but the rest of the API does. You can authenticate using one of two methods:
The default method is to include your API key as a query parameter in the URL. This method is simpler and works well for most integrations:
All examples below use the Authorization header method, but you can substitute the API key method in any of them.

Triggering Saved Workflows

Workflow webhooks are the pre-agent way to trigger Gumloop from your own app, and they still work exactly as before. For new integrations, use an agent webhook instead.
All Gumloop workflows can be triggered from an external app using webhooks. Open your workflow and click the Webhooks button on the top left of the pipeline builder to see the code you need.
You can switch between the API-key-in-URL and Authorization header methods in the webhook modal by checking or unchecking the “Use Authorization Header” option.
Most useful workflows require some input from the user. There are two main approaches to handle inputs in your Gumloop workflows:
When you run a Gumloop pipeline remotely, the POST request to https://api.gumloop.com/api/v1/start_pipeline will return a run_id and a URL that links to the workflow run.Here is an example of the response:
You can use run_id to poll a separate endpoint to get information about the ongoing run like the status, logs, and outputs when it is completed.Polling for run statusIn order to poll, make a GET request to https://api.gumloop.com/api/v1/get_pl_run with run_id as a query parameter.Here is an example of a GET request with cURL, Python, and JavaScript and their outputs:
Response structure
The key attributes here are: