Read this first
This guide is written for autonomous AI agents operating Puffle on behalf of a human customer. Every customer capability the product exposes through the UI is also exposed through HTTP endpoints documented under API Reference. If you can describe an outcome, there is an endpoint that produces it. If something appears missing from the docs, it is either intentionally out of scope (admin-only tools, inbound webhook receivers) or a gap to report back to the human — do not guess endpoints.Authentication
Every API call must include a partner API key as a Bearer token:- Keys are created by the human customer via the Puffle dashboard or via
POST /api/v1/partners/api-key. - Keys are scoped to a single workspace.
- Never log or echo the key back to the customer.
- On
401 unauthorized, stop and ask the human for a valid key — do not retry blindly.
Boot sequence — the first thing to do
Before issuing any other call, run this two-step boot sequence to discover the workspace state. Skipping it leads to agents operating on incomplete assumptions (wrong ICP, empty context, insufficient credits).Step 1 — Is the workspace ready?
{ onboarding_complete: boolean, ... }. If onboarding_complete: false, stop and escalate to the human — no point launching campaigns, running research, or configuring signals for a user who hasn’t finished setting up their ICP and company profile. The UI blocks those actions too.
Step 2 — What does the workspace know?
- So you can explain the user’s business back to them when asked (“You’re targeting Series A startups in fintech…”)
- So you can detect a mismatch with the task (if the user asks you to outreach to retail buyers but their ICP is B2B SaaS, flag it)
- So you can self-select which journey to run (e.g. “prospect reply inbox” is only meaningful if at least one campaign has launched)
Credit system — check before spending
Puffle charges credits for actions that call paid third-party services (enrichment, deep research, signal scans, LLM-powered generation). Always preview cost before executing so you can decide whether to proceed or ask the human for approval.- Report the shortfall to the human with a specific number.
- Do not partially-execute — failed-midway runs are hard to rollback.
- Offer to proceed with a smaller batch that fits inside the balance.
Async patterns
Expensive operations are async. The pattern is uniform:POSTkicks off the work → responds202 Acceptedwith acorrelationId(also in thex-correlation-idheader) and a reference to a status endpoint.GETthe status endpoint by ID → returnsstatus: "pending" | "running" | "done" | "failed"plus a result payload whendone.- Poll with backoff (start 2 s, double up to 30 s). Most operations finish in 30 s–5 min; deep research can take 10–20 min.
correlationId. If the human reports an issue, capture and pass this ID back — support can trace every downstream call and background job through a single query.
Do not busy-loop without backoff. Do not poll more than once per second. Do surface the correlationId to the human in every error message.
Error handling
All errors follow the shape documented in the API Overview:| Status | Agent response |
|---|---|
400 invalid_request | Fix the payload from the message content. Do not retry the same body. |
401 unauthorized | Stop. Ask the human for a valid API key. |
403 forbidden | Stop. This workspace lacks access to this feature; inform the human. |
404 not_found | Resource doesn’t exist or belongs to another workspace. Do not retry. |
409 conflict | Resource already exists. Fetch the existing one and continue. |
422 unprocessable_entity | Semantic error — reread the endpoint doc. Do not retry without changes. |
429 rate_limited | Back off. Respect Retry-After if present, otherwise wait 30 s. |
500 internal_error | Retry once after 5 s. If it recurs, stop and report the correlationId. |
Core user journeys
The five sequences below cover 90% of what a customer-role agent needs to do. Each chains endpoints in a specific order — follow it.Journey 1 — Launch a campaign end-to-end
Journey 2 — Import leads into a list (CSV / Sales Navigator)
Journey 3 — Run a deep research report
Journey 4 — Configure signals and query the feed
Journey 5 — Schedule a social post
What agents MUST NOT do
- Do not call endpoints under
/api/admin/*— these are internal team tools, not part of the product surface. - Do not call inbound webhook receivers (
/api/apify/*,/api/autumn/*,/api/agentmail/*,/*/webhooks) — they are called by external services, never by you. - Do not attempt OAuth flows (Unipile, Late, Gmail) autonomously — they require a human-in-the-loop browser session. If a feature requires an OAuth-connected account, tell the human and stop.
- Do not persist the API key anywhere except in-memory for the duration of the task.
- Do not exceed 100 requests per minute — see Rate Limits.
Escalation
Stop and ask the human when:- Credits are insufficient for the requested work.
- An operation requires OAuth/browser interaction (account connection, login flows).
- A
403 forbiddenor404 not_foundon a resource you expected to exist. - A
500 internal_errorthat persists after one retry — include thecorrelationIdin the escalation. - The requested outcome has no corresponding endpoint documented here.