---
title: "Replace content"
method: PUT
path: "/api/v1/content/{id}"
tags: ["Content"]
---

# Replace content

`PUT /api/v1/content/{id}`

## Request

- Base URL: `https://app.promptingco.com`
- URL: `https://app.promptingco.com/api/v1/content/{id}`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

## Path parameters

- `id` string, required

## Request body

- object
  - `filePath` string
  - `title` string
  - `content` string
  - `isManual` boolean
  - `sourceUrl` string
  - `cssSelector` string, nullable
  - `cssExcludeSelector` string, nullable
  - `redirectToUrl` string, nullable
  - `redirectAudience` 'ai-referral' | 'all'
  - `tiptapJson` unknown
  - `description` string, nullable
  - `descriptionForAgent` string, nullable
  - `metaTitle` string, nullable
  - `metaDescription` string, nullable
  - `canonicalUrl` string, nullable
  - `ogTitle` string, nullable
  - `ogDescription` string, nullable
  - `ogImage` string, nullable
  - `twitterTitle` string, nullable
  - `twitterDescription` string, nullable
  - `twitterImage` string, nullable
  - `noIndex` boolean
  - `tags` string[]
  - `priority` number, nullable

## Response `200`

Successful response

- object
  - `ok` true, required
  - `data` object, required
    - `id` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `deletedAt` string, date-time, nullable, required
    - `filePath` string, required
    - `title` string, required
    - `content` string, required
    - `sourceUrl` string, required
    - `cssSelector` string, nullable, required
    - `sourceChecksum` string, nullable, required
    - `brandId` string, required
    - `cssExcludeSelector` string, nullable, required
    - `isManual` boolean, required
    - `lastIndexedAt` string, date-time, nullable, required
    - `canonicalUrl` string, nullable, required
    - `description` string, nullable, required
    - `image` string, nullable, required
    - `metaDescription` string, nullable, required
    - `metaTitle` string, nullable, required
    - `metadata` unknown
    - `noIndex` boolean, nullable, required
    - `ogDescription` string, nullable, required
    - `ogImage` string, nullable, required
    - `ogTitle` string, nullable, required
    - `twitterDescription` string, nullable, required
    - `twitterImage` string, nullable, required
    - `twitterTitle` string, nullable, required
    - `tiptapJson` unknown
    - `descriptionForAgent` string, nullable, required
    - `type` string, required
    - `tags` string[], nullable, required
    - `currentDraftId` string, nullable, required
    - `publishedAt` string, date-time, nullable, required
    - `status` string, required
    - `priority` integer, nullable, required
    - `promptId` string, nullable, required
    - `redirectToUrl` string, nullable, required
    - `redirectAudience` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `422`: Validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api.md) - [All operations](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/revisions/c0451ea10e9a?raw)
