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

FieldTypeDescription
apiKeyobject{ id, name, type } for the presented key.
workspaceobject{ id, name, slug } the key belongs to.
projectobject{ id, name, projectId, environment }.
userobject | nullThe 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

CodeHTTPWhen it occurs
INVALID_API_KEY401The key is missing, malformed, revoked, or inactive.

Notes

A GET request to the same path is also accepted, as a convenient "whoami".