Auth Verify API
Confirm an API key is valid and inspect the workspace, project, and owner it resolves to. Useful for CLI login and sanity checks.
POST/v1/auth/verify
Authentication
Requires a secret API key passed as a Bearer token (Authorization: Bearer carrier_sk_…).
Example request
bash
curl -X POST https://api.carrieros.ai/v1/auth/verify -H "Authorization: Bearer carrier_sk_live_YOUR_KEY"Response
| Field | Type | Description |
|---|---|---|
| apiKey | object | { id, name, type } for the presented key. |
| workspace | object | { id, name, slug } the key belongs to. |
| project | object | { id, name, projectId, environment }. |
| user | object | null | The key owner ({ id, email }) or null. |
Example response
json
{
"success": true,
"data": {
"apiKey": { "id": "…", "name": "Production key", "type": "secret" },
"workspace":{ "id": "…", "name": "Centera Tech", "slug": "centera-tech" },
"project": { "id": "…", "name": "Default project", "projectId": "carrier_proj_…", "environment": "production" },
"user": { "id": "…", "email": "dev@example.com" }
}
}Possible errors
| Code | HTTP | When it occurs |
|---|---|---|
| INVALID_API_KEY | 401 | The key is missing, malformed, revoked, or inactive. |
Notes
A GET request to the same path is also accepted, as a convenient "whoami".