API REFERENCE
Cancel Post
On this page
/api/posts/{id}Availability: pending. This endpoint is specified ahead of implementation and is not yet live on the hosted API; it ships through recoupable/app#2241. Do not rely on it until this notice is removed.
Cancel a post that is still scheduled. Nothing is sent to the platform. A post that is already publishing, posted, failed or cancelled cannot be cancelled (409); to remove a live post, delete it on the platform.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request DELETE \
--url 'https://api.recoupable.dev/api/posts/YOUR_ID' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request DELETE \
--url 'https://recoup-api.vercel.app/api/posts/{id}'Parameters
Path parameters
idstringrequiredThe post's id, from Create Post.
Query parameters
account_idstringOptional. Act on behalf of another account you can access. Defaults to the calling account.
Responses
200The post is cancelled.+
application/json
statusstring · enumrequiredLifecycle phase. scheduled until publish_at, publishing while the platform upload runs, then posted or failed. cancelled only from scheduled.
Values: "scheduled", "publishing", "posted", "failed", "cancelled"
400id is not a valid uuid.+
application/json
statusstring · enumrequiredAlways error
Values: "error"
missing_fieldsarray<one of>JSON path segments to the first field that failed validation, e.g. ["description"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredHuman-readable error message
401Unauthorized.+
application/json
statusstring · enumrequiredAlways error
Values: "error"
missing_fieldsarray<one of>JSON path segments to the first field that failed validation, e.g. ["description"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredHuman-readable error message
403Access denied to this post's account.+
application/json
statusstring · enumrequiredAlways error
Values: "error"
missing_fieldsarray<one of>JSON path segments to the first field that failed validation, e.g. ["description"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredHuman-readable error message
404No post with that id.+
application/json
statusstring · enumrequiredAlways error
Values: "error"
missing_fieldsarray<one of>JSON path segments to the first field that failed validation, e.g. ["description"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredHuman-readable error message
409The post is not scheduled, so it can no longer be cancelled.+
application/json
statusstring · enumrequiredAlways error
Values: "error"
missing_fieldsarray<one of>JSON path segments to the first field that failed validation, e.g. ["description"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredHuman-readable error message
500Internal server error.+
application/json
statusstring · enumrequiredAlways error
Values: "error"
missing_fieldsarray<one of>JSON path segments to the first field that failed validation, e.g. ["description"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredHuman-readable error message
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download social.jsonView operation source
{
"summary": "Cancel post",
"description": "**Availability: pending.** This endpoint is specified ahead of implementation and is not yet live on the hosted API; it ships through recoupable/app#2241. Do not rely on it until this notice is removed.\n\nCancel a post that is still `scheduled`. Nothing is sent to the platform. A post that is already `publishing`, `posted`, `failed` or `cancelled` cannot be cancelled (409); to remove a live post, delete it on the platform.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "The post's id, from [Create Post](/api-reference/publishing/create)."
},
{
"name": "account_id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Optional. Act on behalf of another account you can access. Defaults to the calling account."
}
],
"responses": {
"200": {
"description": "The post is cancelled.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatePostResponse"
}
}
}
},
"400": {
"description": "`id` is not a valid uuid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"403": {
"description": "Access denied to this post's account.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"404": {
"description": "No post with that id.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"409": {
"description": "The post is not `scheduled`, so it can no longer be cancelled.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostErrorResponse"
}
}
}
}
},
"x-recoup-availability": "pending"
}