ProvidersFacebook

Facebook

Facebook Pages through your Meta app with Facebook Login; every operation acts with the Page's own access token, which Koil obtains when the profile is connected.

The permissions each capability needs are in App Review: Facebook.

  • Without pages_manage_metadata a Page still connects, but it is never subscribed to webhooks, so no events arrive for it.
  • Comments and posts emit their whole lifecycle: an edit is updated, a deletion deleted, and a hide or unhide moderated with the resulting hidden state.
Content typeOperationsEventsBackfill
facebook.media.itemslist, get, publishcreated, updated, deletedyes
facebook.media.commentslist, get, publish, moderate, deletecreated, updated, deleted, moderatedno
facebook.media.mentionsnonecreatedno
facebook.stories.itemslist, publishcreatedyes
facebook.dm.threadslist, getnoneno
facebook.dm.messageslist, publishcreatedno

facebook.media.items

The Page's posts.

list

List published Facebook Page posts.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId"
  ]
}

get

Get one Facebook Page post by provider id.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

publish

Publish a Facebook Page post: text, a link, photos, a video, or a reel.

Submit through POST /v1/publish-requests with contentType: "facebook.media.items". These fields go in the item's args; connectedProfileId and variant are item fields.

variant: "feed"

FieldTypeRequiredDescription
schedulingobjectnoFuture operation time and optional wall-clock timezone.
textstringyesCaption/body text for content.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    },
    "text": {
      "description": "Caption/body text for content.",
      "type": "string"
    }
  },
  "required": [
    "text"
  ]
}

variant: "feed"

FieldTypeRequiredDescription
schedulingobjectnoFuture operation time and optional wall-clock timezone.
textstringnoCaption/body text for content.
linkstring (uri)yesA URL to attach as a link post; not combinable with media.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    },
    "text": {
      "description": "Caption/body text for content.",
      "type": "string"
    },
    "link": {
      "minLength": 1,
      "format": "uri",
      "description": "A URL to attach as a link post; not combinable with media.",
      "type": "string"
    }
  },
  "required": [
    "link"
  ]
}

variant: "feed"

FieldTypeRequiredDescription
schedulingobjectnoFuture operation time and optional wall-clock timezone.
textstringnoCaption/body text for content.
mediaobject | object[]yes
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    },
    "text": {
      "description": "Caption/body text for content.",
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 10,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    }
  },
  "required": [
    "media"
  ]
}

variant: "reel"

FieldTypeRequiredDescription
textstringnoCaption/body text for content.
mediaobject | object[]yes
schedulingobjectnoFuture operation time and optional wall-clock timezone.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "text": {
      "description": "Caption/body text for content.",
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "pattern": "^video/",
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "pattern": "^video/",
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    },
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    }
  },
  "required": [
    "media"
  ]
}

Not offered

  • update: provider not supported
  • moderate: provider not supported
  • delete: provider not supported

Events

Backfill: supported (bounded coverage); see Backfill history.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
variant"feed" | "reel"yes
textstringnoCaption/body text for content.
mediaobject[]no
providerPermalinkstring (uri)noCanonical provider URL for content.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"facebook.media.items"yes

facebook.media.comments

Comments on the Page's posts, replies included.

list

List comments on one Facebook Page post, replies included.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
mediaExternalIdstringyes
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "mediaExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "mediaExternalId"
  ]
}

get

Get one Facebook Page comment by provider id.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

publish

Publish a Facebook Page comment: a reply to a comment or a top-level comment on a post.

Submit through POST /v1/publish-requests with contentType: "facebook.media.comments". These fields go in the item's args; connectedProfileId and variant are item fields.

FieldTypeRequiredDescription
targetobjectyesThe provider content this publish targets, identified as events identify it.
textstringyesCaption/body text for content.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "target": {
      "additionalProperties": false,
      "description": "The provider content this publish targets, identified as events identify it.",
      "type": "object",
      "properties": {
        "contentType": {
          "anyOf": [
            {
              "const": "facebook.media.comments",
              "type": "string"
            },
            {
              "const": "facebook.media.items",
              "type": "string"
            }
          ]
        },
        "externalId": {
          "description": "Provider-owned content identifier.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "contentType",
        "externalId"
      ]
    },
    "text": {
      "description": "Caption/body text for content.",
      "type": "string"
    }
  },
  "required": [
    "target",
    "text"
  ]
}

