---
agentTools:
  projectIndex: https://cmai.readme.io/llms.txt
---

# Update a social media post entity

Update a social media post entity.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "version": "1.3.39",
    "title": "Conversion Maker AI API",
    "termsOfService": "https://conversionmaker.ai/agb/",
    "description": "This is the public API description of Conversion Maker AI. A project with an active plan is required to use the API. The API Key and the ID of the project can be found in the project settings.\n",
    "contact": {
      "email": "helpdesk@conversionmaker.ai",
      "name": "Conversion Maker AI",
      "url": "https://conversionmaker.ai"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "servers": [
    {
      "url": "https://app.conversionmaker.ai/api/v1",
      "description": "production"
    },
    {
      "url": "https://app.stage.conversionmaker.ai/api/v1",
      "description": "preview"
    },
    {
      "url": "http://localhost:3000/api/v1",
      "description": "development"
    }
  ],
  "tags": [
    {
      "name": "Social Media Posts",
      "description": "To CRUD social media post entities"
    }
  ],
  "paths": {
    "/social-media-posts/{socialMediaPostId}": {
      "patch": {
        "tags": [
          "Social Media Posts"
        ],
        "summary": "Update a social media post entity",
        "description": "Update a social media post entity.",
        "operationId": "updateSocialMediaPost",
        "parameters": [
          {
            "$ref": "#/components/parameters/projectId"
          },
          {
            "$ref": "#/components/parameters/socialMediaPostId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 250
                  },
                  "languageCode": {
                    "$ref": "#/components/schemas/LanguageCode"
                  },
                  "content": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "The response status code",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "description": "The description of the response status code",
                      "example": "OK"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SocialMediaPost"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "402": {
            "$ref": "#/components/responses/402"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "429": {
            "$ref": "#/components/responses/429"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "projectId": {
        "name": "projectId",
        "in": "query",
        "description": "The project ID",
        "required": true,
        "example": "6282171639dac8dfb01c44a0",
        "schema": {
          "type": "string",
          "minLength": 24,
          "maxLength": 24
        }
      },
      "socialMediaPostId": {
        "name": "socialMediaPostId",
        "in": "path",
        "description": "The ID of the social media post",
        "required": true,
        "example": "6282171639dac8dfb01c44a0",
        "schema": {
          "type": "string",
          "minLength": 24,
          "maxLength": 24
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 400
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Bad Request"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                },
                "data": {
                  "type": "object",
                  "description": "Any additional information regarding the error"
                }
              }
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 401
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Unauthorized"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                }
              }
            }
          }
        }
      },
      "402": {
        "description": "Payment required",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 402
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Payment required"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                }
              }
            }
          }
        }
      },
      "403": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 403
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Forbidden"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                }
              }
            }
          }
        }
      },
      "404": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 404
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Not Found"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                }
              }
            }
          }
        }
      },
      "405": {
        "description": "Method not allowed",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code",
                "data"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 405
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Method not allowed"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                },
                "data": {
                  "type": "object",
                  "properties": {
                    "allowedMethods": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "The allowed HTTP request methods",
                        "example": "POST"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "429": {
        "description": "Too many requests",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "message",
                "code"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The response status code",
                  "example": 429
                },
                "message": {
                  "type": "string",
                  "description": "The response status message",
                  "example": "Too many requests"
                },
                "code": {
                  "type": "integer",
                  "description": "The internal error code",
                  "example": 1669810156
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "ImportState": {
        "type": "string",
        "enum": [
          "NEW",
          "ANALYZING_NEW",
          "ANALYZING_LOCAL_NEW",
          "PENDING",
          "ANALYZING_PENDING",
          "ANALYZING_LOCAL_PENDING",
          "FINISHED",
          "FAILED"
        ],
        "default": "NEW"
      },
      "SocialMediaPostType": {
        "type": "string",
        "enum": [
          "FACEBOOK_POST",
          "TWITTER_POST",
          "LINKEDIN_POST",
          "INSTAGRAM_POST"
        ],
        "default": "INSTAGRAM_POST"
      },
      "LanguageCode": {
        "type": "string",
        "enum": [
          "bg-BG",
          "cs-CZ",
          "da-DK",
          "de-AT",
          "de-CH",
          "de-DE",
          "el-GR",
          "en-GB",
          "en-US",
          "es-ES",
          "et-EE",
          "fi-FI",
          "fr-FR",
          "hu-HU",
          "id-ID",
          "it-IT",
          "ja-JP",
          "ko-KR",
          "lt-LT",
          "lv-LV",
          "nb-NO",
          "nl-NL",
          "pl-PL",
          "pt-BR",
          "pt-PT",
          "ro-RO",
          "ru-RU",
          "sk-SK",
          "sl-SI",
          "sv-SE",
          "tr-TR",
          "uk-UA"
        ],
        "default": "de-DE"
      },
      "SocialMediaPost": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "_projectId": {
            "type": "string"
          },
          "createDate": {
            "type": "string",
            "format": "date-time"
          },
          "updateDate": {
            "type": "string",
            "format": "date-time"
          },
          "overallScore": {
            "type": "integer"
          },
          "title": {
            "type": "string",
            "maxLength": 250
          },
          "languageCode": {
            "$ref": "#/components/schemas/LanguageCode"
          },
          "importState": {
            "$ref": "#/components/schemas/ImportState"
          },
          "type": {
            "$ref": "#/components/schemas/SocialMediaPostType"
          },
          "content": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string",
                "format": "html"
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://cmai.readme.io/"
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 130,
      "2": 200,
      "3": 239,
      "4": 192,
      "5": 46,
      "6": 118,
      "7": 90,
      "8": 69,
      "9": 252,
      "10": 178,
      "11": 217
    }
  }
}
```