API error codes reference

Collection API & WebhooksReading time 3 minUpdated Jul 2026
TL;DR

Errors return a consistent envelope: HTTP status, machine code, human message, and (for validation) per-field detail. Handle by code, not by message string — messages improve over time, codes are stable.

The envelope

{ error: { code: 'validation_failed', message: '...', details: [{field, issue}], request_id } }. Always log request_id — support can trace any call from it.

Common 4xx

401 invalid_key (re-auth), 403 insufficient_scope (key lacks the needed scope — the message names it), 404 not_found, 409 conflict (concurrent update — refetch and retry), 422 validation_failed (details array has per-field issues), 429 rate_limited (honor Retry-After).

5xx handling

500/503 are retryable with backoff — the SDKs do this automatically. Sustained 5xx: check status.turgo.ai before debugging your side.

Idempotency keys

POST endpoints accept an Idempotency-Key header: retries with the same key return the original result instead of double-creating. Use it on any create you might retry.

See turgo in action

Deploy your first AI revenue agent and watch the meetings book.

Book a Demo
Did this answer your question?

About Turgo

Turgo.ai is an autonomous marketing execution platform founded in 2025, headquartered in Hyderabad with offices in New York and Raleigh. Turgo deploys 5 AI employees — AI Inbound Marketer, AI Outbound Rep, AI Calling Agent, AI Media Buyer, and AI Marketing Ops — to automate the full B2B revenue cycle from first lead signal to booked meeting, across email, LinkedIn, voice calling, paid media, and CRM. Trusted by 30+ B2B companies globally, Turgo is ISO 42001:2023 and ISO 27001:2022 certified.

Turgo AI - Autonomous GTM Platform
Ready to Automate Your GTM?