API keys
API keys are the recommended auth method for scripts and integrations. Each key is scoped to one workspace and grants owner-level access.
POST /workspaces/:wsId/api-keys
Create a new API key. The full key is returned once and never again. Store it immediately.
Role: owner
curl -X POST https://nobsredir.com/api/workspaces/ws_abc123/api-keys \ -H "X-API-Key: nobs_your_key" \ -H "Content-Type: application/json" \ -d '{"name": "CI/CD Pipeline"}'Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | Human-readable label. Default: "API Key". |
Each workspace can have up to 10 API keys. Delete unused keys to free up slots.
Response 201:
{ "id": "key_abc123", "name": "CI/CD Pipeline", "key": "nobs_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "key_prefix": "nobs_a1b2c", "created_at": "2025-01-20T14:00:00.000Z"}The key field is the full API key. Use it as:
curl https://nobsredir.com/api/workspaces/ws_abc123/links \ -H "X-API-Key: nobs_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"We cannot recover the key after creation. If you lose it, delete and create a new one.
Errors: 402 - API key limit reached (max 10 per workspace).
GET /workspaces/:wsId/api-keys
List all API keys for the workspace. Only the prefix is returned, not the full key.
Role: owner
curl https://nobsredir.com/api/workspaces/ws_abc123/api-keys \ -H "X-API-Key: nobs_your_key"Response 200:
{ "api_keys": [ { "id": "key_abc123", "name": "CI/CD Pipeline", "key_prefix": "nobs_a1b2c", "created_at": "2025-01-20T14:00:00.000Z", "created_by_email": "owner@example.com" } ]}DELETE /workspaces/:wsId/api-keys/:id
Delete an API key. Any requests using this key will immediately start returning 401.
Role: owner
curl -X DELETE https://nobsredir.com/api/workspaces/ws_abc123/api-keys/key_abc123 \ -H "X-API-Key: nobs_your_key"Response 200:
{"ok": true}Errors: 404 - API key not found.