REST API v1 Specification

Build custom social workflows & integrations.

Programmatically create scheduled posts, query active automations, capture lead contacts, and inspect real-time webhooks using our HTTP JSON API.

Authentication & Request Headers

All API requests must include your secret API key passed in the HTTP Authorization header using the Bearer scheme. Generate your key in Dashboard Settings → API Keys.

Authorization: Bearer jhat_live_1787299000_abc123
Content-Type: application/json

Endpoints Specification

POST/api/posts/schedule
Scope: write

Schedule a text, image, or video Reel post across target connected accounts.

Example cURL Request:
curl -X POST https://jhatpatly-saas.vercel.app/api/posts/schedule \
 -H "Authorization: Bearer jhat_live_your_key_here" \
 -H "Content-Type: application/json" \
 -d '{
 "caption": " Launching our new summer collection! Check out the link in DM.",
 "mediaUrls": ["https://example.com/image.png"],
 "accountIds": ["acc_cl123456"],
 "scheduledAt": "2026-08-25T14:00:00Z"
 }'
Response JSON (201 Created):
{
 "success": true,
 "postId": "post_cl987654",
 "status": "scheduled",
 "scheduledAt": "2026-08-25T14:00:00.000Z"
}
GET/api/automations
Scope: read

Fetch all active and paused trigger automations configured for your workspace.

Example cURL Request:
curl -X GET https://jhatpatly-saas.vercel.app/api/automations \
 -H "Authorization: Bearer jhat_live_your_key_here"
GET/api/leads/export
Scope: read

Export lead contacts collected via Comment-to-DM triggers in JSON or CSV format.

Example cURL Request:
curl -X GET "https://jhatpatly-saas.vercel.app/api/leads/export?format=json" \
 -H "Authorization: Bearer jhat_live_your_key_here"