Authentication
All API requests require authentication using an API key passed in the X-Api-Key header.
Get Your API Key
API keys are managed through your Sketchpen dashboard. Once logged in, navigate to Settings โ API Keys to create a new key.
Using Your API Key
Include your API key in every request:
bash
curl https://api.sketchpen.app/api/v1/videos \ -H "X-Api-Key: sk_live_abc123..."
javascript
const response = await fetch('https://api.sketchpen.app/api/v1/videos', {
headers: {
'X-Api-Key': 'sk_live_abc123...'
}
})python
import requests
response = requests.get(
'https://api.sketchpen.app/api/v1/videos',
headers={'X-Api-Key': 'sk_live_abc123...'}
)Scopes
API keys use scopes to limit permissions:
| Scope | Description |
|---|---|
| `videos:read` | List and view videos |
| `videos:write` | Create, update, delete videos |
| `videos:*` | All video operations |
| `assets:read` | List and view assets |
| `assets:write` | Create, update, delete assets |
| `assets:*` | All asset operations |
| `callbacks:read` | List webhooks |
| `callbacks:write` | Create, delete webhooks |
| `callbacks:*` | All webhook operations |
โ ๏ธ Keep your key secure
Never expose your API key in client-side code or public repositories. Use environment variables to store keys.