---
title: "POST /api/live-sources/{id}/encoder-keys/{key_pk}/replace"
method: POST
path: "/api/live-sources/{id}/encoder-keys/{key_pk}/replace"
tags: ["live-sources"]
---

# POST /api/live-sources/{id}/encoder-keys/{key_pk}/replace

`POST /api/live-sources/{id}/encoder-keys/{key_pk}/replace`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `sessionid`

Give an encoder a new key: for when its settings were lost, or leaked.

The encoder keeps its name; the old key stops working at once, and the
answer shows the new password and settings, once.

## Path parameters

- `id` integer, required
- `key_pk` integer, required

## Response `201`

- IssuedEncoderKey: The one response that carries the password, with the encoder settings built from it. Nothing here is stored: lose it and issue a new key.
  - `id` integer, required
  - `label` string, required
  - `keyId` string, uuid, required
  - `createdAt` string, date-time, required
  - `lastUsedAt` string, date-time, nullable, required
  - `revokedAt` string, date-time, nullable, required
  - `password` string, required
  - `connections` ConnectionExample[], required
    - `label` string, required
    - `url` string, required
    - `token` string
    - `note` string
  - `blackmagicConfig` string, nullable, required: An XML file Blackmagic Web Presenter and ATEM Mini can import.

## Other responses

- `400`
- `401`
- `404`
- `405`
- `406`
- `415`
- `500`

## Changes

- **2026-11-13** `aa0809308971`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/changes/api/live-sources/:id/encoder-keys/:key_pk/replace/post.md)

---

[API](https://skmtc.dev/frikanalen/apis/frikanalen-django-api.md) - [All operations](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/llms.txt) - [OpenAPI document](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/revisions/ebd4175e41fe?raw)
