Update a post (only if not published yet)
patch/v1/social/posts/{id}
Update a post (only if not published yet)
Request
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | No description |
Body
{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"maxLength": 5000
},
"scheduled_for": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"settings": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
}
}
}
}
}Responses
200No description
- Schema
Schema Structure
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"status",
"updated_at"
]
},
"message": {
"type": "string",
"enum": [
"Post updated successfully"
]
}
},
"required": [
"success",
"data",
"message"
]
}
400No description
- Schema
Schema Structure
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"CANNOT_UPDATE"
]
},
"message": {
"type": "string",
"enum": [
"Can only update draft or scheduled posts"
]
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"success",
"error"
]
}
422No description
- Schema
Schema Structure
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"VALIDATION_ERROR"
]
},
"message": {
"type": "string",
"enum": [
"Validation failed"
]
},
"details": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"title": "MessageBag"
}
},
"required": [
"code",
"message",
"details"
]
}
},
"required": [
"success",
"error"
]
}