# Verify credential

Verifies a credential.

```http
GET https://api.pozy.ai/v1/auth/verify
```

- Area: Workspace / API Keys
- Auth: Authorization: Bearer pz_live_...

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/auth/verify" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/auth/verify", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/auth/verify",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `valid`, boolean
- `userId`, string
- `name`, string: Can be null
- `email`, string: Can be null
- `authType`, string: One of `api_key`, `oauth`, `session`
- `scope`, string: Can be null

```json
{
  "valid": true,
  "userId": "6da95b9455a22c1e061837af",
  "name": "Acme",
  "email": "alex@example.com",
  "authType": "api_key",
  "scope": "string"
}
```
