---
title: "Upsert publishing provider configuration."
method: POST
path: "/publishing-provider-configs"
tags: ["Publishing"]
---

# Upsert publishing provider configuration.

`POST /publishing-provider-configs`

## Request

- Base URL: `https://docs.sleeperhit.studio/api/v1`
- URL: `https://docs.sleeperhit.studio/api/v1/publishing-provider-configs`
- Auth: HTTP bearer

Stores provider configuration metadata and encrypted credential references. RSS v1 does not require OAuth or credentials.

## Headers

- `Idempotency-Key` string, required

## Request body

- PublishingProviderConfigUpsertRequest
  - `provider` 'rss' | 'apple_podcasts' | 'spotify' | 'youtube' | 'tiktok' | 'instagram' | 'linkedin' | 'x' | 'other', required
  - `medium` 'audio' | 'video' | 'short_form' | 'text' | 'mixed', required
  - `label` string, nullable
  - `status` string
  - `scopes` string[]
  - `encryptedApiKeyId` string, nullable: Reference to an encrypted credential row. RSS v1 does not need this.

## Response `200`

Publishing provider config envelope.

- PublishingProviderConfigEnvelope
  - `providerConfig` PublishingProviderConfig, required: A connected publishing account. Never carries token material: the sealed sign-in tokens and the provider's own ids stay on the server.
    - `id` string, required
    - `provider` 'rss' | 'apple_podcasts' | 'spotify' | 'youtube' | 'tiktok' | 'instagram' | 'linkedin' | 'x' | 'other', required
    - `medium` 'audio' | 'video' | 'short_form' | 'text' | 'mixed', required
    - `label` string, nullable, required: The account's name, when one is known.
    - `status` 'draft' | 'connected' | 'needs_auth' | 'needs_setup' | 'disconnected' | 'failed' | 'archived', required
    - `connected` boolean, required: Publishing can use this account now.
    - `connectedAt` string, date-time, nullable, required: When the account was first connected; null while it is not connected.
    - `scopes` string[], required
    - `lastVerifiedAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Request payload failed validation. The error message names the offending field.
- `401`: Missing, malformed, revoked, or expired API key.
- `403`: API key is valid but lacks the scope, is blocked by IP allowlist, or the account is disabled.
- `429`: Rate limit for this API key + IP + route family was exceeded.
- `500`: The API failed unexpectedly. Safe to retry with the same Idempotency-Key.

---

[API](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api.md) · [All operations](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/revisions/4534f5d25540?raw)
