Write Post API
Publish Post
Publish immediately by creating a post without scheduled_at.
POST
/api/v1/write-post/posts/
Live
There is no separate /publish route. Publishing now uses Create Post and omits scheduled_at. The backend creates the post and delivers it to the selected connections.
Notes
- Do not send scheduled_at for immediate publish.
- A dedicated POST /posts/{id}/publish route is not implemented.
Body fields
| Name | Type | Required | Description |
|---|---|---|---|
headline |
string | Yes | Post headline (or title). |
content |
string | Yes | Post body. |
connection_ids |
array[integer] | Yes | Target connections. |
Headers
HTTP
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Request body
JSON
{
"headline": "Publish now",
"content": "<p>Going live</p>",
"connection_ids": [1]
}
Examples
cURL
curl -X POST "https://YOUR-DOMAIN/api/v1/write-post/posts/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"headline":"Publish now","content":"<p>Going live</p>","connection_ids":[1]}'
JavaScript
const response = await fetch("https://engagegrove.com/api/v1/write-post/posts/", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
Accept: "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
"headline": "Publish now",
"content": "<p>Going live</p>",
"connection_ids": [1]
})
});
const data = await response.json();
Python
import requests
import json
url = "https://engagegrove.com/api/v1/write-post/posts/"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = json.loads("""{
"headline": "Publish now",
"content": "<p>Going live</p>",
"connection_ids": [1]
}""")
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
PHP
$ch = curl_init("https://engagegrove.com/api/v1/write-post/posts/");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"Accept: application/json",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"headline": "Publish now",
"content": "<p>Going live</p>",
"connection_ids": [1]
}
JSON
]);
$response = curl_exec($ch);
curl_close($ch);
Response example
JSON
{
"success": true,
"request_id": "req_...",
"data": { "post": { "id": 1, "status": "published" } }
}
Status codes
| Status | Meaning |
|---|---|
201 | Post created and delivery started |
400 | Validation error |
401 | Invalid API key |
403 | Missing write_post permission |
429 | Rate limit exceeded |
Try it
Paste your API key locally. It is sent only to this site’s API and is never saved.
Status: · Time: ms · Request ID:
Response
Errors
INVALID_API_KEY— missing/invalid Bearer tokenSERVICE_ACCESS_DENIED— key lackswrite_postVALIDATION_ERROR— invalid payload or domain validationRESOURCE_NOT_FOUND— unknown resourceRATE_LIMIT_EXCEEDED— too many requests