Platforms
Registry of supported social media platforms and their publishing capabilities.
Use this API to discover which platforms are available, what content types each one supports, and exactly which payload fields are accepted when creating an assignment. Always fetch capabilities before building a publish form or constructing a payload — field constraints differ between platforms and content types.
Base URL: https://pharlo.io
Auth: Authorization: Bearer ds_live_...
Endpoints
| Method | Path | Description | Status |
|---|---|---|---|
| GET | /api/v1/platforms | List all platforms | 200 |
| GET | /api/v1/platforms/{platform}/capabilities | Platform capabilities and payload schema | 200 |
GET /api/v1/platforms
Lists all supported platforms with their slugs, display names, and supported content types.
Example request
curl https://pharlo.io/api/v1/platforms \
-H "Authorization: Bearer $DELIVERY_API_KEY"Response 200 OK
{
"items": [
{
"slug": "youtube",
"name": "YouTube",
"contentTypes": ["video", "short"],
"hasCapabilities": true
},
{
"slug": "facebook",
"name": "Facebook",
"contentTypes": ["video", "image", "link", "text", "reel", "story"],
"hasCapabilities": true
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
slug | string | Unique platform identifier used in all other API calls (e.g. as the platform path parameter) |
name | string | Human-readable display name |
contentTypes | string[] | Content types supported by this platform. Pass one of these as type when creating an assignment |
hasCapabilities | boolean | Whether a detailed capabilities endpoint exists for this platform. If true, call the capabilities endpoint to get the full payload schema |
GET /api/v1/platforms/{platform}/capabilities
Returns the detailed capabilities for a platform: all supported content types with their file size and duration limits, plus the complete payload field schema with types, constraints, and defaults.
Always call this endpoint before creating an assignment. The accepted payload fields — and their constraints — differ between platforms and content types. Sending an invalid or unsupported field will result in a 400 Validation Error. See Creating an assignment.
Path parameters
| Parameter | Values |
|---|---|
platform | youtube, facebook |
Example request
curl https://pharlo.io/api/v1/platforms/youtube/capabilities \
-H "Authorization: Bearer $DELIVERY_API_KEY"Response 200 OK — YouTube
{
"platform": "youtube",
"contentTypes": [
{
"slug": "video",
"name": "Video",
"maxFileSizeBytes": 274877906944,
"maxDurationSeconds": 43200,
"payloadFields": [
{
"name": "title",
"type": "string",
"required": true,
"maxLength": 100,
"description": "Video title"
},
{
"name": "description",
"type": "string",
"required": false,
"maxLength": 5000,
"description": "Video description"
},
{
"name": "privacy",
"type": "enum",
"required": false,
"default": "private",
"options": ["public", "unlisted", "private"],
"description": "Visibility setting"
},
{
"name": "tags",
"type": "array",
"required": false,
"default": [],
"description": "Tags (max 500 chars total)"
},
{
"name": "categoryId",
"type": "string",
"required": false,
"description": "YouTube category ID (e.g. '22' for People & Blogs)"
},
{
"name": "madeForKids",
"type": "boolean",
"required": false,
"default": false,
"description": "Whether the video is made for children (COPPA compliance)"
}
]
},
{
"slug": "short",
"name": "Short",
"maxFileSizeBytes": 1073741824,
"maxDurationSeconds": 60,
"payloadFields": [
{
"name": "title",
"type": "string",
"required": true,
"maxLength": 100,
"description": "Short title"
},
{
"name": "privacy",
"type": "enum",
"required": false,
"default": "private",
"options": ["public", "unlisted", "private"],
"description": "Visibility setting"
}
]
}
]
}Response 200 OK — Facebook
{
"platform": "facebook",
"contentTypes": [
{
"slug": "video",
"name": "Video",
"maxFileSizeBytes": 10737418240,
"maxDurationSeconds": 14400,
"payloadFields": [
{
"name": "title",
"type": "string",
"required": false,
"maxLength": 255,
"description": "Post title"
},
{
"name": "description",
"type": "string",
"required": false,
"maxLength": 63206,
"description": "Post description"
}
]
},
{
"slug": "reel",
"name": "Reel",
"maxFileSizeBytes": 1073741824,
"maxDurationSeconds": 90,
"payloadFields": [
{
"name": "description",
"type": "string",
"required": false,
"maxLength": 2200,
"description": "Caption text"
}
]
},
{
"slug": "image",
"name": "Image",
"maxFileSizeBytes": 4194304,
"maxDurationSeconds": null,
"payloadFields": [
{
"name": "message",
"type": "string",
"required": false,
"maxLength": 63206,
"description": "Caption text"
}
]
}
]
}Response fields
Top level
| Field | Type | Description |
|---|---|---|
platform | string | Platform slug (same as the path parameter) |
contentTypes | object[] | Capabilities per content type |
Each contentTypes item
| Field | Type | Description |
|---|---|---|
slug | string | Content type identifier — use this as the type field when creating an assignment |
name | string | Human-readable display name |
maxFileSizeBytes | integer | Maximum allowed file size in bytes. null if not applicable |
maxDurationSeconds | integer | Maximum video duration in seconds. null for non-video types |
payloadFields | object[] | Schema of the payload object accepted by this content type |
Each payloadFields item
| Field | Type | Description |
|---|---|---|
name | string | Field name — use as the key inside the payload object |
type | string | Data type: string, enum, array, boolean, integer |
required | boolean | If true, the field must be present in the payload |
default | any | Value used by the platform if the field is omitted |
options | string[] | For enum type — the list of accepted values |
maxLength | integer | For string type — maximum character count |
description | string | Human-readable explanation of the field |
Fields not listed in payloadFields are silently ignored by the platform. Sending an unrecognised field does not cause an error, but it has no effect.
Using capabilities to build a payload
A typical workflow:
- Call
GET /api/v1/platformsto list available platforms and content types. - Call
GET /api/v1/platforms/{platform}/capabilitiesfor the specific platform. - Find the
contentTypesentry whoseslugmatches the type you want to publish. - Build your
payloadusing thepayloadFieldsschema — include allrequiredfields and any optional fields relevant to your use case. - Pass
payloadandtypewhen calling POST /api/v1/assignments.
// capabilities response (excerpt) → payload you send to /api/v1/assignments
{
"name": "title", "type": "string", "required": true, "maxLength": 100
"name": "privacy", "type": "enum", "required": false, "default": "private"
}
// → your assignment payload
{
"connectionId": "7f3e1a2b-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
"type": "video",
"payload": {
"title": "Product Demo",
"privacy": "public"
},
"mediaUrl": "https://cdn.example.com/demo.mp4"
}Error responses
| Status | Code | Reason |
|---|---|---|
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN | Key does not have access to this resource |
404 | NOT_FOUND | Platform slug does not exist |
{
"error": "Not found",
"details": {
"platform": ["Platform 'tiktok' is not supported."]
}
}For a full guide on handling errors, see Error Handling.
See also
- Assignments — create a publishing job using the
payloadschema from this page - Connections — get
connectionIdvalues for the channels you publish to - Publishing guide — end-to-end walkthrough of the assignment lifecycle
- Core concepts — overview of platforms, connections, and assignments and how they relate