Custom API
Connect any HTTPS API: store its base URL and auth header in the vault, then call it via the request action. Outbound calls are SSRF-guarded (https-only, public hosts only, no redirects).
Connect
Auth type: Credentials form (custom_auth). Pass the fields the provider needs (listed below) as the connection's credentials. They are sealed at rest.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("custom_http", action, input) resolves with the provider's answer and rejects when Custom API isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "custom_http"} says whether yours can call it.
// workflows/notify.ts: call Custom API when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellCustomHttp = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Custom API isn't connected.
const output = await step.run("Custom API", () =>
step.ctx.integrations.invoke("custom_http", "request", {
"method": "<method>",
"path": "<path>"
}),
);
step.ctx.log("Custom API answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "custom_http",
"piece_action": "request",
"input": {
"method": "<method>",
"path": "<path>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/custom_http/request" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"method":"<method>","path":"<path>"}}'Actions
request
HTTP Request. Call the connected API: props { method, path, body?, query? }. Path is resolved against the vaulted base URL; the vaulted secret is sent in the configured header.
| Input | Type | Description |
|---|---|---|
methodrequired | text | GET|POST|PUT|PATCH|DELETE |
pathrequired | text | Path starting with / |
bodyoptional | object | JSON body for write methods |
Details
- Id
custom_http- Category
- Developer tools
- Tags
- custom, http, api
- Package
built in (Appbricx)- Runs
- Through the integration runner