---
updatedAt: 2026-05-11T06:52:42.000Z
agentTools:
  projectIndex: https://platform.simpplr.com/llms.txt
---

# Publish/Unpublish Content

This API allows us to publish/unpublish a content

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "1.0.0",
    "title": "Simpplr User API Documentation",
    "description": ""
  },
  "x-proxy-enabled": true,
  "tags": [
    {
      "name": "Content",
      "description": "Everything about Content"
    }
  ],
  "servers": [
    {
      "url": "https://{endpoint}/v1",
      "variables": {
        "env": {
          "default": "app"
        },
        "endpoint": {
          "default": "platform.app.simpplr.com"
        }
      }
    }
  ],
  "paths": {
    "/content/sites/{site_id}/content/{content_id}/status": {
      "parameters": [
        {
          "name": "site_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "eb4a3545-05f7-46e8-b17d-107339b6aae6"
          },
          "description": "Unique identifier of the site"
        },
        {
          "name": "content_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "description": "Unique identifier of the content"
        }
      ],
      "patch": {
        "tags": [
          "Content"
        ],
        "summary": "Publish/Unpublish Content",
        "description": "This API allows us to publish/unpublish a content",
        "operationId": "publishUnpublishContentUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "title": "Publish/Unpublish Content for EC User",
                "description": "Update the status of content to publish or unpublish",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "publish",
                      "unpublish"
                    ],
                    "description": "The status to set for the content",
                    "example": "publish"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success",
                      "description": "Response status",
                      "enum": [
                        "success",
                        "error"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "description": "Contains the ID of the content whose status was updated",
                      "properties": {
                        "contentId": {
                          "type": "string",
                          "format": "uuid",
                          "example": "02369949-cfc1-49a7-a2a7-d03afa9af84a",
                          "description": "Unique identifier of the content whose status was updated"
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Content status updated successfully",
                      "description": "Descriptive message about the operation result"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error",
                      "description": "Response status",
                      "enum": [
                        "success",
                        "error"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "description": "List of validation or processing errors",
                      "items": {
                        "type": "object",
                        "properties": {
                          "seq_id": {
                            "type": "integer",
                            "example": 0,
                            "description": "Sequence identifier for the error"
                          },
                          "field_name": {
                            "type": "string",
                            "example": "siteId",
                            "description": "Name of the field that caused the error"
                          },
                          "error_code": {
                            "type": "integer",
                            "example": 1001,
                            "description": "Numeric code identifying the type of error"
                          },
                          "message": {
                            "type": "string",
                            "example": "The 'siteId' field is required and must not be empty",
                            "description": "Human-readable error message"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Unauthorized": {
        "description": "Authorize error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "example": "Missing/Invalid authentication token"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error_code": {
                  "type": "integer",
                  "example": 2001
                },
                "message": {
                  "type": "string",
                  "example": "Something went wrong, please try again"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiAuthSecurity": {
        "type": "oauth2",
        "description": "This API uses OAuth 2 with the implicit grant flow.",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://platform.test.simpplr.xyz/v1",
            "scopes": {
              "read": "read data",
              "write": "create/update data",
              "everything": "allow full access"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiAuthSecurity": []
    }
  ]
}
```