# Update post

Updates a post.

```http
PUT https://api.pozy.ai/v1/posts/{postId}
```

- Area: Publishing / Posts
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `postId` (string, required)

## Request body

Content type: `application/json`

- `title`, string
- `content`, string
- `mediaItems`, array of object
  - `type`, string: One of `image`, `video`, `gif`, `document`
  - `url`, string (URL)
  - `fileId`, string
  - `accountId`, string
  - `title`, string
  - `altText`, string
  - `filename`, string
  - `size`, integer
  - `mimeType`, string
  - `thumbnail`, string (URL)
  - `instagramThumbnail`, string (URL)
  - `subtitles`, array of object: Up to 20 items
    - `url`, string (URL), required
    - `language`, string, required
  - `tiktokProcessed`, boolean
- `platforms`, array of object
  - `platform`, string, required
  - `accountId`, string, required
  - `customContent`, string
  - `customMedia`, array of object
    - `type`, string: One of `image`, `video`, `gif`, `document`
    - `url`, string (URL)
    - `fileId`, string
    - `accountId`, string
    - `title`, string
    - `altText`, string
    - `filename`, string
    - `size`, integer
    - `mimeType`, string
    - `thumbnail`, string (URL)
    - `instagramThumbnail`, string (URL)
    - `subtitles`, array of object: Up to 20 items
      - `url`, string (URL), required
      - `language`, string, required
    - `tiktokProcessed`, boolean
  - `scheduledFor`, string (date-time)
  - `platformSpecificData`, object
- `scheduledFor`, string (date-time)
- `publishNow`, boolean: Default `false`
- `isDraft`, boolean
- `requiresApproval`, boolean
- `timezone`, string
- `visibility`, string: One of `public`, `private`, `unlisted`
- `tags`, array of string
- `hashtags`, array of string
- `mentions`, array of string
- `crosspostingEnabled`, boolean
- `metadata`, object
- `queuedFromProfile`, string
- `queueId`, string
- `tiktokSettings`, object
  - `draft`, boolean
  - `privacyLevel`, string
  - `allowComment`, boolean
  - `allowDuet`, boolean
  - `allowStitch`, boolean
  - `commercialContentType`, string: One of `none`, `brand_organic`, `brand_content`
  - `brandPartnerPromote`, boolean
  - `isBrandOrganicPost`, boolean
  - `contentPreviewConfirmed`, boolean
  - `expressConsentGiven`, boolean
  - `mediaType`, string: One of `video`, `photo`
  - `videoCoverTimestampMs`, integer: At least 0
  - `videoCoverImageUrl`, string (URL)
  - `photoCoverIndex`, integer: At least 0
  - `autoAddMusic`, boolean
  - `musicSoundInfo`, object
    - `musicSoundId`, string, required
    - `musicSoundVolume`, integer: Default `50`. 0 to 100
    - `musicSoundStart`, integer: At least 0
    - `musicSoundEnd`, integer: At least 0
  - `videoOriginalSoundVolume`, integer: 0 to 100
  - `videoMadeWithAi`, boolean
  - `locationId`, string
  - `locationName`, string
  - `isAdsOnly`, boolean
  - `description`, string: Up to 4000 characters
- `facebookSettings`, object
  - `draft`, boolean: Default `false`
  - `carouselCards`, array of object: At least 2 items. Up to 10 items
    - `link`, string (URL), required
    - `name`, string: Up to 255 characters
    - `description`, string: Up to 255 characters
  - `carouselLink`, string (URL)
  - `textFormatPresetId`, string: Matches `^\d+$`
- `recycling`, object
  - `enabled`, boolean: Default `true`
  - `gap`, integer: At least 1
  - `gapFreq`, string: One of `week`, `month`. Default `month`
  - `startDate`, string (date-time)
  - `expireCount`, integer: At least 1. Can be null
  - `expireDate`, string (date-time): Can be null
  - `contentVariations`, array of string: Up to 20 items

## Example request

