Turgo AI

Why is the API returning 401?

Collection TroubleshootingReading time 3 minUpdated Jul 2026
TL;DR

A 401 invalid_key means the API key is missing, wrong, revoked, or sent incorrectly. Check that you're sending 'Authorization: Bearer YOUR_KEY' with a current, workspace-correct key. It's an auth problem, never a data problem.

Check the header

The header must be exactly Authorization: Bearer YOUR_KEY. Common mistakes: missing "Bearer ", a trailing newline or space, the wrong environment's key, or the key wrapped in quotes it shouldn't have. Copy it fresh from Settings → API.

Key validity

The key may have been revoked or rotated (see Authentication and API keys). Keys are shown once at creation — if you lost it, create a new one rather than guessing. The key list shows last-used timestamps to confirm whether a key is live.

Right key for the right workspace

Keys are workspace-bound. A key from one workspace returns 401 against another. Cross-workspace automation needs a key per workspace by design (see Multi-workspace user management).

403 vs 401

If you get 403 insufficient_scope instead, the key is valid but lacks the scope for that call — the message names the missing scope. Re-create the key with the needed scope (see API error codes reference). Log the request_id from any error for support.

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 automates revenue operations for B2B companies. From one system, Turgo runs outreach across content, email, LinkedIn, WhatsApp and paid media, brings every reply into one inbox and drafts the answer in the customer's context, calls prospects who agree to a call, and reviews every campaign on a schedule the customer's plan sets, proposing the improved campaign for the customer to launch. Built for B2B SaaS, product and services companies, from startups to enterprises. Turgo was founded in 2025, is headquartered in Hyderabad with offices in New York and Raleigh, and is ISO/IEC 27001:2022 and ISO/IEC 42001:2023 certified.

Turgo AI
Ready to automate RevOps?