Update the project's encoding settings
Update the project's encoding settings
/v1/projects/{id}/encoding-settingsThis operation supports dashboard session-cookie authentication. Call it only from trusted server code; browsers must not manufacture or expose the session cookie.
Partial update: send only the fields that change; watermark patches
per-key. The stored document is always the full effective object
(defaults merged, enabledResolutions sorted low-to-high and
deduplicated), and the response returns it with updatedAt.
outputCodecs must be exactly ["h264"]. watermark.imageKey is
server-managed: set it only through
PUT /v1/projects/{id}/encoding-settings/watermark-image, which is
why it is readOnly here. Session-cookie auth only. Rate limit: 60
requests per 60 s per session.
Error codes: unauthorized (401), not_found (404),
invalid_encoding_settings (400), codec_unavailable (400 — a
requested codec other than h264).
Authentication
- sessionCookie — Dashboard session cookie set by
POST /v1/auth/login. Video and playback endpoints additionally require theprojectIdquery parameter under cookie auth.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (Ulid) | Yes | — |
Request body
required
Content type: application/json
Schema: EncodingSettingsPatch
{
"enabledResolutions": [
"360p",
"720p",
"1080p"
],
"mp4FallbackEnabled": true,
"watermark": {
"enabled": true,
"position": "bottom-right",
"opacity": 0.6
}
}Responses
| Status | Meaning |
|---|---|
200 | The full effective encoding settings after the patch. |
400 | The request body or query failed validation. The per-operation description lists the exact error.code values. |
401 | No valid credential was presented. |
404 | The resource does not exist or is not visible to this caller. |
429 | Rate limit exceeded. |
Example request
{
"enabledResolutions": [
"360p",
"720p",
"1080p"
],
"mp4FallbackEnabled": true,
"watermark": {
"enabled": true,
"position": "bottom-right",
"opacity": 0.6
}
}