Creates a draft, a scheduled post, a queued post or publishes right away, depending on which timing field you send. Use targets to give single accounts their own text. The post is checked against every platform first; all problems come back at once in error.details (try POST /posts/validate for a dry run). Send an Idempotency-Key header to make retries safe.
Requires posts:write.
Authorization
bearerAuth API key starting with fh_
In: header
Header Parameters
Any unique string up to 255 characters. A retry with the same key within 24 hours returns the first response instead of running again.
length <= 255Request Body
application/json
Profile id
^prof_[0-9a-fA-F]{32}$Post text. Each account can get its own text through targets
length <= 63206Publish to every active account of these platforms in the profile
1 <= itemsOr name the accounts explicitly (wins over platforms)
1 <= itemsThe accounts to publish to, each with optional own text. Wins over platforms and accountIds
1 <= items <= 50Files from POST /media, in display order
items <= 20Schedule for this time. Leave out all three timing fields for a draft
date-timePublish right away
Take the profile's next free queue slot
Time zone shown with the post. Defaults to the profile's
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://feedhorizon.com/api/v1/posts" \ -H "Content-Type: application/json" \ -d '{ "profileId": "prof_0195f0a27b3c7d4e8f5a1b2c3d4e5f60" }'{
"data": {
"id": "post_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
"profileId": "prof_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
"content": "string",
"status": "draft",
"source": "ui",
"scheduledAt": "2019-08-24T14:15:22Z",
"timezone": "string",
"publishedAt": "2019-08-24T14:15:22Z",
"idempotencyKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"targets": [
{
"id": "tgt_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
"socialAccountId": "acc_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
"accountName": "string",
"platform": "twitter",
"content": "string",
"options": {
"pinterest": {
"boardId": "string",
"title": "string",
"link": "http://example.com"
},
"tiktok": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"allowComment": true,
"allowDuet": true,
"allowStitch": true,
"brandOrganic": true,
"brandedContent": true,
"aiGenerated": true
}
},
"status": "draft",
"attempts": 0,
"scheduledAt": "2019-08-24T14:15:22Z",
"publishedAt": "2019-08-24T14:15:22Z",
"platformPostId": "string",
"platformUrl": "string",
"error": {
"code": "string",
"category": "auth_expired",
"source": "user",
"message": "string"
}
}
],
"media": [
{
"id": "med_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
"url": "string",
"mimeType": "string",
"filename": "string",
"sizeBytes": 0
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}Get a post GET
Requires `posts:read`.
Check a post without creating it POST
Takes the same body as creating a post and runs every check (text length and media per platform, accounts, schedule, queue) without storing anything. Answers 200 with `valid: false` and the problems instead of an error, so agents can fix everything in one round. Requires `posts:read`.