moderate

Hide or unhide a comment on a Facebook Page post.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
hiddenbooleanyes
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "hidden": {
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId",
    "hidden"
  ]
}

delete

Delete a comment on a Facebook Page post.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

Not offered

  • update: provider not supported

Events

Backfill: not offered — provider no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
mediaExternalIdstringyes
textstringyesCaption/body text for content.
authorobjectnoProvider actor reference for observed content.
threadobjectnoParent/root identifiers for threaded contexts.
hiddenbooleanno
providerPermalinkstring (uri)noCanonical provider URL for content.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"facebook.media.comments"yes

facebook.media.mentions

Mentions of the Page in other posts and comments. Delivered as events only: Meta offers no endpoint that lists them.

Not offered

  • list: provider no endpoint
  • get: not applicable
  • publish: provider not supported
  • update: provider not supported
  • moderate: provider not supported
  • delete: provider not supported

Events

Backfill: not offered — provider no endpoint.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
variant"post" | "comment"yes
mediaExternalIdstringno
commentExternalIdstringno
textstringnoCaption/body text for content.
authorobjectnoProvider actor reference for observed content.
providerPermalinkstring (uri)noCanonical provider URL for content.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"facebook.media.mentions"yes

facebook.stories.items

The Page's stories.

list

List the Page's stories.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId"
  ]
}

publish

Publish a Facebook Page story from one photo or video.

Submit through POST /v1/publish-requests with contentType: "facebook.stories.items". These fields go in the item's args; connectedProfileId and variant are item fields.

FieldTypeRequiredDescription
mediaobject | object[]yes
schedulingobjectnoFuture operation time and optional wall-clock timezone.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    },
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    }
  },
  "required": [
    "media"
  ]
}

Not offered

  • get: provider no endpoint
  • update: provider not supported
  • moderate: provider not supported
  • delete: provider not supported

Events

Backfill: supported (bounded coverage); see Backfill history.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
variant"photo" | "video"yes
status"published" | "archived"yes
mediaExternalIdstringnoMeta's id for the story's photo or video.
providerPermalinkstring (uri)noCanonical provider URL for content.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"facebook.stories.items"yes

facebook.dm.threads

The Page's Messenger conversations.

list

List the Page's Messenger threads.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId"
  ]
}

get

Get one Messenger thread by provider id.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

Not offered

  • publish: provider not supported
  • update: provider not supported
  • moderate: provider not supported
  • delete: provider not supported

Events

None: this content type is read-only.

Backfill: not offered — not implemented.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
participantExternalIdsstring[]yes
updatedAtstring (date-time)noProvider update timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"facebook.dm.threads"yes

facebook.dm.messages

Messages in one Messenger conversation.

list

List Messenger messages in one thread.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
threadExternalIdstringyes
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "threadExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "threadExternalId"
  ]
}

publish

Send a Messenger message from the Page to a recipient.

Submit through POST /v1/publish-requests with contentType: "facebook.dm.messages". These fields go in the item's args; connectedProfileId and variant are item fields.

FieldTypeRequiredDescription
recipientExternalIdstringyesProvider actor the message is addressed to, such as a DM event's author.id.
textstringyesCaption/body text for content.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "recipientExternalId": {
      "minLength": 1,
      "description": "Provider actor the message is addressed to, such as a DM event's author.id.",
      "type": "string"
    },
    "text": {
      "description": "Caption/body text for content.",
      "type": "string"
    }
  },
  "required": [
    "recipientExternalId",
    "text"
  ]
}

Not offered

  • get: provider not supported
  • update: provider not supported
  • moderate: provider not supported
  • delete: provider not supported

Events

Backfill: not offered — not implemented.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
threadExternalIdstringnoOwning conversation id. Present on messages read through facebook.dm.threads; absent on webhook-observed messages because Messenger webhooks do not identify the conversation.
textstringnoCaption/body text for content.
authorobjectnoProvider actor reference for observed content.
threadobjectnoParent/root identifiers for threaded contexts.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"facebook.dm.messages"yes

On this page