Authentication
The Nedzo API uses Bearer token authentication. All API requests must include your API key in theAuthorization header.
API Keys
API keys are created in the Nedzo dashboard and can be scoped to:- Account-level: Access all workspaces in your account
- Workspace-level: Access only a specific workspace
workspaceId in your requests. See Workspace ID and Request Scope below.
Workspace ID and Request Scope
Most resources in Nedzo (contacts, agents, templates, calls) belong to a specific workspace. How you identify the target workspace depends on the type of API key you’re using.Workspace-scoped keys
A workspace-scoped key is locked to a single workspace. You do not need to sendworkspaceId — the API infers it from the key.
Scope is determined when the key is created in the dashboard — it’s not encoded in the key prefix. Both account and workspace keys use the same
sk_live_* / sk_test_* format.Account-scoped keys
An account-scoped key can act on any workspace in your account. You must sendworkspaceId in the request body (or query string for list endpoints) so the API knows which workspace to target. Omitting it returns:
Endpoints where the workspace is implicit
Some endpoints don’t needworkspaceId because the workspace is already determined by the resource you’re addressing or by the API key itself:
- Path-scoped resources like
GET /v1/contacts/{id},PATCH /v1/agents/{id}— the resource’s workspace is looked up from its ID. POST /v1/call— usesagentIdto infer the workspace.- Workspace-scoped endpoints like
/v1/workspaces/{workspaceId}/billing/...— the workspace is in the URL path. - List endpoints like
GET /v1/agents,GET /v1/templates,GET /v1/contacts— workspace-scoped keys list within their workspace; account-scoped keys list across all workspaces (grouped or filterable viaworkspaceId). /v1/workspacesCRUD —GET /v1/workspacesreturns workspaces the key can access;POST /v1/workspacescreates inside the key’s account;GET|PATCH|DELETE /v1/workspaces/{id}operate on the path-scoped workspace.
Finding your workspace ID
You can get a workspace ID from the dashboard (Settings → Workspaces) or via the API:id for each workspace your key can access.
Making Authenticated Requests
Include your API key in theAuthorization header:
API Key Format
Nedzo API keys follow this format:| Environment | Format | Example |
|---|---|---|
| Production | sk_live_* | sk_live_abc123... |
| Test | sk_test_* | sk_test_xyz789... |
Error Responses
If authentication fails, you’ll receive a401 Unauthorized response:
Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in JavaScript that runs in browsers or mobile apps.
Use environment variables
Use environment variables
Store API keys in environment variables, not in your codebase.
Rotate keys regularly
Rotate keys regularly
Periodically rotate your API keys, especially if you suspect they may have been compromised.
Use workspace-scoped keys
Use workspace-scoped keys
When possible, use workspace-scoped keys to limit the blast radius if a key is compromised.
Rate Limits
API requests are rate-limited to ensure fair usage:| Plan | Requests per minute |
|---|---|
| Free | 60 |
| Pro | 300 |
| Enterprise | Custom |
429 Too Many Requests response with a Retry-After header.