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 runs the agent by calling it: Stripe, GitHub, a cron job, an internal script.
1

Create the trigger

Open your agent from All agents. In the right panel, select + (New tab) → Triggers, then choose Webhook. If the agent already has triggers, select Add trigger first. Name the trigger and enter a prompt with the Raw JSON badge, 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.
Webhook setup confirmation with the Webhook URL field and its copy button
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.
User ID displayed 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 in the API reference use the Authorization header method, but you can substitute the API key method in any of them.