```bash
curl -X PUT "https://api.pozy.ai/v1/posts/6108a2cc742cb4e991051e0c" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Launch day",
  "content": "Hello from Pozy",
  "mediaItems": [
    {
      "type": "image",
      "url": "https://pozy.ai/media/example-1.jpg",
      "fileId": "6035bf6bd3aac3067c336c50"
    }
  ],
  "platforms": [
    {
      "platform": "instagram",
      "accountId": "696e0b682d0a31188e7a2ba9"
    }
  ]
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/posts/6108a2cc742cb4e991051e0c", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    title: "Launch day",
    content: "Hello from Pozy",
    mediaItems: [
      {
        type: "image",
        url: "https://pozy.ai/media/example-1.jpg",
        fileId: "6035bf6bd3aac3067c336c50"
      }
    ],
    platforms: [
      {
        platform: "instagram",
        accountId: "696e0b682d0a31188e7a2ba9"
      }
    ]
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.put(
    "https://api.pozy.ai/v1/posts/6108a2cc742cb4e991051e0c",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "title": "Launch day",
        "content": "Hello from Pozy",
        "mediaItems": [
            {
                "type": "image",
                "url": "https://pozy.ai/media/example-1.jpg",
                "fileId": "6035bf6bd3aac3067c336c50",
            },
        ],
        "platforms": [
            {
                "platform": "instagram",
                "accountId": "696e0b682d0a31188e7a2ba9",
            },
        ],
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `message`, string
- `post`, object
  - `_id`, string
  - `userId`, string or object
    - one of: string
    - one of: User
      - `_id`, string
      - `email`, string
      - `name`, string
      - `role`, string
      - `disabledResourceGroups`, array of string
      - `createdAt`, string (date-time)
  - `title`, string
  - `content`, string
  - `mediaItems`, array of object
    - `type`, string: One of `image`, `video`, `gif`, `document`
    - `url`, string (URL)
    - `fileId`, string
    - `accountId`, string
    - `title`, string
    - `altText`, string
    - `filename`, string
    - `size`, integer
    - `mimeType`, string
    - `thumbnail`, string (URL)
    - `instagramThumbnail`, string (URL)
    - `subtitles`, array of object: Up to 20 items
      - `url`, string (URL), required
      - `language`, string, required
    - `tiktokProcessed`, boolean
  - `platforms`, array of object
    - `platform`, string
    - `accountId`, string or object
      - one of: string
      - one of: Social Account
        - `_id`, string, required
        - `platform`, string, required: One of `tiktok`, `instagram`, `facebook`, `youtube`, `linkedin`, `twitter`, `threads`, `pinterest`, `reddit`, `bluesky`, `googlebusiness`, `telegram`, `snapchat`, `discord`, `slack`, `whatsapp`, `shopify`, `wordpress`, `wix`, `linkedinads`, `metaads`, `pinterestads`, `tiktokads`, `xads` and 15 more
        - `profileId`, string or object, required
          - one of: string
          - one of: Profile
            - `_id`, string
            - `userId`, string
            - `name`, string
            - `description`, string
            - `color`, string
            - `timezone`, string: Can be null
            - `externalId`, string: Can be null
            - `isDefault`, boolean
            - `isOverLimit`, boolean
            - `accountCount`, integer
            - `createdAt`, string (date-time)
        - `username`, string
        - `displayName`, string
        - `platformUserId`, string
        - `scopeAreas`, array of string: Can be null
        - `oauthAppId`, string: Can be null
        - `tiktokAccountType`, string: One of `business`, `personal`, `unknown`
        - `profilePicture`, string: Can be null
        - `profileUrl`, string
        - `isActive`, boolean, required
        - `needsReconnection`, boolean
        - `followersCount`, number
        - `followersLastUpdated`, string (date-time)
        - `parentAccountId`, string: Can be null
        - `enabled`, boolean
        - `rateLimitedUntil`, string (date-time): Can be null
        - `metadata`, object
    - `customContent`, string
    - `customMedia`, array of object
      - `type`, string: One of `image`, `video`, `gif`, `document`
      - `url`, string (URL)
      - `fileId`, string
      - `accountId`, string
      - `title`, string
      - `altText`, string
      - `filename`, string
      - `size`, integer
      - `mimeType`, string
      - `thumbnail`, string (URL)
      - `instagramThumbnail`, string (URL)
      - `subtitles`, array of object: Up to 20 items
        - `url`, string (URL), required
        - `language`, string, required
      - `tiktokProcessed`, boolean
    - `scheduledFor`, string (date-time)
    - `platformSpecificData`, object
    - `status`, string
    - `platformPostId`, string
    - `platformPostUrl`, string: Can be null
    - `publishedAt`, string (date-time)
    - `removedFromPlatformAt`, string (date-time): Can be null
    - `isTrialReel`, boolean
    - `trialGraduationStrategy`, string: One of `MANUAL`, `SS_PERFORMANCE`
    - `publishAttempts`, integer
    - `publishRetries`, integer
    - `errorMessage`, string
    - `errorCategory`, string: One of `auth_expired`, `user_content`, `user_abuse`, `account_issue`, `platform_rejected`, `platform_error`, `platform_rate_limit`, `quota_exhausted`, `system_error`, `unknown`
    - `errorSource`, string: One of `user`, `platform`, `system`
    - `platformError`, object
      - `code`, integer
      - `subcode`, integer
      - `message`, string, required
  - `scheduledFor`, string (date-time)
  - `timezone`, string
  - `status`, string: One of `draft`, `pending_approval`, `scheduled`, `publishing`, `published`, `partial`, `failed`, `cancelled`
  - `tags`, array of string
  - `hashtags`, array of string
  - `mentions`, array of string
  - `visibility`, string: One of `public`, `private`, `unlisted`
  - `metadata`, object
  - `recycling`, object
    - `enabled`, boolean
    - `gap`, integer
    - `gapFreq`, string: One of `week`, `month`
    - `startDate`, string (date-time)
    - `expireCount`, integer
    - `expireDate`, string (date-time)
    - `contentVariations`, array of string
    - `contentVariationIndex`, integer
    - `recycleCount`, integer
    - `nextRecycleAt`, string (date-time)
    - `lastRecycledAt`, string (date-time)
  - `recycledFromPostId`, string
  - `queuedFromProfile`, string
  - `queueId`, string
  - `createdAt`, string (date-time)
  - `updatedAt`, string (date-time)
- `warnings`, array of string

```json
{
  "message": "Hello from Pozy",
  "post": {
    "_id": "635d87e261ae344ef27fd1df",
    "userId": "6da95b9455a22c1e061837af",
    "title": "Launch day",
    "content": "Hello from Pozy",
    "mediaItems": [
      {
        "type": "image",
        "url": "https://pozy.ai/media/example-1.jpg",
        "fileId": "6035bf6bd3aac3067c336c50",
        "accountId": "696e0b682d0a31188e7a2ba9",
        "title": "Launch day",
        "altText": "Hello from Pozy",
        "filename": "photo.jpg",
        "size": 482133,
        "mimeType": "image/jpeg",
        "thumbnail": "https://pozy.ai/media/example-1.jpg",
        "instagramThumbnail": "https://pozy.ai/media/example-1.jpg",
        "subtitles": [
          {
            "url": "https://pozy.ai/media/example-1.jpg",
            "language": "en"
          }
        ],
        "tiktokProcessed": true
      }
    ],
    "platforms": [
      {
        "platform": "instagram",
        "accountId": "696e0b682d0a31188e7a2ba9",
        "customContent": "Hello from Pozy",
        "customMedia": [
          {
            "type": "image",
            "url": "https://pozy.ai/media/example-1.jpg",
            "fileId": "6035bf6bd3aac3067c336c50",
            "accountId": "696e0b682d0a31188e7a2ba9",
            "title": "Launch day",
            "altText": "Hello from Pozy",
            "filename": "photo.jpg",
            "size": 482133,
            "mimeType": "image/jpeg",
            "thumbnail": "https://pozy.ai/media/example-1.jpg",
            "instagramThumbnail": "https://pozy.ai/media/example-1.jpg",
            "subtitles": [
              {
                "url": "https://pozy.ai/media/example-1.jpg",
                "language": "en"
              }
            ],
            "tiktokProcessed": true
          }
        ],
        "scheduledFor": "2026-10-02T09:00:00.000Z",
        "platformSpecificData": {},
        "status": "active",
        "platformPostId": "637f799b3039e6602e83fa4f",
        "platformPostUrl": "https://pozy.ai/media/example-1.jpg",
        "publishedAt": "2026-10-02T09:00:00.000Z",
        "removedFromPlatformAt": "2026-10-02T09:00:00.000Z",
        "isTrialReel": true,
        "trialGraduationStrategy": "MANUAL",
        "publishAttempts": 1,
        "publishRetries": 1,
        "errorMessage": "Hello from Pozy",
        "errorCategory": "auth_expired",
        "errorSource": "user",
        "platformError": {
          "code": 1,
          "subcode": 1,
          "message": "Hello from Pozy"
        }
      }
    ],
    "scheduledFor": "2026-10-02T09:00:00.000Z",
    "timezone": "America/New_York",
    "status": "draft",
    "tags": [
      "string"
    ],
    "hashtags": [
      "string"
    ],
    "mentions": [
      "string"
    ],
    "visibility": "public",
    "metadata": {},
    "recycling": {
      "enabled": true,
      "gap": 1,
      "gapFreq": "week",
      "startDate": "2026-10-02T09:00:00.000Z",
      "expireCount": 42,
      "expireDate": "2026-10-02T09:00:00.000Z",
      "contentVariations": [
        "Hello from Pozy"
      ],
      "contentVariationIndex": 1,
      "recycleCount": 42,
      "nextRecycleAt": "2026-10-02T09:00:00.000Z",
      "lastRecycledAt": "2026-10-02T09:00:00.000Z"
    },
    "recycledFromPostId": "6786dd4f9a1815d922da3579",
    "queuedFromProfile": "string",
    "queueId": "6a5f84bc69bcee401578bb47",
    "createdAt": "2026-10-02T09:00:00.000Z",
    "updatedAt": "2026-10-02T09:00:00.000Z"
  },
  "warnings": [
    "string"
  ]
}
```
