# Update a post (/id/growsocmed/docs/api-reference/posts/update-post)

Change a post's text, media, per-account content or options, or time. A scheduled post can change for every account; a failed or partly published post only for the accounts that failed (then call retry).

PATCH /posts/{id}

```json
{
  "tags": [
    "Posts"
  ],
  "summary": "Update a post",
  "parameters": [
    {
      "schema": {
        "type": "string",
        "format": "uuid"
      },
      "required": true,
      "name": "id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "maxLength": 70000
            },
            "media_ids": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 20
            },
            "scheduled_at": {
              "type": "string",
              "format": "date-time"
            },
            "targets": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "text": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 70000
                  },
                  "media_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "options": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "account_id"
                ]
              },
              "maxItems": 50
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "post": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "publishing",
                      "published",
                      "partial",
                      "failed",
                      "canceled"
                    ]
                  },
                  "source": {
                    "type": "string"
                  },
                  "scheduled_at": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "created_by": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "media": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "image",
                            "video",
                            "document"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "url"
                      ]
                    }
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "account_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "platform": {
                          "type": "string"
                        },
                        "username": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatar_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "publishing",
                            "published",
                            "failed",
                            "canceled"
                          ]
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "media_ids": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "string"
                          }
                        },
                        "permalink": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "error_code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "error_message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "published_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "options": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "id",
                        "account_id",
                        "platform",
                        "username",
                        "display_name",
                        "avatar_url",
                        "status",
                        "text",
                        "media_ids",
                        "permalink",
                        "error_code",
                        "error_message",
                        "published_at",
                        "options"
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "text",
                  "status",
                  "source",
                  "scheduled_at",
                  "created_at",
                  "created_by",
                  "media",
                  "targets"
                ]
              }
            },
            "required": [
              "post"
            ]
          }
        }
      }
    }
  },
  "operationId": "update-post",
  "description": "Change a post's text, media, per-account content or options, or time. A scheduled post can change for every account; a failed or partly published post only for the accounts that failed (then call retry)."
}
```