API Reference
Platforms

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

MethodPathDescriptionStatus
GET/api/v1/platformsList all platforms200
GET/api/v1/platforms/{platform}/capabilitiesPlatform capabilities and payload schema200

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

FieldTypeDescription
slugstringUnique platform identifier used in all other API calls (e.g. as the platform path parameter)
namestringHuman-readable display name
contentTypesstring[]Content types supported by this platform. Pass one of these as type when creating an assignment
hasCapabilitiesbooleanWhether 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

ParameterValues
platformyoutube, 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

FieldTypeDescription
platformstringPlatform slug (same as the path parameter)
contentTypesobject[]Capabilities per content type

Each contentTypes item

FieldTypeDescription
slugstringContent type identifier — use this as the type field when creating an assignment
namestringHuman-readable display name
maxFileSizeBytesintegerMaximum allowed file size in bytes. null if not applicable
maxDurationSecondsintegerMaximum video duration in seconds. null for non-video types
payloadFieldsobject[]Schema of the payload object accepted by this content type

Each payloadFields item

FieldTypeDescription
namestringField name — use as the key inside the payload object
typestringData type: string, enum, array, boolean, integer
requiredbooleanIf true, the field must be present in the payload
defaultanyValue used by the platform if the field is omitted
optionsstring[]For enum type — the list of accepted values
maxLengthintegerFor string type — maximum character count
descriptionstringHuman-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:

  1. Call GET /api/v1/platforms to list available platforms and content types.
  2. Call GET /api/v1/platforms/{platform}/capabilities for the specific platform.
  3. Find the contentTypes entry whose slug matches the type you want to publish.
  4. Build your payload using the payloadFields schema — include all required fields and any optional fields relevant to your use case.
  5. Pass payload and type when 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

StatusCodeReason
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENKey does not have access to this resource
404NOT_FOUNDPlatform 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 payload schema from this page
  • Connections — get connectionId values 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