API reference
Versioned endpoints for your application. Every request is scoped to one workspace and the permissions on its API key.
Download OpenAPI 3.1 · Getting started
https://app.faryen.com/apiGET/v1/workspaces
List the workspace authorized for this connection.
Permission: workspaces:read
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
GET/v1/workspaces/{workspace_id}/accounts
Read connected account identities, formats and comment support.
Permission: accounts:read
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
limit | query | No | integer |
after | query | No | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
GET/v1/workspaces/{workspace_id}/posts
List posts in the authorized workspace with cursor pagination.
Permission: posts:read
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
limit | query | No | integer |
after | query | No | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/posts
Create an unpublished draft. This never publishes a post.
Permission: posts:write
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"post_id": {
"type": "string",
"format": "uuid",
"description": "Optional client-generated post ID."
},
"content": {
"type": "string",
"maxLength": 10000
},
"media_paths": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20
},
"targets": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"description": "Connected account ID."
},
"post_format": {
"type": "string",
"description": "A format supported by this account."
},
"comment_plan": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique comment ID."
},
"text": {
"type": "string",
"maxLength": 2000
},
"delay_minutes": {
"type": "integer",
"minimum": 0,
"maximum": 10080
}
},
"required": [
"id",
"text",
"delay_minutes"
],
"additionalProperties": false
}
},
"caption_override": {
"type": [
"string",
"null"
],
"maxLength": 10000
},
"media_paths_override": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"pinterest_options": {
"type": [
"object",
"null"
]
},
"youtube_options": {
"type": [
"object",
"null"
]
},
"tiktok_options": {
"type": [
"object",
"null"
]
}
},
"required": [
"account_id",
"post_format",
"comment_plan"
],
"additionalProperties": false
}
}
},
"required": [
"content"
],
"additionalProperties": false
}Responses: 201, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
GET/v1/workspaces/{workspace_id}/posts/{post_id}
Read the current post revision, plan, destination outcomes and follow-up comments.
Permission: posts:read
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
post_id | path | Yes | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
PATCH/v1/workspaces/{workspace_id}/posts/{post_id}
Replace the content and destination plan of an existing draft. Read it first; omitted media and targets become empty.
Permission: posts:write
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
post_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"expected_revision": {
"type": "integer",
"minimum": 1,
"description": "The revision read and reviewed before this action."
},
"content": {
"type": "string",
"maxLength": 10000
},
"media_paths": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20
},
"targets": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"description": "Connected account ID."
},
"post_format": {
"type": "string",
"description": "A format supported by this account."
},
"comment_plan": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique comment ID."
},
"text": {
"type": "string",
"maxLength": 2000
},
"delay_minutes": {
"type": "integer",
"minimum": 0,
"maximum": 10080
}
},
"required": [
"id",
"text",
"delay_minutes"
],
"additionalProperties": false
}
},
"caption_override": {
"type": [
"string",
"null"
],
"maxLength": 10000
},
"media_paths_override": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"pinterest_options": {
"type": [
"object",
"null"
]
},
"youtube_options": {
"type": [
"object",
"null"
]
},
"tiktok_options": {
"type": [
"object",
"null"
]
}
},
"required": [
"account_id",
"post_format",
"comment_plan"
],
"additionalProperties": false
}
}
},
"required": [
"expected_revision",
"content"
],
"additionalProperties": false
}Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
DELETE/v1/workspaces/{workspace_id}/posts/{post_id}
Remove an unpublished Faryen post. This does not delete remote social posts.
Permission: posts:delete
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
post_id | path | Yes | string |
expected_revision | query | Yes | integer |
Idempotency-Key | header | Yes | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/posts/{post_id}/schedule
Queue the reviewed draft at a future RFC 3339 instant. Obtain user approval of the content, accounts and time first.
Permission: posts:schedule
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
post_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"expected_revision": {
"type": "integer",
"minimum": 1,
"description": "The revision read and reviewed before this action."
},
"scheduled_at": {
"type": "string",
"format": "date-time",
"description": "A future instant with explicit UTC offset."
}
},
"required": [
"expected_revision",
"scheduled_at"
],
"additionalProperties": false
}Responses: 202, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/posts/{post_id}/publish
Queue the reviewed draft for publication now. Obtain user approval of the exact content and accounts first. A queue acknowledgement is not a publication receipt.
Permission: posts:publish
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
post_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"expected_revision": {
"type": "integer",
"minimum": 1,
"description": "The revision read and reviewed before this action."
}
},
"required": [
"expected_revision"
],
"additionalProperties": false
}Responses: 202, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/posts/{post_id}/cancel
Return a scheduled, unstarted post to a draft.
Permission: posts:schedule
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
post_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"expected_revision": {
"type": "integer",
"minimum": 1,
"description": "The revision read and reviewed before this action."
}
},
"required": [
"expected_revision"
],
"additionalProperties": false
}Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
GET/v1/workspaces/{workspace_id}/analytics
Read stored daily analytics in an inclusive date range. Missing values remain null. Does not start a provider sync.
Permission: analytics:read
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
limit | query | No | integer |
after | query | No | string |
from | query | Yes | string |
to | query | Yes | string |
account_id | query | No | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/media/uploads
Reserve subscriber storage and obtain a private upload URL. A 50 MB reservation counts until completion or cleanup.
Permission: media:write
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"post_id": {
"type": "string",
"format": "uuid"
},
"filename": {
"type": "string",
"maxLength": 100
},
"content_type": {
"type": "string",
"enum": [
"image/jpeg",
"image/png",
"video/mp4"
]
},
"size": {
"type": "integer",
"minimum": 1,
"maximum": 52428800
}
},
"required": [
"post_id",
"filename",
"content_type",
"size"
],
"additionalProperties": false
}Responses: 201, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/media/complete
Confirm the private object and run the same media metadata inspection used by the app.
Permission: media:write
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"post_id": {
"type": "string",
"format": "uuid"
},
"path": {
"type": "string"
}
},
"required": [
"post_id",
"path"
],
"additionalProperties": false
}Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
GET/v1/workspaces/{workspace_id}/webhooks
List this workspace’s webhook subscriptions. Signing secrets are never returned.
Permission: webhooks:manage
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
POST/v1/workspaces/{workspace_id}/webhooks
Create a webhook for a public HTTPS receiver. Save the signing secret on the first successful response; retries omit it.
Permission: webhooks:manage
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
JSON request schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"events": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"maxItems": 6,
"items": {
"type": "string",
"enum": [
"destination.published",
"destination.failed",
"destination.unverified",
"comment.published",
"comment.failed",
"comment.unverified"
]
}
}
},
"required": [
"url",
"events"
],
"additionalProperties": false
}Responses: 201, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
DELETE/v1/workspaces/{workspace_id}/webhooks/{webhook_id}
Revoke a webhook and cancel undelivered events.
Permission: webhooks:manage
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
webhook_id | path | Yes | string |
Idempotency-Key | header | Yes | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.
GET/v1/workspaces/{workspace_id}/webhooks/{webhook_id}/deliveries
Read delivery status, attempt count and last HTTP status. Does not expose signing secrets or response bodies.
Permission: webhooks:manage
Parameters
| Name | Location | Required | Type |
|---|---|---|---|
workspace_id | path | Yes | string |
webhook_id | path | Yes | string |
limit | query | No | integer |
after | query | No | string |
Responses: 200, 400, 401, 403, 404, 409, 413, 422, 429, 503. All responses include request_id. Follow next_cursor when present.