Events reference

Every event topic Koil delivers to Event Destinations, with the JSON Schema of each delivery envelope.

Every delivery to an Event Destination is one JSON object with the same envelope: a stable id for dedupe, the wire topic, the event time, the apiVersion it is rendered in, the family's context (Koil's context for the event, always including organizationId and mode), and the topic's data payload. Subscribe to a topic exactly, to a family with a trailing .*, or to everything with *.

This page is generated from the event catalog when the docs are built; a topic that is not listed here is not emitted.

Connection

connection.created

A platform connection was created.

data is the resource exactly as GET /v1/connections/{connectionId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
connectionIdstringyes
issuerIdstringyes
appIdstringno

data

FieldTypeRequiredDescription
kind"connection"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil Connection identifier.
issuerIdstringyesThe issuer the Connection's credential comes from (GET /v1/issuers): for oauth, its App's, such as facebook or google; for a key, the one the key is for, such as app_store_connect.
method"oauth" | "key"yesHow the Connection was obtained. oauth: an end user authorized your App, through a Connect Session or a grant you created it from. key: the brand gave you a key of its own, which you sent to POST /v1/connections; there is no App.
oauthobjectnoWhat an oauth Connection was obtained through. Present exactly when method is "oauth".
keyobjectnoWhat a key Connection holds of its key that Koil returns. Present exactly when method is "key".
clientUserIdstringnoYour own identifier for the end user the Connection belongs to.
subjectstringnoThe platform's id for the account the Connection's credential acts as: for oauth, the user who authorized (Google's sub, Facebook's user id, Instagram's user_id, TikTok's open_id); for a key, the account the platform confirmed it belongs to. LinkedIn names none, and a lookup that failed at connect time leaves it absent.
status"active" | "reauthorization_required" | "invalid"yesactive while its credential authorizes. reauthorization_required while the end user must connect again soon: an expiring credential still works until then, while a key the platform refuses (key_refused, for which Koil polls nothing and bills nothing) or will not issue a token from (renewal_failed) does not. invalid once it no longer authorizes, which is final: the end user must connect again, and Koil polls nothing for its Profiles, does not bill them, and deletes the Connection six days after it became invalid. Either way, create a Connect Session with this connectionId (or, for a key, replace it with PUT /v1/connections/{connectionId}/credential), and connection.updated announces every change. statusReason says why it is not active.
statusReason"renewal_failed" | "revoked" | "expired" | "duplicate" | "expiring" | "key_refused"noWhy the Connection is not active; absent while it is. For invalid: renewal_failed (the platform refused to renew the credential), revoked (the platform refused its token, for example because the end user removed the app), expired (the credential ran out with nothing to renew it), duplicate (the account it acts as already has another Connection under the same issuer, App where it has one, and clientUserId, which keeps its place), or key_refused (the platform still refused the key 48 hours after it first did). For reauthorization_required: expiring (the credential, or the refresh token that renews it, expires within 14 days, by credential.reauthorizeBy), or key_refused (the platform refused a key whose refusal can be a passing one, such as App Store Connect's 401: Koil asks the platform again for 48 hours, and the Connection is active again if it takes the key, or invalid if it still refuses it).
credentialobjectnoWhat the Connection's credential states of itself, wherever the Connection appears: its read, its listing and its events. Absent while Koil holds no credential for the Connection, as once it is invalid. The expiry of an access token Koil renews is Koil's concern, so it is not stated here.
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "connection.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "connectionId",
        "issuerId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "connectionId": {
          "type": "string",
          "minLength": 1
        },
        "issuerId": {
          "type": "string",
          "minLength": 1
        },
        "appId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "issuerId",
        "method",
        "status",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "connection",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil Connection identifier.",
          "minLength": 1
        },
        "issuerId": {
          "type": "string",
          "description": "The issuer the Connection's credential comes from (`GET /v1/issuers`): for `oauth`, its App's, such as `facebook` or `google`; for a key, the one the key is for, such as `app_store_connect`.",
          "minLength": 1
        },
        "method": {
          "enum": [
            "oauth",
            "key"
          ],
          "description": "How the Connection was obtained. `oauth`: an end user authorized your App, through a Connect Session or a grant you created it from. `key`: the brand gave you a key of its own, which you sent to `POST /v1/connections`; there is no App."
        },
        "oauth": {
          "type": "object",
          "required": [
            "appId"
          ],
          "properties": {
            "appId": {
              "type": "string",
              "description": "The App the Connection acts through.",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "description": "What an `oauth` Connection was obtained through. Present exactly when `method` is `\"oauth\"`."
        },
        "key": {
          "type": "object",
          "required": [
            "config"
          ],
          "properties": {
            "config": {
              "type": "object",
              "patternProperties": {
                "^.*$": {}
              },
              "description": "The key's public half, as `GET /v1/issuers` declares it (`methods.key.config`), such as the key's id; never its secret."
            }
          },
          "additionalProperties": false,
          "description": "What a `key` Connection holds of its key that Koil returns. Present exactly when `method` is `\"key\"`."
        },
        "clientUserId": {
          "type": "string",
          "description": "Your own identifier for the end user the Connection belongs to.",
          "maxLength": 255
        },
        "subject": {
          "type": "string",
          "description": "The platform's id for the account the Connection's credential acts as: for `oauth`, the user who authorized (Google's `sub`, Facebook's user id, Instagram's `user_id`, TikTok's `open_id`); for a key, the account the platform confirmed it belongs to. LinkedIn names none, and a lookup that failed at connect time leaves it absent."
        },
        "status": {
          "enum": [
            "active",
            "reauthorization_required",
            "invalid"
          ],
          "description": "`active` while its credential authorizes. `reauthorization_required` while the end user must connect again soon: an `expiring` credential still works until then, while a key the platform refuses (`key_refused`, for which Koil polls nothing and bills nothing) or will not issue a token from (`renewal_failed`) does not. `invalid` once it no longer authorizes, which is final: the end user must connect again, and Koil polls nothing for its Profiles, does not bill them, and deletes the Connection six days after it became `invalid`. Either way, create a Connect Session with this `connectionId` (or, for a key, replace it with `PUT /v1/connections/{connectionId}/credential`), and `connection.updated` announces every change. `statusReason` says why it is not `active`."
        },
        "statusReason": {
          "enum": [
            "renewal_failed",
            "revoked",
            "expired",
            "duplicate",
            "expiring",
            "key_refused"
          ],
          "description": "Why the Connection is not `active`; absent while it is. For `invalid`: `renewal_failed` (the platform refused to renew the credential), `revoked` (the platform refused its token, for example because the end user removed the app), `expired` (the credential ran out with nothing to renew it), `duplicate` (the account it acts as already has another Connection under the same issuer, App where it has one, and `clientUserId`, which keeps its place), or `key_refused` (the platform still refused the key 48 hours after it first did). For `reauthorization_required`: `expiring` (the credential, or the refresh token that renews it, expires within 14 days, by `credential.reauthorizeBy`), or `key_refused` (the platform refused a key whose refusal can be a passing one, such as App Store Connect's 401: Koil asks the platform again for 48 hours, and the Connection is `active` again if it takes the key, or `invalid` if it still refuses it)."
        },
        "credential": {
          "type": "object",
          "properties": {
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The scopes the credential holds, as Koil stores them. Absent when Koil does not know them, which is not a credential of none."
            },
            "reauthorizeBy": {
              "type": "string",
              "format": "date-time",
              "description": "When the credential stops working unless its end user authorizes again. Where Koil can renew the credential, it is the platform's deadline for renewing it: TikTok's and LinkedIn's refresh tokens expire about a year after authorization. Where nothing renews it (a LinkedIn grant without a refresh token), it is the access token's own expiry. Once a refresh token's deadline has passed, it stays that deadline, or the access token's expiry where that is earlier: it never moves later. Koil makes the Connection `reauthorization_required` 14 days ahead of it; send the end user through a Connect Session with this `connectionId` before then. Absent when nothing but a revocation ends the credential (a key, which issues its own tokens), or while Koil does not know the date: a grant created without `refreshTokenExpiresAt`, until a renewal states it."
            }
          },
          "additionalProperties": false,
          "description": "What the Connection's credential states of itself, wherever the Connection appears: its read, its listing and its events. Absent while Koil holds no credential for the Connection, as once it is `invalid`. The expiry of an access token Koil renews is Koil's concern, so it is not stated here."
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

connection.deleted

A platform connection was deleted: through the API, with its App or Organization, or by Koil once the end user revoked access. data is the connection as it last stood.

data is the resource exactly as GET /v1/connections/{connectionId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
connectionIdstringyes
issuerIdstringyes
appIdstringno

data

FieldTypeRequiredDescription
kind"connection"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil Connection identifier.
issuerIdstringyesThe issuer the Connection's credential comes from (GET /v1/issuers): for oauth, its App's, such as facebook or google; for a key, the one the key is for, such as app_store_connect.
method"oauth" | "key"yesHow the Connection was obtained. oauth: an end user authorized your App, through a Connect Session or a grant you created it from. key: the brand gave you a key of its own, which you sent to POST /v1/connections; there is no App.
oauthobjectnoWhat an oauth Connection was obtained through. Present exactly when method is "oauth".
keyobjectnoWhat a key Connection holds of its key that Koil returns. Present exactly when method is "key".
clientUserIdstringnoYour own identifier for the end user the Connection belongs to.
subjectstringnoThe platform's id for the account the Connection's credential acts as: for oauth, the user who authorized (Google's sub, Facebook's user id, Instagram's user_id, TikTok's open_id); for a key, the account the platform confirmed it belongs to. LinkedIn names none, and a lookup that failed at connect time leaves it absent.
status"active" | "reauthorization_required" | "invalid"yesactive while its credential authorizes. reauthorization_required while the end user must connect again soon: an expiring credential still works until then, while a key the platform refuses (key_refused, for which Koil polls nothing and bills nothing) or will not issue a token from (renewal_failed) does not. invalid once it no longer authorizes, which is final: the end user must connect again, and Koil polls nothing for its Profiles, does not bill them, and deletes the Connection six days after it became invalid. Either way, create a Connect Session with this connectionId (or, for a key, replace it with PUT /v1/connections/{connectionId}/credential), and connection.updated announces every change. statusReason says why it is not active.
statusReason"renewal_failed" | "revoked" | "expired" | "duplicate" | "expiring" | "key_refused"noWhy the Connection is not active; absent while it is. For invalid: renewal_failed (the platform refused to renew the credential), revoked (the platform refused its token, for example because the end user removed the app), expired (the credential ran out with nothing to renew it), duplicate (the account it acts as already has another Connection under the same issuer, App where it has one, and clientUserId, which keeps its place), or key_refused (the platform still refused the key 48 hours after it first did). For reauthorization_required: expiring (the credential, or the refresh token that renews it, expires within 14 days, by credential.reauthorizeBy), or key_refused (the platform refused a key whose refusal can be a passing one, such as App Store Connect's 401: Koil asks the platform again for 48 hours, and the Connection is active again if it takes the key, or invalid if it still refuses it).
credentialobjectnoWhat the Connection's credential states of itself, wherever the Connection appears: its read, its listing and its events. Absent while Koil holds no credential for the Connection, as once it is invalid. The expiry of an access token Koil renews is Koil's concern, so it is not stated here.
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "connection.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "connectionId",
        "issuerId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "connectionId": {
          "type": "string",
          "minLength": 1
        },
        "issuerId": {
          "type": "string",
          "minLength": 1
        },
        "appId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "issuerId",
        "method",
        "status",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "connection",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil Connection identifier.",
          "minLength": 1
        },
        "issuerId": {
          "type": "string",
          "description": "The issuer the Connection's credential comes from (`GET /v1/issuers`): for `oauth`, its App's, such as `facebook` or `google`; for a key, the one the key is for, such as `app_store_connect`.",
          "minLength": 1
        },
        "method": {
          "enum": [
            "oauth",
            "key"
          ],
          "description": "How the Connection was obtained. `oauth`: an end user authorized your App, through a Connect Session or a grant you created it from. `key`: the brand gave you a key of its own, which you sent to `POST /v1/connections`; there is no App."
        },
        "oauth": {
          "type": "object",
          "required": [
            "appId"
          ],
          "properties": {
            "appId": {
              "type": "string",
              "description": "The App the Connection acts through.",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "description": "What an `oauth` Connection was obtained through. Present exactly when `method` is `\"oauth\"`."
        },
        "key": {
          "type": "object",
          "required": [
            "config"
          ],
          "properties": {
            "config": {
              "type": "object",
              "patternProperties": {
                "^.*$": {}
              },
              "description": "The key's public half, as `GET /v1/issuers` declares it (`methods.key.config`), such as the key's id; never its secret."
            }
          },
          "additionalProperties": false,
          "description": "What a `key` Connection holds of its key that Koil returns. Present exactly when `method` is `\"key\"`."
        },
        "clientUserId": {
          "type": "string",
          "description": "Your own identifier for the end user the Connection belongs to.",
          "maxLength": 255
        },
        "subject": {
          "type": "string",
          "description": "The platform's id for the account the Connection's credential acts as: for `oauth`, the user who authorized (Google's `sub`, Facebook's user id, Instagram's `user_id`, TikTok's `open_id`); for a key, the account the platform confirmed it belongs to. LinkedIn names none, and a lookup that failed at connect time leaves it absent."
        },
        "status": {
          "enum": [
            "active",
            "reauthorization_required",
            "invalid"
          ],
          "description": "`active` while its credential authorizes. `reauthorization_required` while the end user must connect again soon: an `expiring` credential still works until then, while a key the platform refuses (`key_refused`, for which Koil polls nothing and bills nothing) or will not issue a token from (`renewal_failed`) does not. `invalid` once it no longer authorizes, which is final: the end user must connect again, and Koil polls nothing for its Profiles, does not bill them, and deletes the Connection six days after it became `invalid`. Either way, create a Connect Session with this `connectionId` (or, for a key, replace it with `PUT /v1/connections/{connectionId}/credential`), and `connection.updated` announces every change. `statusReason` says why it is not `active`."
        },
        "statusReason": {
          "enum": [
            "renewal_failed",
            "revoked",
            "expired",
            "duplicate",
            "expiring",
            "key_refused"
          ],
          "description": "Why the Connection is not `active`; absent while it is. For `invalid`: `renewal_failed` (the platform refused to renew the credential), `revoked` (the platform refused its token, for example because the end user removed the app), `expired` (the credential ran out with nothing to renew it), `duplicate` (the account it acts as already has another Connection under the same issuer, App where it has one, and `clientUserId`, which keeps its place), or `key_refused` (the platform still refused the key 48 hours after it first did). For `reauthorization_required`: `expiring` (the credential, or the refresh token that renews it, expires within 14 days, by `credential.reauthorizeBy`), or `key_refused` (the platform refused a key whose refusal can be a passing one, such as App Store Connect's 401: Koil asks the platform again for 48 hours, and the Connection is `active` again if it takes the key, or `invalid` if it still refuses it)."
        },
        "credential": {
          "type": "object",
          "properties": {
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The scopes the credential holds, as Koil stores them. Absent when Koil does not know them, which is not a credential of none."
            },
            "reauthorizeBy": {
              "type": "string",
              "format": "date-time",
              "description": "When the credential stops working unless its end user authorizes again. Where Koil can renew the credential, it is the platform's deadline for renewing it: TikTok's and LinkedIn's refresh tokens expire about a year after authorization. Where nothing renews it (a LinkedIn grant without a refresh token), it is the access token's own expiry. Once a refresh token's deadline has passed, it stays that deadline, or the access token's expiry where that is earlier: it never moves later. Koil makes the Connection `reauthorization_required` 14 days ahead of it; send the end user through a Connect Session with this `connectionId` before then. Absent when nothing but a revocation ends the credential (a key, which issues its own tokens), or while Koil does not know the date: a grant created without `refreshTokenExpiresAt`, until a renewal states it."
            }
          },
          "additionalProperties": false,
          "description": "What the Connection's credential states of itself, wherever the Connection appears: its read, its listing and its events. Absent while Koil holds no credential for the Connection, as once it is `invalid`. The expiry of an access token Koil renews is Koil's concern, so it is not stated here."
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

connection.updated

A connection's status or statusReason changed, or its end user authorized the App again in place. data is the connection as the change left it. A status other than active means the end user must authorize again: create a Connect Session with this connectionId and send them to its url. reauthorization_required (statusReason expiring) means the credential still works but will stop within 14 days, by credential.reauthorizeBy; with key_refused, the platform refused the key and Koil asks it again for 48 hours before the connection is invalid; invalid means it has stopped, for good (renewal_failed: the platform refused to renew it; revoked: the platform refused its token; expired: it ran out with nothing to renew it; key_refused: the platform still refused the key 48 hours on). A reauthorization keeps the connection's id and its profiles, and returns it to active. A connection still invalid six days later is deleted, since the failure may be a revocation.

data is the resource exactly as GET /v1/connections/{connectionId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
connectionIdstringyes
issuerIdstringyes
appIdstringno

data

FieldTypeRequiredDescription
kind"connection"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil Connection identifier.
issuerIdstringyesThe issuer the Connection's credential comes from (GET /v1/issuers): for oauth, its App's, such as facebook or google; for a key, the one the key is for, such as app_store_connect.
method"oauth" | "key"yesHow the Connection was obtained. oauth: an end user authorized your App, through a Connect Session or a grant you created it from. key: the brand gave you a key of its own, which you sent to POST /v1/connections; there is no App.
oauthobjectnoWhat an oauth Connection was obtained through. Present exactly when method is "oauth".
keyobjectnoWhat a key Connection holds of its key that Koil returns. Present exactly when method is "key".
clientUserIdstringnoYour own identifier for the end user the Connection belongs to.
subjectstringnoThe platform's id for the account the Connection's credential acts as: for oauth, the user who authorized (Google's sub, Facebook's user id, Instagram's user_id, TikTok's open_id); for a key, the account the platform confirmed it belongs to. LinkedIn names none, and a lookup that failed at connect time leaves it absent.
status"active" | "reauthorization_required" | "invalid"yesactive while its credential authorizes. reauthorization_required while the end user must connect again soon: an expiring credential still works until then, while a key the platform refuses (key_refused, for which Koil polls nothing and bills nothing) or will not issue a token from (renewal_failed) does not. invalid once it no longer authorizes, which is final: the end user must connect again, and Koil polls nothing for its Profiles, does not bill them, and deletes the Connection six days after it became invalid. Either way, create a Connect Session with this connectionId (or, for a key, replace it with PUT /v1/connections/{connectionId}/credential), and connection.updated announces every change. statusReason says why it is not active.
statusReason"renewal_failed" | "revoked" | "expired" | "duplicate" | "expiring" | "key_refused"noWhy the Connection is not active; absent while it is. For invalid: renewal_failed (the platform refused to renew the credential), revoked (the platform refused its token, for example because the end user removed the app), expired (the credential ran out with nothing to renew it), duplicate (the account it acts as already has another Connection under the same issuer, App where it has one, and clientUserId, which keeps its place), or key_refused (the platform still refused the key 48 hours after it first did). For reauthorization_required: expiring (the credential, or the refresh token that renews it, expires within 14 days, by credential.reauthorizeBy), or key_refused (the platform refused a key whose refusal can be a passing one, such as App Store Connect's 401: Koil asks the platform again for 48 hours, and the Connection is active again if it takes the key, or invalid if it still refuses it).
credentialobjectnoWhat the Connection's credential states of itself, wherever the Connection appears: its read, its listing and its events. Absent while Koil holds no credential for the Connection, as once it is invalid. The expiry of an access token Koil renews is Koil's concern, so it is not stated here.
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "connection.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "connectionId",
        "issuerId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "connectionId": {
          "type": "string",
          "minLength": 1
        },
        "issuerId": {
          "type": "string",
          "minLength": 1
        },
        "appId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "issuerId",
        "method",
        "status",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "connection",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil Connection identifier.",
          "minLength": 1
        },
        "issuerId": {
          "type": "string",
          "description": "The issuer the Connection's credential comes from (`GET /v1/issuers`): for `oauth`, its App's, such as `facebook` or `google`; for a key, the one the key is for, such as `app_store_connect`.",
          "minLength": 1
        },
        "method": {
          "enum": [
            "oauth",
            "key"
          ],
          "description": "How the Connection was obtained. `oauth`: an end user authorized your App, through a Connect Session or a grant you created it from. `key`: the brand gave you a key of its own, which you sent to `POST /v1/connections`; there is no App."
        },
        "oauth": {
          "type": "object",
          "required": [
            "appId"
          ],
          "properties": {
            "appId": {
              "type": "string",
              "description": "The App the Connection acts through.",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "description": "What an `oauth` Connection was obtained through. Present exactly when `method` is `\"oauth\"`."
        },
        "key": {
          "type": "object",
          "required": [
            "config"
          ],
          "properties": {
            "config": {
              "type": "object",
              "patternProperties": {
                "^.*$": {}
              },
              "description": "The key's public half, as `GET /v1/issuers` declares it (`methods.key.config`), such as the key's id; never its secret."
            }
          },
          "additionalProperties": false,
          "description": "What a `key` Connection holds of its key that Koil returns. Present exactly when `method` is `\"key\"`."
        },
        "clientUserId": {
          "type": "string",
          "description": "Your own identifier for the end user the Connection belongs to.",
          "maxLength": 255
        },
        "subject": {
          "type": "string",
          "description": "The platform's id for the account the Connection's credential acts as: for `oauth`, the user who authorized (Google's `sub`, Facebook's user id, Instagram's `user_id`, TikTok's `open_id`); for a key, the account the platform confirmed it belongs to. LinkedIn names none, and a lookup that failed at connect time leaves it absent."
        },
        "status": {
          "enum": [
            "active",
            "reauthorization_required",
            "invalid"
          ],
          "description": "`active` while its credential authorizes. `reauthorization_required` while the end user must connect again soon: an `expiring` credential still works until then, while a key the platform refuses (`key_refused`, for which Koil polls nothing and bills nothing) or will not issue a token from (`renewal_failed`) does not. `invalid` once it no longer authorizes, which is final: the end user must connect again, and Koil polls nothing for its Profiles, does not bill them, and deletes the Connection six days after it became `invalid`. Either way, create a Connect Session with this `connectionId` (or, for a key, replace it with `PUT /v1/connections/{connectionId}/credential`), and `connection.updated` announces every change. `statusReason` says why it is not `active`."
        },
        "statusReason": {
          "enum": [
            "renewal_failed",
            "revoked",
            "expired",
            "duplicate",
            "expiring",
            "key_refused"
          ],
          "description": "Why the Connection is not `active`; absent while it is. For `invalid`: `renewal_failed` (the platform refused to renew the credential), `revoked` (the platform refused its token, for example because the end user removed the app), `expired` (the credential ran out with nothing to renew it), `duplicate` (the account it acts as already has another Connection under the same issuer, App where it has one, and `clientUserId`, which keeps its place), or `key_refused` (the platform still refused the key 48 hours after it first did). For `reauthorization_required`: `expiring` (the credential, or the refresh token that renews it, expires within 14 days, by `credential.reauthorizeBy`), or `key_refused` (the platform refused a key whose refusal can be a passing one, such as App Store Connect's 401: Koil asks the platform again for 48 hours, and the Connection is `active` again if it takes the key, or `invalid` if it still refuses it)."
        },
        "credential": {
          "type": "object",
          "properties": {
            "scopes": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The scopes the credential holds, as Koil stores them. Absent when Koil does not know them, which is not a credential of none."
            },
            "reauthorizeBy": {
              "type": "string",
              "format": "date-time",
              "description": "When the credential stops working unless its end user authorizes again. Where Koil can renew the credential, it is the platform's deadline for renewing it: TikTok's and LinkedIn's refresh tokens expire about a year after authorization. Where nothing renews it (a LinkedIn grant without a refresh token), it is the access token's own expiry. Once a refresh token's deadline has passed, it stays that deadline, or the access token's expiry where that is earlier: it never moves later. Koil makes the Connection `reauthorization_required` 14 days ahead of it; send the end user through a Connect Session with this `connectionId` before then. Absent when nothing but a revocation ends the credential (a key, which issues its own tokens), or while Koil does not know the date: a grant created without `refreshTokenExpiresAt`, until a renewal states it."
            }
          },
          "additionalProperties": false,
          "description": "What the Connection's credential states of itself, wherever the Connection appears: its read, its listing and its events. Absent while Koil holds no credential for the Connection, as once it is `invalid`. The expiry of an access token Koil renews is Koil's concern, so it is not stated here."
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Profile

profile.created

A profile was created.

data is the resource exactly as GET /v1/profiles/{profileId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyes
platformIdstringyes

data

FieldTypeRequiredDescription
kind"profile"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil Profile identifier.
platformIdstringyesKoil platform identifier.
connectionIdstringyesKoil Connection identifier.
platformProfileExternalIdstringyes
status"active" | "invalid"yesactive while Koil can act for the profile. invalid once the platform no longer lets the Connection act for it, though the Connection itself still authorizes: the end user lost their role on the Page, or the Page is gone. Once the end user has access again, create a Connect Session with the profile's connectionId; the profile returns to active when Koil can act for it again. profile.updated announces every change. While invalid, or while its Connection is, Koil polls nothing for it, refuses operations through it, and does not bill it; one still invalid six days after it became so is deleted. A profile whose Connection is not active keeps its own status; check the Connection's too.
statusReason"revoked" | "mint_failed"noWhy the profile is not active; absent while it is. revoked: the platform refused the credential Koil acts for the profile with, and would not issue a new one. mint_failed: the platform refused that credential, and minting a new one has kept failing for a day.
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "profile.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "platformId",
        "connectionId",
        "platformProfileExternalId",
        "status",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "profile",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil Profile identifier.",
          "minLength": 1
        },
        "platformId": {
          "type": "string",
          "description": "Koil platform identifier.",
          "minLength": 1
        },
        "connectionId": {
          "type": "string",
          "description": "Koil Connection identifier.",
          "minLength": 1
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "active",
            "invalid"
          ],
          "description": "`active` while Koil can act for the profile. `invalid` once the platform no longer lets the Connection act for it, though the Connection itself still authorizes: the end user lost their role on the Page, or the Page is gone. Once the end user has access again, create a Connect Session with the profile's `connectionId`; the profile returns to `active` when Koil can act for it again. `profile.updated` announces every change. While `invalid`, or while its Connection is, Koil polls nothing for it, refuses operations through it, and does not bill it; one still `invalid` six days after it became so is deleted. A profile whose Connection is not `active` keeps its own status; check the Connection's too."
        },
        "statusReason": {
          "enum": [
            "revoked",
            "mint_failed"
          ],
          "description": "Why the profile is not `active`; absent while it is. `revoked`: the platform refused the credential Koil acts for the profile with, and would not issue a new one. `mint_failed`: the platform refused that credential, and minting a new one has kept failing for a day."
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

profile.deleted

A profile was deleted. data is the profile as it last stood.

data is the resource exactly as GET /v1/profiles/{profileId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyes
platformIdstringyes

data

FieldTypeRequiredDescription
kind"profile"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil Profile identifier.
platformIdstringyesKoil platform identifier.
connectionIdstringyesKoil Connection identifier.
platformProfileExternalIdstringyes
status"active" | "invalid"yesactive while Koil can act for the profile. invalid once the platform no longer lets the Connection act for it, though the Connection itself still authorizes: the end user lost their role on the Page, or the Page is gone. Once the end user has access again, create a Connect Session with the profile's connectionId; the profile returns to active when Koil can act for it again. profile.updated announces every change. While invalid, or while its Connection is, Koil polls nothing for it, refuses operations through it, and does not bill it; one still invalid six days after it became so is deleted. A profile whose Connection is not active keeps its own status; check the Connection's too.
statusReason"revoked" | "mint_failed"noWhy the profile is not active; absent while it is. revoked: the platform refused the credential Koil acts for the profile with, and would not issue a new one. mint_failed: the platform refused that credential, and minting a new one has kept failing for a day.
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "profile.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "platformId",
        "connectionId",
        "platformProfileExternalId",
        "status",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "profile",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil Profile identifier.",
          "minLength": 1
        },
        "platformId": {
          "type": "string",
          "description": "Koil platform identifier.",
          "minLength": 1
        },
        "connectionId": {
          "type": "string",
          "description": "Koil Connection identifier.",
          "minLength": 1
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "active",
            "invalid"
          ],
          "description": "`active` while Koil can act for the profile. `invalid` once the platform no longer lets the Connection act for it, though the Connection itself still authorizes: the end user lost their role on the Page, or the Page is gone. Once the end user has access again, create a Connect Session with the profile's `connectionId`; the profile returns to `active` when Koil can act for it again. `profile.updated` announces every change. While `invalid`, or while its Connection is, Koil polls nothing for it, refuses operations through it, and does not bill it; one still `invalid` six days after it became so is deleted. A profile whose Connection is not `active` keeps its own status; check the Connection's too."
        },
        "statusReason": {
          "enum": [
            "revoked",
            "mint_failed"
          ],
          "description": "Why the profile is not `active`; absent while it is. `revoked`: the platform refused the credential Koil acts for the profile with, and would not issue a new one. `mint_failed`: the platform refused that credential, and minting a new one has kept failing for a day."
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

profile.updated

A profile's status or statusReason changed. data is the profile as the change left it. invalid (statusReason revoked) means the platform no longer lets the profile's Connection act for it, though the Connection still authorizes: the end user lost their role on the Page, or the Page is gone. Once they have access again, create a Connect Session with the profile's connectionId; the profile returns to active when Koil can act for it again.

data is the resource exactly as GET /v1/profiles/{profileId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyes
platformIdstringyes

data

FieldTypeRequiredDescription
kind"profile"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil Profile identifier.
platformIdstringyesKoil platform identifier.
connectionIdstringyesKoil Connection identifier.
platformProfileExternalIdstringyes
status"active" | "invalid"yesactive while Koil can act for the profile. invalid once the platform no longer lets the Connection act for it, though the Connection itself still authorizes: the end user lost their role on the Page, or the Page is gone. Once the end user has access again, create a Connect Session with the profile's connectionId; the profile returns to active when Koil can act for it again. profile.updated announces every change. While invalid, or while its Connection is, Koil polls nothing for it, refuses operations through it, and does not bill it; one still invalid six days after it became so is deleted. A profile whose Connection is not active keeps its own status; check the Connection's too.
statusReason"revoked" | "mint_failed"noWhy the profile is not active; absent while it is. revoked: the platform refused the credential Koil acts for the profile with, and would not issue a new one. mint_failed: the platform refused that credential, and minting a new one has kept failing for a day.
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "profile.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "platformId",
        "connectionId",
        "platformProfileExternalId",
        "status",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "profile",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil Profile identifier.",
          "minLength": 1
        },
        "platformId": {
          "type": "string",
          "description": "Koil platform identifier.",
          "minLength": 1
        },
        "connectionId": {
          "type": "string",
          "description": "Koil Connection identifier.",
          "minLength": 1
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "active",
            "invalid"
          ],
          "description": "`active` while Koil can act for the profile. `invalid` once the platform no longer lets the Connection act for it, though the Connection itself still authorizes: the end user lost their role on the Page, or the Page is gone. Once the end user has access again, create a Connect Session with the profile's `connectionId`; the profile returns to `active` when Koil can act for it again. `profile.updated` announces every change. While `invalid`, or while its Connection is, Koil polls nothing for it, refuses operations through it, and does not bill it; one still `invalid` six days after it became so is deleted. A profile whose Connection is not `active` keeps its own status; check the Connection's too."
        },
        "statusReason": {
          "enum": [
            "revoked",
            "mint_failed"
          ],
          "description": "Why the profile is not `active`; absent while it is. `revoked`: the platform refused the credential Koil acts for the profile with, and would not issue a new one. `mint_failed`: the platform refused that credential, and minting a new one has kept failing for a day."
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Media

media.process_failed

Media processing failed; the media cannot be published.

data is the resource exactly as GET /v1/media/{mediaId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
mediaIdstringyes

data

FieldTypeRequiredDescription
kind"media"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "uploaded" | "processing" | "ready" | "failed"yes
origin"upload" | "source_url"yes
contentTypestringnoThe MIME type. Once the media is ready it is the one Koil read from the file's bytes: image/*, video/*, audio/*, or a document's (application/pdf, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared.
sizeBytesintegerno
widthintegernoWidth in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
heightintegernoHeight in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
formatstringnoAn image's format (jpeg, png, gif, or webp), a video's container as ffprobe names it, a comma-separated list of the formats it matches (mov,mp4,m4a,3gp,3g2,mj2), or an audio file's or document's MIME type. Absent until the media is ready.
durationSecondsnumbernoA video's duration in seconds. Absent for an image, and until the media is ready.
videoCodecstringnoA video's codec as ffprobe names it (h264, hevc, vp9, av1). Absent for an image, and until the media is ready.
frameRatenumbernoA video's frame rate in frames per second, rounded to three decimals (29.97). Absent for an image, when the video does not report one, and until the media is ready.
sourceUrlstring (uri)no
errorobjectno
previewUrlstring (uri)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "media.process_failed"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "mediaId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "mediaId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "origin",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "media",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "uploaded",
            "processing",
            "ready",
            "failed"
          ]
        },
        "origin": {
          "enum": [
            "upload",
            "source_url"
          ]
        },
        "contentType": {
          "type": "string",
          "minLength": 1,
          "description": "The MIME type. Once the media is `ready` it is the one Koil read from the file's bytes: `image/*`, `video/*`, `audio/*`, or a document's (`application/pdf`, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared."
        },
        "sizeBytes": {
          "type": "integer",
          "minimum": 0
        },
        "width": {
          "type": "integer",
          "minimum": 0,
          "description": "Width in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "height": {
          "type": "integer",
          "minimum": 0,
          "description": "Height in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "format": {
          "type": "string",
          "minLength": 1,
          "description": "An image's format (`jpeg`, `png`, `gif`, or `webp`), a video's container as ffprobe names it, a comma-separated list of the formats it matches (`mov,mp4,m4a,3gp,3g2,mj2`), or an audio file's or document's MIME type. Absent until the media is `ready`."
        },
        "durationSeconds": {
          "type": "number",
          "minimum": 0,
          "description": "A video's duration in seconds. Absent for an image, and until the media is `ready`."
        },
        "videoCodec": {
          "type": "string",
          "minLength": 1,
          "description": "A video's codec as ffprobe names it (`h264`, `hevc`, `vp9`, `av1`). Absent for an image, and until the media is `ready`."
        },
        "frameRate": {
          "type": "number",
          "minimum": 0,
          "description": "A video's frame rate in frames per second, rounded to three decimals (`29.97`). Absent for an image, when the video does not report one, and until the media is `ready`."
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "previewUrl": {
          "type": "string",
          "format": "uri"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

media.processed

Media was verified and copied to originals; the preview URL is now usable and it is ready to publish.

data is the resource exactly as GET /v1/media/{mediaId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
mediaIdstringyes

data

FieldTypeRequiredDescription
kind"media"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "uploaded" | "processing" | "ready" | "failed"yes
origin"upload" | "source_url"yes
contentTypestringnoThe MIME type. Once the media is ready it is the one Koil read from the file's bytes: image/*, video/*, audio/*, or a document's (application/pdf, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared.
sizeBytesintegerno
widthintegernoWidth in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
heightintegernoHeight in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
formatstringnoAn image's format (jpeg, png, gif, or webp), a video's container as ffprobe names it, a comma-separated list of the formats it matches (mov,mp4,m4a,3gp,3g2,mj2), or an audio file's or document's MIME type. Absent until the media is ready.
durationSecondsnumbernoA video's duration in seconds. Absent for an image, and until the media is ready.
videoCodecstringnoA video's codec as ffprobe names it (h264, hevc, vp9, av1). Absent for an image, and until the media is ready.
frameRatenumbernoA video's frame rate in frames per second, rounded to three decimals (29.97). Absent for an image, when the video does not report one, and until the media is ready.
sourceUrlstring (uri)no
errorobjectno
previewUrlstring (uri)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "media.processed"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "mediaId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "mediaId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "origin",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "media",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "uploaded",
            "processing",
            "ready",
            "failed"
          ]
        },
        "origin": {
          "enum": [
            "upload",
            "source_url"
          ]
        },
        "contentType": {
          "type": "string",
          "minLength": 1,
          "description": "The MIME type. Once the media is `ready` it is the one Koil read from the file's bytes: `image/*`, `video/*`, `audio/*`, or a document's (`application/pdf`, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared."
        },
        "sizeBytes": {
          "type": "integer",
          "minimum": 0
        },
        "width": {
          "type": "integer",
          "minimum": 0,
          "description": "Width in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "height": {
          "type": "integer",
          "minimum": 0,
          "description": "Height in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "format": {
          "type": "string",
          "minLength": 1,
          "description": "An image's format (`jpeg`, `png`, `gif`, or `webp`), a video's container as ffprobe names it, a comma-separated list of the formats it matches (`mov,mp4,m4a,3gp,3g2,mj2`), or an audio file's or document's MIME type. Absent until the media is `ready`."
        },
        "durationSeconds": {
          "type": "number",
          "minimum": 0,
          "description": "A video's duration in seconds. Absent for an image, and until the media is `ready`."
        },
        "videoCodec": {
          "type": "string",
          "minLength": 1,
          "description": "A video's codec as ffprobe names it (`h264`, `hevc`, `vp9`, `av1`). Absent for an image, and until the media is `ready`."
        },
        "frameRate": {
          "type": "number",
          "minimum": 0,
          "description": "A video's frame rate in frames per second, rounded to three decimals (`29.97`). Absent for an image, when the video does not report one, and until the media is `ready`."
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "previewUrl": {
          "type": "string",
          "format": "uri"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

media.upload_failed

A media upload never arrived or failed verification.

data is the resource exactly as GET /v1/media/{mediaId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
mediaIdstringyes

data

FieldTypeRequiredDescription
kind"media"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "uploaded" | "processing" | "ready" | "failed"yes
origin"upload" | "source_url"yes
contentTypestringnoThe MIME type. Once the media is ready it is the one Koil read from the file's bytes: image/*, video/*, audio/*, or a document's (application/pdf, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared.
sizeBytesintegerno
widthintegernoWidth in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
heightintegernoHeight in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
formatstringnoAn image's format (jpeg, png, gif, or webp), a video's container as ffprobe names it, a comma-separated list of the formats it matches (mov,mp4,m4a,3gp,3g2,mj2), or an audio file's or document's MIME type. Absent until the media is ready.
durationSecondsnumbernoA video's duration in seconds. Absent for an image, and until the media is ready.
videoCodecstringnoA video's codec as ffprobe names it (h264, hevc, vp9, av1). Absent for an image, and until the media is ready.
frameRatenumbernoA video's frame rate in frames per second, rounded to three decimals (29.97). Absent for an image, when the video does not report one, and until the media is ready.
sourceUrlstring (uri)no
errorobjectno
previewUrlstring (uri)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "media.upload_failed"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "mediaId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "mediaId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "origin",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "media",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "uploaded",
            "processing",
            "ready",
            "failed"
          ]
        },
        "origin": {
          "enum": [
            "upload",
            "source_url"
          ]
        },
        "contentType": {
          "type": "string",
          "minLength": 1,
          "description": "The MIME type. Once the media is `ready` it is the one Koil read from the file's bytes: `image/*`, `video/*`, `audio/*`, or a document's (`application/pdf`, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared."
        },
        "sizeBytes": {
          "type": "integer",
          "minimum": 0
        },
        "width": {
          "type": "integer",
          "minimum": 0,
          "description": "Width in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "height": {
          "type": "integer",
          "minimum": 0,
          "description": "Height in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "format": {
          "type": "string",
          "minLength": 1,
          "description": "An image's format (`jpeg`, `png`, `gif`, or `webp`), a video's container as ffprobe names it, a comma-separated list of the formats it matches (`mov,mp4,m4a,3gp,3g2,mj2`), or an audio file's or document's MIME type. Absent until the media is `ready`."
        },
        "durationSeconds": {
          "type": "number",
          "minimum": 0,
          "description": "A video's duration in seconds. Absent for an image, and until the media is `ready`."
        },
        "videoCodec": {
          "type": "string",
          "minLength": 1,
          "description": "A video's codec as ffprobe names it (`h264`, `hevc`, `vp9`, `av1`). Absent for an image, and until the media is `ready`."
        },
        "frameRate": {
          "type": "number",
          "minimum": 0,
          "description": "A video's frame rate in frames per second, rounded to three decimals (`29.97`). Absent for an image, when the video does not report one, and until the media is `ready`."
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "previewUrl": {
          "type": "string",
          "format": "uri"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

media.uploaded

Media bytes landed in the uploads bucket and were accepted.

data is the resource exactly as GET /v1/media/{mediaId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
mediaIdstringyes

data

FieldTypeRequiredDescription
kind"media"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "uploaded" | "processing" | "ready" | "failed"yes
origin"upload" | "source_url"yes
contentTypestringnoThe MIME type. Once the media is ready it is the one Koil read from the file's bytes: image/*, video/*, audio/*, or a document's (application/pdf, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared.
sizeBytesintegerno
widthintegernoWidth in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
heightintegernoHeight in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is ready.
formatstringnoAn image's format (jpeg, png, gif, or webp), a video's container as ffprobe names it, a comma-separated list of the formats it matches (mov,mp4,m4a,3gp,3g2,mj2), or an audio file's or document's MIME type. Absent until the media is ready.
durationSecondsnumbernoA video's duration in seconds. Absent for an image, and until the media is ready.
videoCodecstringnoA video's codec as ffprobe names it (h264, hevc, vp9, av1). Absent for an image, and until the media is ready.
frameRatenumbernoA video's frame rate in frames per second, rounded to three decimals (29.97). Absent for an image, when the video does not report one, and until the media is ready.
sourceUrlstring (uri)no
errorobjectno
previewUrlstring (uri)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "media.uploaded"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "mediaId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "mediaId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "origin",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "media",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "uploaded",
            "processing",
            "ready",
            "failed"
          ]
        },
        "origin": {
          "enum": [
            "upload",
            "source_url"
          ]
        },
        "contentType": {
          "type": "string",
          "minLength": 1,
          "description": "The MIME type. Once the media is `ready` it is the one Koil read from the file's bytes: `image/*`, `video/*`, `audio/*`, or a document's (`application/pdf`, or the Office type the create declared when the bytes are an Office file); before that, it is only what the create declared."
        },
        "sizeBytes": {
          "type": "integer",
          "minimum": 0
        },
        "width": {
          "type": "integer",
          "minimum": 0,
          "description": "Width in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "height": {
          "type": "integer",
          "minimum": 0,
          "description": "Height in pixels as displayed: an image's EXIF orientation and a video's rotation are applied. Absent until the media is `ready`."
        },
        "format": {
          "type": "string",
          "minLength": 1,
          "description": "An image's format (`jpeg`, `png`, `gif`, or `webp`), a video's container as ffprobe names it, a comma-separated list of the formats it matches (`mov,mp4,m4a,3gp,3g2,mj2`), or an audio file's or document's MIME type. Absent until the media is `ready`."
        },
        "durationSeconds": {
          "type": "number",
          "minimum": 0,
          "description": "A video's duration in seconds. Absent for an image, and until the media is `ready`."
        },
        "videoCodec": {
          "type": "string",
          "minLength": 1,
          "description": "A video's codec as ffprobe names it (`h264`, `hevc`, `vp9`, `av1`). Absent for an image, and until the media is `ready`."
        },
        "frameRate": {
          "type": "number",
          "minimum": 0,
          "description": "A video's frame rate in frames per second, rounded to three decimals (`29.97`). Absent for an image, when the video does not report one, and until the media is `ready`."
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "previewUrl": {
          "type": "string",
          "format": "uri"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Backfill request

backfill_request.completed

A backfill request finished with nothing more to read inside its window: the platform's history ran out (stopReason: exhausted) or the run reached since (reached_since). Every content.* event it emits has been published, though deliveries are not ordered, so some may arrive after this one.

data is the resource exactly as GET /v1/backfill-requests/{backfillRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
backfillRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"backfill_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil backfill request identifier.
profileIdstringyesKoil Profile identifier.
collectionstringyes
sincestring (date-time)no
maxItemsintegeryes
status"pending" | "running" | "completed" | "partial" | "failed"yes
stopReason"exhausted" | "reached_since" | "capped"no
emittedintegeryes
fetchedintegeryes
skippedintegeryes
oldestEmittedAtstring (date-time)no
errorobjectno
startedAtstring (date-time)no
completedAtstring (date-time)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "backfill_request.completed"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "backfillRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "backfillRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "profileId",
        "collection",
        "maxItems",
        "status",
        "emitted",
        "fetched",
        "skipped",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "backfill_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil backfill request identifier.",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "description": "Koil Profile identifier.",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "since": {
          "type": "string",
          "format": "date-time"
        },
        "maxItems": {
          "type": "integer"
        },
        "status": {
          "enum": [
            "pending",
            "running",
            "completed",
            "partial",
            "failed"
          ]
        },
        "stopReason": {
          "enum": [
            "exhausted",
            "reached_since",
            "capped"
          ]
        },
        "emitted": {
          "type": "integer"
        },
        "fetched": {
          "type": "integer"
        },
        "skipped": {
          "type": "integer"
        },
        "oldestEmittedAt": {
          "type": "string",
          "format": "date-time"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

backfill_request.failed

A backfill request stopped on an error (error). The events it emitted before failing stay published; a new request re-sends them with the same ids.

data is the resource exactly as GET /v1/backfill-requests/{backfillRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
backfillRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"backfill_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil backfill request identifier.
profileIdstringyesKoil Profile identifier.
collectionstringyes
sincestring (date-time)no
maxItemsintegeryes
status"pending" | "running" | "completed" | "partial" | "failed"yes
stopReason"exhausted" | "reached_since" | "capped"no
emittedintegeryes
fetchedintegeryes
skippedintegeryes
oldestEmittedAtstring (date-time)no
errorobjectno
startedAtstring (date-time)no
completedAtstring (date-time)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "backfill_request.failed"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "backfillRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "backfillRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "profileId",
        "collection",
        "maxItems",
        "status",
        "emitted",
        "fetched",
        "skipped",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "backfill_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil backfill request identifier.",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "description": "Koil Profile identifier.",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "since": {
          "type": "string",
          "format": "date-time"
        },
        "maxItems": {
          "type": "integer"
        },
        "status": {
          "enum": [
            "pending",
            "running",
            "completed",
            "partial",
            "failed"
          ]
        },
        "stopReason": {
          "enum": [
            "exhausted",
            "reached_since",
            "capped"
          ]
        },
        "emitted": {
          "type": "integer"
        },
        "fetched": {
          "type": "integer"
        },
        "skipped": {
          "type": "integer"
        },
        "oldestEmittedAt": {
          "type": "string",
          "format": "date-time"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

backfill_request.partial

A backfill request spent maxItems with history left unread (stopReason: capped). oldestEmittedAt is how far back it reached.

data is the resource exactly as GET /v1/backfill-requests/{backfillRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
backfillRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"backfill_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesKoil backfill request identifier.
profileIdstringyesKoil Profile identifier.
collectionstringyes
sincestring (date-time)no
maxItemsintegeryes
status"pending" | "running" | "completed" | "partial" | "failed"yes
stopReason"exhausted" | "reached_since" | "capped"no
emittedintegeryes
fetchedintegeryes
skippedintegeryes
oldestEmittedAtstring (date-time)no
errorobjectno
startedAtstring (date-time)no
completedAtstring (date-time)no
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "backfill_request.partial"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "backfillRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "backfillRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "profileId",
        "collection",
        "maxItems",
        "status",
        "emitted",
        "fetched",
        "skipped",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "backfill_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Koil backfill request identifier.",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "description": "Koil Profile identifier.",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "since": {
          "type": "string",
          "format": "date-time"
        },
        "maxItems": {
          "type": "integer"
        },
        "status": {
          "enum": [
            "pending",
            "running",
            "completed",
            "partial",
            "failed"
          ]
        },
        "stopReason": {
          "enum": [
            "exhausted",
            "reached_since",
            "capped"
          ]
        },
        "emitted": {
          "type": "integer"
        },
        "fetched": {
          "type": "integer"
        },
        "skipped": {
          "type": "integer"
        },
        "oldestEmittedAt": {
          "type": "string",
          "format": "date-time"
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Event destination

event_destination.disabled

Koil disabled an event destination. Koil doesn't disable a destination because its deliveries fail, and a destination disabled through the API doesn't emit this event. The disabled destination will not receive this event; subscribe a separate, healthy destination to event_destination.disabled to be notified.

data is the resource exactly as GET /v1/event-destinations/{eventDestinationId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
eventDestinationIdstringyes

data

FieldTypeRequiredDescription
kind"event_destination"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyesEvent Destination identifier.
type"webhook" | "aws_sqs" | "aws_eventbridge" | "aws_kinesis" | "aws_s3" | "azure_servicebus" | "cloudflare_queues" | "gcp_pubsub" | "hookdeck" | "kafka" | "rabbitmq"yesThe transport, which decides what config and credentials take.
topicsstring[]yes
apiVersionstringyesThe API version of the events this destination receives: the Koil-Version it was created with. It never changes; to move to a newer version, create a new destination.
scopeobject | objectno
configRecord<string, unknown>yesThe transport's settings.
enabledbooleanno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "event_destination.disabled"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "eventDestinationId"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "eventDestinationId": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "type",
        "topics",
        "apiVersion",
        "config",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "event_destination",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "description": "Event Destination identifier.",
          "minLength": 1
        },
        "type": {
          "enum": [
            "webhook",
            "aws_sqs",
            "aws_eventbridge",
            "aws_kinesis",
            "aws_s3",
            "azure_servicebus",
            "cloudflare_queues",
            "gcp_pubsub",
            "hookdeck",
            "kafka",
            "rabbitmq"
          ],
          "description": "The transport, which decides what `config` and `credentials` take."
        },
        "topics": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "apiVersion": {
          "type": "string",
          "description": "The API version of the events this destination receives: the `Koil-Version` it was created with. It never changes; to move to a newer version, create a new destination.",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "scope": {
          "anyOf": [
            {
              "type": "object",
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "const": "organization"
                }
              },
              "additionalProperties": false
            },
            {
              "type": "object",
              "required": [
                "type",
                "profileIds"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "const": "profiles"
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  },
                  "minItems": 1
                }
              },
              "additionalProperties": false
            }
          ]
        },
        "config": {
          "type": "object",
          "patternProperties": {
            "^.*$": {}
          },
          "description": "The transport's settings."
        },
        "enabled": {
          "type": "boolean"
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Publish request

publish_request.cancelled

A publish request was cancelled before publishing.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.cancelled"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

publish_request.created

A publish request entered the ledger.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

publish_request.failed

A publish request failed and will not be retried.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.failed"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

publish_request.outcome_unknown

The call that creates the content failed ambiguously, so the platform may have published it; Koil will not retry it. Check the platform before submitting again.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.outcome_unknown"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

publish_request.scheduled

A publish request was scheduled for a future time.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.scheduled"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

publish_request.started

A publish request began publishing to the platform.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.started"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

publish_request.succeeded

A publish request was published successfully.

data is the resource exactly as GET /v1/publish-requests/{publishRequestId} returns it — the same schema.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
publishRequestIdstringyes
profileIdstringyes
collectionstringyes

data

FieldTypeRequiredDescription
kind"publish_request"yesThe kind of resource this is.
mode"live" | "sandbox"yesWhich mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's.
idstringyes
status"created" | "scheduled" | "cancelled" | "started" | "succeeded" | "failed" | "outcome_unknown"yesoutcome_unknown: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice.
collectionstringyes
variantstringno
profileIdstringyes
scheduledAtstring (date-time)noWhen Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now.
externalIdstringno
errorobjectno
metadataRecord<string, string>yesYour own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to "" is removed.
createdAtstring (date-time)yes
updatedAtstring (date-time)yes
startedAtstring (date-time)no
succeededAtstring (date-time)no
failedAtstring (date-time)no
cancelledAtstring (date-time)no
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "publish_request.succeeded"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "publishRequestId",
        "profileId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "publishRequestId": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "kind",
        "mode",
        "id",
        "status",
        "collection",
        "profileId",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "const": "publish_request",
          "description": "The kind of resource this is."
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode the resource belongs to. Live and sandbox resources are separate: a key reads and writes only its own mode's."
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "created",
            "scheduled",
            "cancelled",
            "started",
            "succeeded",
            "failed",
            "outcome_unknown"
          ],
          "description": "`outcome_unknown`: The call that creates the content failed ambiguously (a timeout, a dropped connection, a platform 5xx), so the platform may have published it. Koil does not retry it. Check the platform before submitting again, or the content may be published twice."
        },
        "collection": {
          "type": "string",
          "minLength": 1
        },
        "variant": {
          "type": "string",
          "minLength": 1
        },
        "profileId": {
          "type": "string",
          "minLength": 1
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "When Koil runs the publish, as an RFC 3339 date-time. On a submission it must be in the future and at most 365 days ahead; omit it to publish now."
        },
        "externalId": {
          "type": "string",
          "minLength": 1
        },
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "meta"
          ],
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "validation_error",
                "not_supported",
                "unauthorized",
                "quota_exceeded",
                "permission_denied",
                "scope_insufficient",
                "connection_invalid",
                "not_found",
                "conflict",
                "rate_limit_exceeded",
                "platform_rate_limit",
                "internal",
                "service_unavailable"
              ],
              "description": "Stable error code. `validation_error` (400), `not_supported` (400), `unauthorized` (401), `quota_exceeded` (402), `permission_denied` (403), `scope_insufficient` (403), `connection_invalid` (403), `not_found` (404), `conflict` (409), `rate_limit_exceeded` (429), `platform_rate_limit` (429), `internal` (500, 502, 504), `service_unavailable` (503)."
            },
            "message": {
              "type": "string",
              "description": "Human-readable summary."
            },
            "meta": {
              "type": "object",
              "properties": {
                "violations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "code",
                      "path",
                      "message"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Stable violation code, such as `missing_field`, `unknown_field`, `schema_error`, `invalid_value` or `invalid_combination`."
                      },
                      "path": {
                        "type": "string",
                        "description": "JSON pointer into the request: path, query and body fields share one pointer space (`/cursor`, `/publishRequests/0/args/text`), a header is `/headers/<lowercase name>`, and `\"\"` is the request as a whole."
                      },
                      "message": {
                        "type": "string",
                        "description": "Human-readable explanation."
                      }
                    },
                    "additionalProperties": false
                  },
                  "description": "Every problem with the request. Always present on a `validation_error`."
                },
                "budgets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded`: every budget that refused the request: `organization` (every authenticated request), `profile` (a request that acts on a Profile, one budget per Profile) or `client_address` (requests with no key or a rejected one). Koil may add budgets; treat an unknown one as covering the whole Organization."
                },
                "profileIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `rate_limit_exceeded` whose `budgets` include `profile`: the Profiles whose budget is spent. Requests that act on other Profiles are unaffected."
                },
                "required": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "On a `permission_denied`: the API key permissions the operation requires that the key lacks."
                },
                "limit": {
                  "type": "integer",
                  "description": "On a `quota_exceeded`: the cap that was reached."
                },
                "resourceType": {
                  "type": "string",
                  "description": "On a `not_found` or a `conflict` over an existing resource: the kind of resource, such as `profile` or `connection`."
                },
                "resourceId": {
                  "type": "string",
                  "description": "With `resourceType`: the id of the resource not found or already there."
                },
                "reason": {
                  "type": "string",
                  "description": "On a failed publish or backfill request, or a failed Connect Session, that Koil failed itself, not the platform: why, such as `media_incompatible`, `media_transform_not_entitled` or `subject_mismatch` (a reconnect authorized a different platform account than the Connection's)."
                },
                "refusalReason": {
                  "type": "string",
                  "enum": [
                    "messaging_window_closed",
                    "recipient_rate_limited",
                    "recipient_unavailable",
                    "publishing_limit_reached"
                  ],
                  "description": "Why the platform refused, where the code alone does not say what to do. `messaging_window_closed`: The platform takes a message to this person only inside a window that has closed: WhatsApp's 24-hour customer service window, the Messenger and Instagram messaging window, or TikTok's allowance since the person last wrote. It reopens when the person writes again. `recipient_rate_limited`: Too many messages to this one person in a short time; messages to others are unaffected. Retry after `Retry-After`. `recipient_unavailable`: The person cannot receive messages from this Profile: they blocked it or deactivated their account, or, on WhatsApp, the number has no account or an outdated app. Retrying does not help. `publishing_limit_reached`: The account's own publishing cap on the platform is spent: Instagram's 24-hour content publishing limit, YouTube's daily upload limit, or TikTok's limit on posts. Publish again once it resets."
                }
              },
              "additionalProperties": {},
              "description": "Structured detail; the keys depend on `code`."
            }
          },
          "additionalProperties": false
        },
        "metadata": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "string",
              "maxLength": 500
            }
          },
          "maxProperties": 50,
          "propertyNames": {
            "minLength": 1,
            "maxLength": 40
          },
          "description": "Your own key-value pairs, up to 50 keys of at most 40 characters with string values of at most 500. An update merges into what is stored, and a key set to `\"\"` is removed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "succeededAt": {
          "type": "string",
          "format": "date-time"
        },
        "failedAt": {
          "type": "string",
          "format": "date-time"
        },
        "cancelledAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Content

content.facebook.dm.messages.created

Normalized created event for facebook.dm.messages content.

Collection facebook.dm.messages. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetunknown | unknownnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.dm.messages"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.dm.messages.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id."
        },
        "target": {
          "type": "object",
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the thing pointed at; matching and joining always use it."
            },
            "kind": {
              "type": "string",
              "minLength": 1,
              "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "anyOf": [
            {
              "required": [
                "externalId"
              ]
            },
            {
              "required": [
                "permalink"
              ]
            }
          ],
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "choice": {
          "type": "object",
          "required": [
            "payload"
          ],
          "properties": {
            "payload": {
              "type": "string",
              "minLength": 1,
              "description": "The value the account set on the option when it offered it (a quick reply's, postback button's or ice breaker's `payload`, a reply button's or list row's id), so a consumer tells options apart by it rather than by their labels."
            }
          },
          "additionalProperties": false,
          "description": "The option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's `text`, and the message that offered it is `target` where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its `text` without `choice`. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.dm.messages",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.dm.reactions.deleted

facebook.dm.reactions content was deleted; data identifies it and carries none of its content.

Collection facebook.dm.reactions. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' containerId names it.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
kind"facebook.dm.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.dm.reactions.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The message reacted to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' `containerId` names it."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "facebook.dm.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.facebook.dm.reactions.updated

Normalized updated event for facebook.dm.reactions content.

Collection facebook.dm.reactions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' containerId names it.
emojistringnoThe emoji reacted with, as the platform sent it.
authorobjectyesThe account that reacted: the counterpart, or the account itself.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
reactionType"smile" | "angry" | "sad" | "wow" | "love" | "like" | "dislike" | "other"noMessenger's name for the reaction, beside its emoji; other is an emoji outside Messenger's named set.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.dm.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.dm.reactions.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "author",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The message reacted to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' `containerId` names it."
        },
        "emoji": {
          "type": "string",
          "minLength": 1,
          "description": "The emoji reacted with, as the platform sent it."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The account that reacted: the counterpart, or the account itself."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "reactionType": {
          "enum": [
            "smile",
            "angry",
            "sad",
            "wow",
            "love",
            "like",
            "dislike",
            "other"
          ],
          "description": "Messenger's name for the reaction, beside its `emoji`; `other` is an emoji outside Messenger's named set."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.dm.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.comments.created

Normalized created event for facebook.media.comments content.

Collection facebook.media.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleanno
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.comments.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.media.posts",
                "facebook.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean"
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.comments.deleted

facebook.media.comments content was deleted; data identifies it and carries none of its content.

Collection facebook.media.comments. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
kind"facebook.media.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.comments.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.media.posts",
                "facebook.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.facebook.media.comments.moderated

Normalized moderated event for facebook.media.comments content.

Collection facebook.media.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleanno
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.comments.moderated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.media.posts",
                "facebook.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean"
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.comments.updated

Normalized updated event for facebook.media.comments content.

Collection facebook.media.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleanno
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.comments.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.media.posts",
                "facebook.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean"
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.mentions.created

Normalized created event for facebook.media.mentions content.

Collection facebook.media.mentions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
variant"post" | "comment"yesWhether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as containerId).
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.mentions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.mentions.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "variant",
        "externalId",
        "kind"
      ],
      "properties": {
        "variant": {
          "enum": [
            "post",
            "comment"
          ],
          "description": "Whether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as `containerId`)."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.mentions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.posts.created

Normalized created event for facebook.media.posts content.

Collection facebook.media.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.posts.deleted

facebook.media.posts content was deleted; data identifies it and carries none of its content.

Collection facebook.media.posts. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
kind"facebook.media.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.posts.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.facebook.media.posts.updated

Normalized updated event for facebook.media.posts content.

Collection facebook.media.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.posts.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.media.reactions.deleted

facebook.media.reactions content was deleted; data identifies it and carries none of its content.

Collection facebook.media.reactions. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
kind"facebook.media.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.reactions.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.media.posts",
                "facebook.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.facebook.media.reactions.updated

Normalized updated event for facebook.media.reactions content.

Collection facebook.media.reactions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
emojistringnoThe emoji reacted with, as the platform sent it.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
reactionType"like" | "love" | "care" | "haha" | "wow" | "sad" | "angry" | "other"yeslike, love, care, haha, wow, sad or angry; other is a type Facebook added that Koil does not model.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.media.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.media.reactions.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "externalId",
        "reactionType",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "facebook.media.posts",
                "facebook.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "emoji": {
          "type": "string",
          "minLength": 1,
          "description": "The emoji reacted with, as the platform sent it."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "reactionType": {
          "enum": [
            "like",
            "love",
            "care",
            "haha",
            "wow",
            "sad",
            "angry",
            "other"
          ],
          "description": "like, love, care, haha, wow, sad or angry; `other` is a type Facebook added that Koil does not model."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.media.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.facebook.stories.posts.created

Normalized created event for facebook.stories.posts content.

Collection facebook.stories.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"photo" | "video" | "other"yesThe story's media_type. other is a type Meta added that Koil does not model yet.
status"published" | "archived" | "other"yesarchived once the story leaves the Page. other is a state Meta added that Koil does not model yet.
mediaExternalIdstringnoMeta's id for the story's photo or video.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"facebook.stories.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.facebook.stories.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "variant",
        "status",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "variant": {
          "enum": [
            "photo",
            "video",
            "other"
          ],
          "description": "The story's `media_type`. `other` is a type Meta added that Koil does not model yet."
        },
        "status": {
          "enum": [
            "published",
            "archived",
            "other"
          ],
          "description": "`archived` once the story leaves the Page. `other` is a state Meta added that Koil does not model yet."
        },
        "mediaExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "Meta's id for the story's photo or video."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "facebook.stories.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.google_business_profile.locations.reviews.created

Normalized created event for google_business_profile.locations.reviews content.

Collection google_business_profile.locations.reviews. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
locationExternalIdstringyes
ratingobjectnoA score on the platform's own scale, with its position on that scale as a percentage.
textstringnoCaption/body text for content.
reviewerobjectyesThe reviewer as Google reports them: a name and photo, or neither when anonymous. Google publishes no stable reviewer id.
attachmentsunknown | unknown | unknown[]no
replyobjectno
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"google_business_profile.locations.reviews"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.google_business_profile.locations.reviews.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "locationExternalId",
        "reviewer",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "locationExternalId": {
          "type": "string",
          "minLength": 1
        },
        "rating": {
          "type": "object",
          "required": [
            "value",
            "min",
            "max",
            "percent"
          ],
          "properties": {
            "value": {
              "type": "number",
              "description": "The score as the platform reports it, on its own scale."
            },
            "min": {
              "type": "number",
              "description": "The lowest score the platform's scale allows."
            },
            "max": {
              "type": "number",
              "description": "The highest score the platform's scale allows."
            },
            "percent": {
              "type": "number",
              "minimum": 0,
              "maximum": 100,
              "description": "Where `value` sits on the scale: 0 at `min`, 100 at `max`, to two decimal places. Derived, and comparable across platforms."
            }
          },
          "additionalProperties": false,
          "description": "A score on the platform's own scale, with its position on that scale as a percentage."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "reviewer": {
          "type": "object",
          "required": [
            "isAnonymous"
          ],
          "properties": {
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The reviewer's profile picture, as Google serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            },
            "isAnonymous": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "description": "The reviewer as Google reports them: a name and photo, or neither when anonymous. Google publishes no stable reviewer id."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "reply": {
          "type": "object",
          "required": [
            "text"
          ],
          "properties": {
            "text": {
              "type": "string",
              "description": "Caption/body text for content."
            },
            "state": {
              "enum": [
                "pending",
                "approved",
                "rejected",
                "other"
              ],
              "description": "Google's moderation state of the owner's reply. `other` is a state Google added that Koil does not model yet."
            },
            "policyViolation": {
              "type": "string",
              "minLength": 1
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "description": "When the platform last updated it."
            }
          },
          "additionalProperties": false
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "google_business_profile.locations.reviews",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.google_business_profile.locations.reviews.updated

Normalized updated event for google_business_profile.locations.reviews content.

Collection google_business_profile.locations.reviews. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
locationExternalIdstringyes
ratingobjectnoA score on the platform's own scale, with its position on that scale as a percentage.
textstringnoCaption/body text for content.
reviewerobjectyesThe reviewer as Google reports them: a name and photo, or neither when anonymous. Google publishes no stable reviewer id.
attachmentsunknown | unknown | unknown[]no
replyobjectno
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"google_business_profile.locations.reviews"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.google_business_profile.locations.reviews.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "locationExternalId",
        "reviewer",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "locationExternalId": {
          "type": "string",
          "minLength": 1
        },
        "rating": {
          "type": "object",
          "required": [
            "value",
            "min",
            "max",
            "percent"
          ],
          "properties": {
            "value": {
              "type": "number",
              "description": "The score as the platform reports it, on its own scale."
            },
            "min": {
              "type": "number",
              "description": "The lowest score the platform's scale allows."
            },
            "max": {
              "type": "number",
              "description": "The highest score the platform's scale allows."
            },
            "percent": {
              "type": "number",
              "minimum": 0,
              "maximum": 100,
              "description": "Where `value` sits on the scale: 0 at `min`, 100 at `max`, to two decimal places. Derived, and comparable across platforms."
            }
          },
          "additionalProperties": false,
          "description": "A score on the platform's own scale, with its position on that scale as a percentage."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "reviewer": {
          "type": "object",
          "required": [
            "isAnonymous"
          ],
          "properties": {
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The reviewer's profile picture, as Google serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            },
            "isAnonymous": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "description": "The reviewer as Google reports them: a name and photo, or neither when anonymous. Google publishes no stable reviewer id."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "reply": {
          "type": "object",
          "required": [
            "text"
          ],
          "properties": {
            "text": {
              "type": "string",
              "description": "Caption/body text for content."
            },
            "state": {
              "enum": [
                "pending",
                "approved",
                "rejected",
                "other"
              ],
              "description": "Google's moderation state of the owner's reply. `other` is a state Google added that Koil does not model yet."
            },
            "policyViolation": {
              "type": "string",
              "minLength": 1
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "description": "When the platform last updated it."
            }
          },
          "additionalProperties": false
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "google_business_profile.locations.reviews",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.instagram.dm.messages.created

Normalized created event for instagram.dm.messages content.

Collection instagram.dm.messages. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetunknown | unknownnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"instagram.dm.messages"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.dm.messages.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id."
        },
        "target": {
          "type": "object",
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the thing pointed at; matching and joining always use it."
            },
            "kind": {
              "type": "string",
              "minLength": 1,
              "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "anyOf": [
            {
              "required": [
                "externalId"
              ]
            },
            {
              "required": [
                "permalink"
              ]
            }
          ],
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "choice": {
          "type": "object",
          "required": [
            "payload"
          ],
          "properties": {
            "payload": {
              "type": "string",
              "minLength": 1,
              "description": "The value the account set on the option when it offered it (a quick reply's, postback button's or ice breaker's `payload`, a reply button's or list row's id), so a consumer tells options apart by it rather than by their labels."
            }
          },
          "additionalProperties": false,
          "description": "The option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's `text`, and the message that offered it is `target` where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its `text` without `choice`. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "instagram.dm.messages",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.instagram.dm.reactions.deleted

instagram.dm.reactions content was deleted; data identifies it and carries none of its content.

Collection instagram.dm.reactions. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' containerId names it.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
kind"instagram.dm.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.dm.reactions.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "instagram.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The message reacted to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' `containerId` names it."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "instagram.dm.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.instagram.dm.reactions.updated

Normalized updated event for instagram.dm.reactions content.

Collection instagram.dm.reactions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' containerId names it.
emojistringnoThe emoji reacted with, as the platform sent it.
authorobjectyesThe account that reacted: the counterpart, or the account itself.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"instagram.dm.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.dm.reactions.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "author",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "instagram.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The message reacted to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation of the message reacted to: the counterpart's IGSID or PSID, as its messages' `containerId` names it."
        },
        "emoji": {
          "type": "string",
          "minLength": 1,
          "description": "The emoji reacted with, as the platform sent it."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The account that reacted: the counterpart, or the account itself."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "instagram.dm.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.instagram.media.comments.created

Normalized created event for instagram.media.comments content.

Collection instagram.media.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"instagram.media.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.media.comments.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "instagram.media.posts",
                "instagram.media.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "instagram.media.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.instagram.media.mentions.created

Normalized created event for instagram.media.mentions content.

Collection instagram.media.mentions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
variant"post" | "comment"yesWhether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as containerId).
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"instagram.media.mentions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.media.mentions.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "variant",
        "externalId",
        "kind"
      ],
      "properties": {
        "variant": {
          "enum": [
            "post",
            "comment"
          ],
          "description": "Whether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as `containerId`)."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "instagram.media.mentions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.instagram.media.posts.created

Normalized created event for instagram.media.posts content.

Collection instagram.media.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"feed" | "reel" | "other"yesreel for a reel or any video, feed for other feed media. other is a media_product_type Koil does not model.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"instagram.media.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.media.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "variant",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "variant": {
          "enum": [
            "feed",
            "reel",
            "other"
          ],
          "description": "`reel` for a reel or any video, `feed` for other feed media. `other` is a `media_product_type` Koil does not model."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "instagram.media.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.instagram.stories.posts.created

Normalized created event for instagram.stories.posts content.

Collection instagram.stories.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"instagram.stories.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.instagram.stories.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "instagram.stories.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.linkedin.feed.comments.created

Normalized created event for linkedin.feed.comments content.

Collection linkedin.feed.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
commentNumericIdstringyesThe comment's id without its thread, the same whichever URN names the thread: the key to join a comment read through its post with one an event delivered.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"linkedin.feed.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.linkedin.feed.comments.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "commentNumericId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "linkedin.feed.posts",
                "linkedin.feed.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "commentNumericId": {
          "type": "string",
          "minLength": 1,
          "description": "The comment's id without its thread, the same whichever URN names the thread: the key to join a comment read through its post with one an event delivered."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "linkedin.feed.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.linkedin.feed.comments.deleted

linkedin.feed.comments content was deleted; data identifies it and carries none of its content.

Collection linkedin.feed.comments. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
commentNumericIdstringyesThe comment's id without its thread, the same whichever URN names the thread: the key to join a comment read through its post with one an event delivered.
kind"linkedin.feed.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.linkedin.feed.comments.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "commentNumericId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "linkedin.feed.posts",
                "linkedin.feed.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "commentNumericId": {
          "type": "string",
          "minLength": 1,
          "description": "The comment's id without its thread, the same whichever URN names the thread: the key to join a comment read through its post with one an event delivered."
        },
        "kind": {
          "type": "string",
          "const": "linkedin.feed.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.linkedin.feed.comments.updated

Normalized updated event for linkedin.feed.comments content.

Collection linkedin.feed.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
commentNumericIdstringyesThe comment's id without its thread, the same whichever URN names the thread: the key to join a comment read through its post with one an event delivered.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"linkedin.feed.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.linkedin.feed.comments.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "commentNumericId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "linkedin.feed.posts",
                "linkedin.feed.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "commentNumericId": {
          "type": "string",
          "minLength": 1,
          "description": "The comment's id without its thread, the same whichever URN names the thread: the key to join a comment read through its post with one an event delivered."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "linkedin.feed.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.linkedin.feed.mentions.created

Normalized created event for linkedin.feed.mentions content.

Collection linkedin.feed.mentions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
variant"post" | "comment"yesWhether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as containerId).
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
organizationExternalIdstringyes
activityUrnstringno
kind"linkedin.feed.mentions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.linkedin.feed.mentions.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "variant",
        "externalId",
        "organizationExternalId",
        "kind"
      ],
      "properties": {
        "variant": {
          "enum": [
            "post",
            "comment"
          ],
          "description": "Whether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as `containerId`)."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "organizationExternalId": {
          "type": "string",
          "minLength": 1
        },
        "activityUrn": {
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "linkedin.feed.mentions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.linkedin.feed.posts.created

Normalized created event for linkedin.feed.posts content.

Collection linkedin.feed.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
organizationExternalIdstringyes
hashtagsstring[]no
variant"text" | "image" | "video" | "document" | "article" | "multi_image" | "poll" | "reshare" | "other"yesWhat the post carries besides its text, with the details in content (absent when there are none, always for text and other). image, video and document name a single uploaded asset by its LinkedIn URN.
contentobjectno
visibility"public" | "connections" | "logged_in" | "container" | "other"nopublic, connections, logged_in or container; other is one LinkedIn added that Koil does not model. Only public posts raise LinkedIn's comment notifications.
lifecycleState"published" | "publish_requested" | "publish_failed" | "draft" | "other"nopublished, or publish_requested while LinkedIn processes it, publish_failed, draft; other is one LinkedIn added that Koil does not model.
reshareDisabledbooleanno
updatedAtstring (date-time)noWhen the platform last updated it.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"linkedin.feed.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.linkedin.feed.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "organizationExternalId",
        "variant",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "organizationExternalId": {
          "type": "string",
          "minLength": 1
        },
        "hashtags": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "variant": {
          "enum": [
            "text",
            "image",
            "video",
            "document",
            "article",
            "multi_image",
            "poll",
            "reshare",
            "other"
          ],
          "description": "What the post carries besides its text, with the details in `content` (absent when there are none, always for `text` and `other`). `image`, `video` and `document` name a single uploaded asset by its LinkedIn URN."
        },
        "content": {
          "type": "object",
          "properties": {
            "mediaUrn": {
              "type": "string",
              "minLength": 1
            },
            "imageUrns": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "url": {
              "type": "string",
              "minLength": 1
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "altText": {
              "type": "string"
            },
            "resharedPostUrn": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        },
        "visibility": {
          "enum": [
            "public",
            "connections",
            "logged_in",
            "container",
            "other"
          ],
          "description": "`public`, `connections`, `logged_in` or `container`; `other` is one LinkedIn added that Koil does not model. Only `public` posts raise LinkedIn's comment notifications."
        },
        "lifecycleState": {
          "enum": [
            "published",
            "publish_requested",
            "publish_failed",
            "draft",
            "other"
          ],
          "description": "`published`, or `publish_requested` while LinkedIn processes it, `publish_failed`, `draft`; `other` is one LinkedIn added that Koil does not model."
        },
        "reshareDisabled": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "linkedin.feed.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.dm.conversations.updated

Normalized updated event for tiktok.dm.conversations content.

Collection tiktok.dm.conversations. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
counterpartobjectnoThe person the account is talking to in a 1:1 conversation. A group chat has none.
messageRequestbooleannoWhether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say.
updatedAtstring (date-time)noWhen the conversation last changed, as the platform reports it.
externalIdstringyesPlatform-owned content identifier.
referralobjectno
lastReadAtstring (date-time)noWhen the platform last updated it.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.dm.conversations"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.dm.conversations.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "counterpart": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The person the account is talking to in a 1:1 conversation. A group chat has none."
        },
        "messageRequest": {
          "type": "boolean",
          "description": "Whether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the conversation last changed, as the platform reports it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "referral": {
          "type": "object",
          "properties": {
            "source": {
              "enum": [
                "ad",
                "short_link",
                "other"
              ],
              "description": "What the webhook says brought the person. `other` is a source TikTok added that Koil does not model yet."
            },
            "ads": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "advertiserId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "adId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "adName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "embedUrl": {
                    "type": "string",
                    "minLength": 1
                  },
                  "materialId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "referredAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the platform last updated it."
                  }
                },
                "additionalProperties": false
              }
            },
            "shortLinks": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "string",
                    "minLength": 1
                  },
                  "prefilledMessage": {
                    "type": "string",
                    "minLength": 1
                  },
                  "prefilledMessageAuditStatus": {
                    "enum": [
                      "pass",
                      "reject",
                      "other"
                    ],
                    "description": "TikTok's review of the prefilled message. `other` is a result TikTok added that Koil does not model yet."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        "lastReadAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.dm.conversations",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.dm.messages.created

Normalized created event for tiktok.dm.messages content.

Collection tiktok.dm.messages. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"text" | "image" | "video" | "share_post" | "emoji" | "sticker" | "template" | "other"yesTikTok's message type. other is a type TikTok added that Koil does not model yet.
recipientobjectnoPlatform actor reference for observed content.
sourcestringno
autoMessageType"welcome_message" | "suggested_question" | "auto_reply" | "other"noWhich automation sent it. other is one TikTok added that Koil does not model yet.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.dm.messages"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.dm.messages.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "externalId",
        "variant",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "tiktok.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "choice": {
          "type": "object",
          "required": [
            "payload"
          ],
          "properties": {
            "payload": {
              "type": "string",
              "minLength": 1,
              "description": "The value the account set on the option when it offered it (a quick reply's, postback button's or ice breaker's `payload`, a reply button's or list row's id), so a consumer tells options apart by it rather than by their labels."
            }
          },
          "additionalProperties": false,
          "description": "The option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's `text`, and the message that offered it is `target` where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its `text` without `choice`. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "variant": {
          "enum": [
            "text",
            "image",
            "video",
            "share_post",
            "emoji",
            "sticker",
            "template",
            "other"
          ],
          "description": "TikTok's message type. `other` is a type TikTok added that Koil does not model yet."
        },
        "recipient": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "source": {
          "type": "string",
          "minLength": 1
        },
        "autoMessageType": {
          "enum": [
            "welcome_message",
            "suggested_question",
            "auto_reply",
            "other"
          ],
          "description": "Which automation sent it. `other` is one TikTok added that Koil does not model yet."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.dm.messages",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.comments.created

Normalized created event for tiktok.videos.comments content.

Collection tiktok.videos.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
pinnedbooleanno
likedbooleanno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.videos.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.comments.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "tiktok.videos.posts",
                "tiktok.videos.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "pinned": {
          "type": "boolean"
        },
        "liked": {
          "type": "boolean"
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.comments.deleted

tiktok.videos.comments content was deleted; data identifies it and carries none of its content.

Collection tiktok.videos.comments. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
kind"tiktok.videos.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.comments.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "tiktok.videos.posts",
                "tiktok.videos.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.comments.moderated

Normalized moderated event for tiktok.videos.comments content.

Collection tiktok.videos.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
pinnedbooleanno
likedbooleanno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.videos.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.comments.moderated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "tiktok.videos.posts",
                "tiktok.videos.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "pinned": {
          "type": "boolean"
        },
        "liked": {
          "type": "boolean"
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.comments.updated

Normalized updated event for tiktok.videos.comments content.

Collection tiktok.videos.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
pinnedbooleanno
likedbooleanno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.videos.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.comments.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "tiktok.videos.posts",
                "tiktok.videos.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "pinned": {
          "type": "boolean"
        },
        "liked": {
          "type": "boolean"
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.mentions.created

Normalized created event for tiktok.videos.mentions content.

Collection tiktok.videos.mentions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
variant"post" | "comment"yesWhether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as containerId).
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.videos.mentions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.mentions.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "variant",
        "externalId",
        "kind"
      ],
      "properties": {
        "variant": {
          "enum": [
            "post",
            "comment"
          ],
          "description": "Whether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as `containerId`)."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.mentions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.mentions.updated

Normalized updated event for tiktok.videos.mentions content.

Collection tiktok.videos.mentions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
variant"post" | "comment"yesWhether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as containerId).
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.videos.mentions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.mentions.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "variant",
        "externalId",
        "kind"
      ],
      "properties": {
        "variant": {
          "enum": [
            "post",
            "comment"
          ],
          "description": "Whether the mentioning item is a post (identified by the post itself) or a comment (with the post it is on as `containerId`)."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.mentions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.posts.created

Normalized created event for tiktok.videos.posts content.

Collection tiktok.videos.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"video" | "photo" | "other"yesTikTok's media_type. other is a type TikTok added that Koil does not model yet.
embedUrlstringno
durationSecondsnumberno
isAdbooleanno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"tiktok.videos.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "variant",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "variant": {
          "enum": [
            "video",
            "photo",
            "other"
          ],
          "description": "TikTok's `media_type`. `other` is a type TikTok added that Koil does not model yet."
        },
        "embedUrl": {
          "type": "string",
          "minLength": 1
        },
        "durationSeconds": {
          "type": "number",
          "minimum": 0
        },
        "isAd": {
          "type": "boolean"
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.tiktok.videos.posts.deleted

tiktok.videos.posts content was deleted; data identifies it and carries none of its content.

Collection tiktok.videos.posts. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
kind"tiktok.videos.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.tiktok.videos.posts.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "tiktok.videos.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.whatsapp.dm.messages.created

Normalized created event for whatsapp.dm.messages content.

Collection whatsapp.dm.messages. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectyesPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"text" | "image" | "video" | "audio" | "document" | "sticker" | "location" | "contacts" | "interactive" | "button" | "referral" | "order" | "system" | "unsupported" | "other"yesThe Cloud API message type. Media types carry one attachments entry; location carries location; unsupported is a type the Cloud API cannot deliver (e.g. a poll); other is a type Meta added that Koil does not model yet.
authorPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
locationobjectnoGeographic place reference for content.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.dm.messages"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.dm.messages.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "author",
        "externalId",
        "variant",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "whatsapp.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "choice": {
          "type": "object",
          "required": [
            "payload"
          ],
          "properties": {
            "payload": {
              "type": "string",
              "minLength": 1,
              "description": "The value the account set on the option when it offered it (a quick reply's, postback button's or ice breaker's `payload`, a reply button's or list row's id), so a consumer tells options apart by it rather than by their labels."
            }
          },
          "additionalProperties": false,
          "description": "The option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's `text`, and the message that offered it is `target` where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its `text` without `choice`. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "variant": {
          "enum": [
            "text",
            "image",
            "video",
            "audio",
            "document",
            "sticker",
            "location",
            "contacts",
            "interactive",
            "button",
            "referral",
            "order",
            "system",
            "unsupported",
            "other"
          ],
          "description": "The Cloud API message `type`. Media types carry one `attachments` entry; `location` carries `location`; `unsupported` is a type the Cloud API cannot deliver (e.g. a poll); `other` is a type Meta added that Koil does not model yet."
        },
        "authorPhoneNumber": {
          "type": "string",
          "minLength": 1,
          "description": "The person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID."
        },
        "location": {
          "type": "object",
          "properties": {
            "locationId": {
              "type": "string",
              "minLength": 1
            },
            "name": {
              "type": "string",
              "minLength": 1
            },
            "lat": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "lng": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          "additionalProperties": false,
          "description": "Geographic place reference for content."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.dm.messages",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.whatsapp.dm.reactions.deleted

whatsapp.dm.reactions content was deleted; data identifies it and carries none of its content.

Collection whatsapp.dm.reactions. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe 1:1 conversation of the message reacted to: the person's BSUID, as its messages' containerId names it.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
externalIdstringyesPlatform-owned content identifier.
kind"whatsapp.dm.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.dm.reactions.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "whatsapp.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The message reacted to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The 1:1 conversation of the message reacted to: the person's BSUID, as its messages' `containerId` names it."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.dm.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.whatsapp.dm.reactions.updated

Normalized updated event for whatsapp.dm.reactions content.

Collection whatsapp.dm.reactions. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
targetobjectyesThe message reacted to.
containerIdstringyesThe 1:1 conversation of the message reacted to: the person's BSUID, as its messages' containerId names it.
emojistringnoThe emoji reacted with, as the platform sent it.
authorobjectyesPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
authorPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.dm.reactions"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.dm.reactions.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "containerId",
        "author",
        "externalId",
        "kind"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "whatsapp.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The message reacted to."
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The 1:1 conversation of the message reacted to: the person's BSUID, as its messages' `containerId` names it."
        },
        "emoji": {
          "type": "string",
          "minLength": 1,
          "description": "The emoji reacted with, as the platform sent it."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "authorPhoneNumber": {
          "type": "string",
          "minLength": 1,
          "description": "The person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.dm.reactions",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.whatsapp.dm.statuses.created

Normalized created event for whatsapp.dm.statuses content.

Collection whatsapp.dm.statuses. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
containerIdstringyesThe conversation of the message this status reports on: the recipient's business-scoped user id (BSUID), as that conversation's messages name it.
targetobjectyesThe outbound message this status reports on, by the externalId its publish request returned.
status"sent" | "delivered" | "read" | "played" | "failed" | "other"yesThe delivery state this status reports. other is a state Meta added that Koil does not model yet.
recipientobjectyesPlatform actor reference for observed content.
recipientPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
occurredAtstring (date-time)no
conversationobjectno
pricingobjectno
errorsobject[]no
callbackDatastringno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.dm.statuses"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.dm.statuses.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "containerId",
        "target",
        "status",
        "recipient",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation of the message this status reports on: the recipient's business-scoped user id (BSUID), as that conversation's messages name it."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "whatsapp.dm.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The outbound message this status reports on, by the `externalId` its publish request returned."
        },
        "status": {
          "enum": [
            "sent",
            "delivered",
            "read",
            "played",
            "failed",
            "other"
          ],
          "description": "The delivery state this status reports. `other` is a state Meta added that Koil does not model yet."
        },
        "recipient": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "recipientPhoneNumber": {
          "type": "string",
          "minLength": 1,
          "description": "The person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID."
        },
        "occurredAt": {
          "type": "string",
          "format": "date-time"
        },
        "conversation": {
          "type": "object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "originType": {
              "enum": [
                "service",
                "marketing",
                "marketing_lite",
                "utility",
                "authentication",
                "authentication_international",
                "referral_conversion",
                "other"
              ],
              "description": "Meta's category for the conversation or message (`referral_conversion` is legacy); `other` is one Meta added that Koil does not model."
            },
            "expiresAt": {
              "type": "string",
              "format": "date-time"
            }
          },
          "additionalProperties": false
        },
        "pricing": {
          "type": "object",
          "properties": {
            "billable": {
              "type": "boolean"
            },
            "model": {
              "enum": [
                "pmp",
                "cbp",
                "other"
              ],
              "description": "`pmp` (per-message) or the legacy `cbp` (per-conversation); `other` is one Meta added that Koil does not model."
            },
            "type": {
              "enum": [
                "regular",
                "free_customer_service",
                "free_entry_point",
                "other"
              ],
              "description": "`regular`, `free_customer_service`, or `free_entry_point`; `other` is one Meta added that Koil does not model."
            },
            "category": {
              "enum": [
                "service",
                "marketing",
                "marketing_lite",
                "utility",
                "authentication",
                "authentication_international",
                "referral_conversion",
                "other"
              ],
              "description": "Meta's category for the conversation or message (`referral_conversion` is legacy); `other` is one Meta added that Koil does not model."
            }
          },
          "additionalProperties": false
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "number"
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "details": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          }
        },
        "callbackData": {
          "type": "string",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.dm.statuses",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.whatsapp.groups.conversations.created

Normalized created event for whatsapp.groups.conversations content.

Collection whatsapp.groups.conversations. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
counterpartobjectnoThe person the account is talking to in a 1:1 conversation. A group chat has none.
messageRequestbooleannoWhether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say.
updatedAtstring (date-time)noWhen the conversation last changed, as the platform reports it.
externalIdstringyesThe group's id: the containerId its messages carry, which a group send takes.
subjectstringnoThe group's name.
descriptionstringnoThe group's description. Read by get; an event carries it only when it changed.
participantsobject[]noThe people in the group, not counting the business, each keyed by BSUID as a group message's author is. Read by get only.
participantCountintegernoHow many people are in the group, not counting the business. Read by get only.
joinApprovalMode"approval_required" | "auto_approve" | "other"noWhether a person who opens the group's invite link needs the business's approval to join (approval_required) or joins at once (auto_approve). Read by get, and carried by the created event.
suspendedbooleannoWhether WhatsApp has suspended the group, which stops activity in it. Read by get, and carried by the updated event of a suspension or its lifting.
createdAtstring (date-time)noWhen the group was created.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.conversations"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.groups.conversations.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "counterpart": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The person the account is talking to in a 1:1 conversation. A group chat has none."
        },
        "messageRequest": {
          "type": "boolean",
          "description": "Whether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the conversation last changed, as the platform reports it."
        },
        "externalId": {
          "type": "string",
          "description": "The group's id: the `containerId` its messages carry, which a group send takes.",
          "minLength": 1
        },
        "subject": {
          "type": "string",
          "minLength": 1,
          "description": "The group's name."
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "description": "The group's description. Read by `get`; an event carries it only when it changed."
        },
        "participants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "externalId"
            ],
            "properties": {
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the account; matching and joining always use it."
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              },
              "username": {
                "type": "string",
                "minLength": 1
              },
              "avatarUrl": {
                "type": "string",
                "format": "uri",
                "description": "The author's profile picture, as the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "Platform actor reference for observed content."
          },
          "description": "The people in the group, not counting the business, each keyed by BSUID as a group message's `author` is. Read by `get` only."
        },
        "participantCount": {
          "type": "integer",
          "minimum": 0,
          "description": "How many people are in the group, not counting the business. Read by `get` only."
        },
        "joinApprovalMode": {
          "enum": [
            "approval_required",
            "auto_approve",
            "other"
          ],
          "description": "Whether a person who opens the group's invite link needs the business's approval to join (`approval_required`) or joins at once (`auto_approve`). Read by `get`, and carried by the `created` event."
        },
        "suspended": {
          "type": "boolean",
          "description": "Whether WhatsApp has suspended the group, which stops activity in it. Read by `get`, and carried by the `updated` event of a suspension or its lifting."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the group was created."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.groups.conversations",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.whatsapp.groups.conversations.deleted

whatsapp.groups.conversations content was deleted; data identifies it and carries none of its content.

Collection whatsapp.groups.conversations. data identifies the deleted item and carries none of its content.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesThe group's id: the containerId its messages carry, which a group send takes.
kind"whatsapp.groups.conversations"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.groups.conversations.deleted"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "The group's id: the `containerId` its messages carry, which a group send takes.",
          "minLength": 1
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.groups.conversations",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false,
      "description": "What a deletion carries: the deleted item's identity, its relations and whether the observing profile wrote it, never its content."
    }
  },
  "additionalProperties": false
}

content.whatsapp.groups.conversations.updated

Normalized updated event for whatsapp.groups.conversations content.

Collection whatsapp.groups.conversations. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
counterpartobjectnoThe person the account is talking to in a 1:1 conversation. A group chat has none.
messageRequestbooleannoWhether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say.
updatedAtstring (date-time)noWhen the conversation last changed, as the platform reports it.
externalIdstringyesThe group's id: the containerId its messages carry, which a group send takes.
subjectstringnoThe group's name.
descriptionstringnoThe group's description. Read by get; an event carries it only when it changed.
participantsobject[]noThe people in the group, not counting the business, each keyed by BSUID as a group message's author is. Read by get only.
participantCountintegernoHow many people are in the group, not counting the business. Read by get only.
joinApprovalMode"approval_required" | "auto_approve" | "other"noWhether a person who opens the group's invite link needs the business's approval to join (approval_required) or joins at once (auto_approve). Read by get, and carried by the created event.
suspendedbooleannoWhether WhatsApp has suspended the group, which stops activity in it. Read by get, and carried by the updated event of a suspension or its lifting.
createdAtstring (date-time)noWhen the group was created.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.conversations"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.groups.conversations.updated"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "kind"
      ],
      "properties": {
        "counterpart": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The person the account is talking to in a 1:1 conversation. A group chat has none."
        },
        "messageRequest": {
          "type": "boolean",
          "description": "Whether the conversation is still a message request: the person wrote and the account has not replied yet. Absent when the read or event did not say."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the conversation last changed, as the platform reports it."
        },
        "externalId": {
          "type": "string",
          "description": "The group's id: the `containerId` its messages carry, which a group send takes.",
          "minLength": 1
        },
        "subject": {
          "type": "string",
          "minLength": 1,
          "description": "The group's name."
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "description": "The group's description. Read by `get`; an event carries it only when it changed."
        },
        "participants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "externalId"
            ],
            "properties": {
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the account; matching and joining always use it."
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              },
              "username": {
                "type": "string",
                "minLength": 1
              },
              "avatarUrl": {
                "type": "string",
                "format": "uri",
                "description": "The author's profile picture, as the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "Platform actor reference for observed content."
          },
          "description": "The people in the group, not counting the business, each keyed by BSUID as a group message's `author` is. Read by `get` only."
        },
        "participantCount": {
          "type": "integer",
          "minimum": 0,
          "description": "How many people are in the group, not counting the business. Read by `get` only."
        },
        "joinApprovalMode": {
          "enum": [
            "approval_required",
            "auto_approve",
            "other"
          ],
          "description": "Whether a person who opens the group's invite link needs the business's approval to join (`approval_required`) or joins at once (`auto_approve`). Read by `get`, and carried by the `created` event."
        },
        "suspended": {
          "type": "boolean",
          "description": "Whether WhatsApp has suspended the group, which stops activity in it. Read by `get`, and carried by the `updated` event of a suspension or its lifting."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the group was created."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.groups.conversations",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.whatsapp.groups.messages.created

Normalized created event for whatsapp.groups.messages content.

Collection whatsapp.groups.messages. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringyesThe conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id.
targetobjectnoThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectyesPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
choiceobjectnoThe option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's text, and the message that offered it is target where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its text without choice. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
variant"text" | "image" | "video" | "audio" | "document" | "sticker" | "location" | "contacts" | "interactive" | "button" | "referral" | "order" | "system" | "unsupported" | "other"yesThe Cloud API message type. Media types carry one attachments entry; location carries location; unsupported is a type the Cloud API cannot deliver (e.g. a poll); other is a type Meta added that Koil does not model yet.
authorPhoneNumberstringnoThe person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID.
locationobjectnoGeographic place reference for content.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.messages"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.groups.messages.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "containerId",
        "author",
        "externalId",
        "variant",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The conversation: the same on every message in it, on reads and events alike, so an inbox groups by it. It is TikTok's conversation id, a WhatsApp group's id, and in a 1:1 chat on Instagram, Facebook or WhatsApp the counterpart's own id, since Meta's messaging webhooks carry no conversation id."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "whatsapp.groups.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "choice": {
          "type": "object",
          "required": [
            "payload"
          ],
          "properties": {
            "payload": {
              "type": "string",
              "minLength": 1,
              "description": "The value the account set on the option when it offered it (a quick reply's, postback button's or ice breaker's `payload`, a reply button's or list row's id), so a consumer tells options apart by it rather than by their labels."
            }
          },
          "additionalProperties": false,
          "description": "The option the person picked instead of typing: a quick reply, a button or a list row a message offered, or one of the account's ice breakers. Its label is the message's `text`, and the message that offered it is `target` where the platform names it. Present where the platform reports the tap, which on Instagram and Messenger is the message's event only: a read of the same message returns its `text` without `choice`. Absent too when the platform withholds the payload (Meta sends a postback's payload only to the app that sent the button), so such a tap reads as typed text."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "variant": {
          "enum": [
            "text",
            "image",
            "video",
            "audio",
            "document",
            "sticker",
            "location",
            "contacts",
            "interactive",
            "button",
            "referral",
            "order",
            "system",
            "unsupported",
            "other"
          ],
          "description": "The Cloud API message `type`. Media types carry one `attachments` entry; `location` carries `location`; `unsupported` is a type the Cloud API cannot deliver (e.g. a poll); `other` is a type Meta added that Koil does not model yet."
        },
        "authorPhoneNumber": {
          "type": "string",
          "minLength": 1,
          "description": "The person's phone number in E.164 digits, present only when Meta shares it: when the business messaged or called that number, or was messaged or called from it, in the last 30 days, or has it in its contacts. Never a key: it can be absent on one message and present on the next, so identify the person by their BSUID."
        },
        "location": {
          "type": "object",
          "properties": {
            "locationId": {
              "type": "string",
              "minLength": 1
            },
            "name": {
              "type": "string",
              "minLength": 1
            },
            "lat": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "lng": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          "additionalProperties": false,
          "description": "Geographic place reference for content."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.groups.messages",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.whatsapp.groups.statuses.created

Normalized created event for whatsapp.groups.statuses content.

Collection whatsapp.groups.statuses. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
externalIdstringyesPlatform-owned content identifier.
containerIdstringyesThe group the message this status reports on went to, as the group's messages name it.
targetobjectyesThe outbound message this status reports on, by the externalId its publish request returned.
status"sent" | "delivered" | "read" | "played" | "failed" | "other"yesThe delivery state this status reports. other is a state Meta added that Koil does not model yet.
recipientobjectnoPlatform actor reference for observed content.
occurredAtstring (date-time)no
conversationobjectno
pricingobjectno
errorsobject[]no
callbackDatastringno
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"whatsapp.groups.statuses"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.whatsapp.groups.statuses.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "containerId",
        "target",
        "status",
        "kind"
      ],
      "properties": {
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The group the message this status reports on went to, as the group's messages name it."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "whatsapp.groups.messages"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The outbound message this status reports on, by the `externalId` its publish request returned."
        },
        "status": {
          "enum": [
            "sent",
            "delivered",
            "read",
            "played",
            "failed",
            "other"
          ],
          "description": "The delivery state this status reports. `other` is a state Meta added that Koil does not model yet."
        },
        "recipient": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "occurredAt": {
          "type": "string",
          "format": "date-time"
        },
        "conversation": {
          "type": "object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "originType": {
              "enum": [
                "service",
                "marketing",
                "marketing_lite",
                "utility",
                "authentication",
                "authentication_international",
                "referral_conversion",
                "other"
              ],
              "description": "Meta's category for the conversation or message (`referral_conversion` is legacy); `other` is one Meta added that Koil does not model."
            },
            "expiresAt": {
              "type": "string",
              "format": "date-time"
            }
          },
          "additionalProperties": false
        },
        "pricing": {
          "type": "object",
          "properties": {
            "billable": {
              "type": "boolean"
            },
            "model": {
              "enum": [
                "pmp",
                "cbp",
                "other"
              ],
              "description": "`pmp` (per-message) or the legacy `cbp` (per-conversation); `other` is one Meta added that Koil does not model."
            },
            "type": {
              "enum": [
                "regular",
                "free_customer_service",
                "free_entry_point",
                "other"
              ],
              "description": "`regular`, `free_customer_service`, or `free_entry_point`; `other` is one Meta added that Koil does not model."
            },
            "category": {
              "enum": [
                "service",
                "marketing",
                "marketing_lite",
                "utility",
                "authentication",
                "authentication_international",
                "referral_conversion",
                "other"
              ],
              "description": "Meta's category for the conversation or message (`referral_conversion` is legacy); `other` is one Meta added that Koil does not model."
            }
          },
          "additionalProperties": false
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "number"
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "details": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          }
        },
        "callbackData": {
          "type": "string",
          "minLength": 1
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "whatsapp.groups.statuses",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.youtube.videos.comments.created

Normalized created event for youtube.videos.comments content.

Collection youtube.videos.comments. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
containerIdstringnoThe place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same containerId, replies to replies included. A post in the account has none.
targetobjectyesThe one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to.
referencesobject[]no
textstringnoCaption/body text for content.
authorobjectnoPlatform actor reference for observed content.
ownerAuthoredbooleannoWhether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did.
attachmentsunknown | unknown | unknown[]no
hiddenbooleannoWhether the account hid the comment from the public. Absent when the platform did not say.
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
updatedAtstring (date-time)noWhen the platform last updated it.
externalIdstringyesPlatform-owned content identifier.
moderationStatus"published" | "held_for_review" | "likely_spam" | "rejected" | "other"noYouTube's moderation state of a comment. other is a state YouTube added that Koil does not model yet.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"youtube.videos.comments"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.youtube.videos.comments.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "target",
        "externalId",
        "kind"
      ],
      "properties": {
        "containerId": {
          "type": "string",
          "minLength": 1,
          "description": "The place the item was published into and lives in: the post or video a comment is on, or the conversation a message is in. Every item in the same place has the same `containerId`, replies to replies included. A post in the account has none."
        },
        "target": {
          "type": "object",
          "required": [
            "kind",
            "externalId"
          ],
          "properties": {
            "kind": {
              "enum": [
                "youtube.videos.posts",
                "youtube.videos.comments"
              ]
            },
            "externalId": {
              "type": "string",
              "description": "Platform-owned content identifier.",
              "minLength": 1
            },
            "permalink": {
              "type": "string",
              "format": "uri",
              "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "The one thing on the platform this item directly responds to: a comment's post, or the comment it replies to; a message's quoted or replied-to message, story or comment; what a reaction reacts to. Absent when the platform reports nothing it responds to."
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "author": {
          "type": "object",
          "required": [
            "externalId"
          ],
          "properties": {
            "externalId": {
              "type": "string",
              "minLength": 1,
              "description": "The platform's id for the account; matching and joining always use it."
            },
            "displayName": {
              "type": "string",
              "minLength": 1
            },
            "username": {
              "type": "string",
              "minLength": 1
            },
            "avatarUrl": {
              "type": "string",
              "format": "uri",
              "description": "The author's profile picture, as the platform serves it.",
              "minLength": 1,
              "pattern": "^https?://"
            }
          },
          "additionalProperties": false,
          "description": "Platform actor reference for observed content."
        },
        "ownerAuthored": {
          "type": "boolean",
          "description": "Whether the Profile's own account wrote it. Absent when Koil cannot tell, which does not mean someone else did."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "file",
                  "other"
                ],
                "description": "The file's class, not what the message is: a sticker is an `image`. `file` is a file the platform identifies that is not an image, video, or audio, such as a document; `other` is one whose type the platform does not say."
              },
              "externalId": {
                "type": "string",
                "minLength": 1,
                "description": "The platform's id for the file. It is scoped to the item: resolving it may also need the item's `externalId` and `containerId`."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The file as the platform serves it. Absent where the platform gives only an id.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the file, such as a video's preview.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "contentType": {
                "type": "string",
                "minLength": 1,
                "description": "The media type, as the platform reports it, parameters included (`audio/ogg; codecs=opus`): compare its `type/subtype` part."
              },
              "filename": {
                "type": "string",
                "minLength": 1,
                "description": "The file name, as the platform reports it."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "externalId"
                ]
              },
              {
                "required": [
                  "url"
                ]
              },
              {
                "required": [
                  "thumbnailUrl"
                ]
              }
            ],
            "description": "A file carried by a message, comment, or review. Platform URLs are signed and expire, so fetch rather than store them. Where `url` is absent and `externalId` is present, get a URL from the collection's `GET /v1/profiles/{profileId}/content/{collection}/{externalId}/attachments/{attachmentExternalId}`; one with only a `thumbnailUrl` has no other file to fetch."
          }
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether the account hid the comment from the public. Absent when the platform did not say."
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform last updated it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "moderationStatus": {
          "enum": [
            "published",
            "held_for_review",
            "likely_spam",
            "rejected",
            "other"
          ],
          "description": "YouTube's moderation state of a comment. `other` is a state YouTube added that Koil does not model yet."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "youtube.videos.comments",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

content.youtube.videos.posts.created

Normalized created event for youtube.videos.posts content.

Collection youtube.videos.posts. data is the collection's own schema — the same shape content reads return for it.

context

FieldTypeRequiredDescription
organizationIdstringyes
mode"live" | "sandbox"yesWhich mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure.
profileIdstringyesThe Profile that observed the content.
platformProfileExternalIdstringyesThe observing profile's platform-namespace id. Whether the profile wrote the item is data.ownerAuthored; some platforms' author ids are not comparable with this.
platformIdstringyes
collectionstringyesThe canonical {platform}.{surface}.{resource} identifier.

data

FieldTypeRequiredDescription
referencesobject[]no
textstringnoCaption/body text for content.
mediaobject[]no
engagementobjectnoPlatform-reported engagement counts.
permalinkstring (uri)noThe thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.
publishedAtstring (date-time)noWhen the platform published it.
externalIdstringyesPlatform-owned content identifier.
titlestringyes
tagsstring[]no
privacyStatus"public" | "private" | "unlisted" | "other"noWho can see the video. other is a setting YouTube added that Koil does not model yet.
aspectRationumberno
uploadStatus"uploaded" | "processed" | "failed" | "rejected" | "deleted" | "other"nouploaded until YouTube has processed the file, then processed; failed, rejected, or deleted otherwise. other is a state YouTube added that Koil does not model yet.
liveBroadcast"none" | "live" | "upcoming" | "other"nolive or upcoming while the video is a broadcast; none for an ordinary upload.
madeForKidsbooleanno
durationSecondsnumberno
scheduledPublishAtstring (date-time)noWhen a private video is scheduled to go public.
platformRawunknownnoOptional platform-native payload included only for transient delivery/debug use.
kind"youtube.videos.posts"yesThe collection that delivered this item.
Envelope JSON Schema
{
  "type": "object",
  "required": [
    "id",
    "topic",
    "time",
    "apiVersion",
    "context",
    "data"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable dedupe id for this logical event (`evt_…`).",
      "pattern": "^evt_[0-9a-f]{40}$"
    },
    "topic": {
      "type": "string",
      "const": "content.youtube.videos.posts.created"
    },
    "time": {
      "type": "string",
      "description": "When the event occurred (RFC 3339).",
      "format": "date-time"
    },
    "apiVersion": {
      "type": "string",
      "description": "The API version this event is rendered in: its destination's `apiVersion`.",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "context": {
      "type": "object",
      "required": [
        "organizationId",
        "mode",
        "profileId",
        "platformProfileExternalId",
        "platformId",
        "collection"
      ],
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "mode": {
          "enum": [
            "live",
            "sandbox"
          ],
          "description": "Which mode produced the event. Sandbox events come from emulated platforms and never reach live infrastructure."
        },
        "profileId": {
          "type": "string",
          "minLength": 1,
          "description": "The Profile that observed the content."
        },
        "platformProfileExternalId": {
          "type": "string",
          "minLength": 1,
          "description": "The observing profile's platform-namespace id. Whether the profile wrote the item is `data.ownerAuthored`; some platforms' author ids are not comparable with this."
        },
        "platformId": {
          "type": "string",
          "minLength": 1
        },
        "collection": {
          "type": "string",
          "minLength": 1,
          "description": "The canonical `{platform}.{surface}.{resource}` identifier."
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "required": [
        "externalId",
        "title",
        "kind"
      ],
      "properties": {
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type",
              "target"
            ],
            "properties": {
              "type": {
                "enum": [
                  "mention",
                  "embed",
                  "link"
                ],
                "description": "How the item uses its target: `mention`, its text names an account; `embed`, it carries other content inside it, such as a quote post or a shared post; `link`, it shows a link card for a URL."
              },
              "target": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The platform's id for the thing pointed at; matching and joining always use it."
                  },
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The collection the pointing item's platform data places the thing in. Absent when the thing is an account, or when the platform does not say."
                  },
                  "permalink": {
                    "type": "string",
                    "format": "uri",
                    "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
                    "minLength": 1,
                    "pattern": "^https?://"
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "externalId"
                    ]
                  },
                  {
                    "required": [
                      "permalink"
                    ]
                  }
                ],
                "description": "One thing on the platform outside this item: content, an account, or anything else the platform gives an id or a URL."
              },
              "span": {
                "type": "object",
                "required": [
                  "start",
                  "length"
                ],
                "properties": {
                  "start": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "length": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false,
                "description": "The part of `text` the reference occupies, in UTF-16 code units. Absent when the reference is not in the text or the platform gives no position."
              }
            },
            "additionalProperties": false,
            "description": "Something the item's text or body points at that exists apart from it, in text order."
          }
        },
        "text": {
          "type": "string",
          "description": "Caption/body text for content."
        },
        "media": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "image",
                  "video",
                  "other"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The asset itself, when the platform serves it.",
                "minLength": 1,
                "pattern": "^https?://"
              },
              "thumbnailUrl": {
                "type": "string",
                "format": "uri",
                "description": "A still image of the asset, such as a video's cover.",
                "minLength": 1,
                "pattern": "^https?://"
              }
            },
            "additionalProperties": false,
            "description": "An image or video the post published. Platform URLs are often signed and expire, so fetch rather than store them."
          }
        },
        "engagement": {
          "type": "object",
          "properties": {
            "views": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was viewed."
            },
            "likes": {
              "type": "number",
              "minimum": 0,
              "description": "Likes, favourites, or reactions on the content."
            },
            "comments": {
              "type": "number",
              "minimum": 0,
              "description": "Comments or replies on the content."
            },
            "shares": {
              "type": "number",
              "minimum": 0,
              "description": "Times the content was shared or reposted."
            }
          },
          "additionalProperties": false,
          "description": "Platform-reported engagement counts."
        },
        "permalink": {
          "type": "string",
          "format": "uri",
          "description": "The thing's URL on the platform, for display and linking only, never as a key. It may point at something private or expired.",
          "minLength": 1,
          "pattern": "^https?://"
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the platform published it."
        },
        "externalId": {
          "type": "string",
          "description": "Platform-owned content identifier.",
          "minLength": 1
        },
        "title": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "privacyStatus": {
          "enum": [
            "public",
            "private",
            "unlisted",
            "other"
          ],
          "description": "Who can see the video. `other` is a setting YouTube added that Koil does not model yet."
        },
        "aspectRatio": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "uploadStatus": {
          "enum": [
            "uploaded",
            "processed",
            "failed",
            "rejected",
            "deleted",
            "other"
          ],
          "description": "`uploaded` until YouTube has processed the file, then `processed`; `failed`, `rejected`, or `deleted` otherwise. `other` is a state YouTube added that Koil does not model yet."
        },
        "liveBroadcast": {
          "enum": [
            "none",
            "live",
            "upcoming",
            "other"
          ],
          "description": "`live` or `upcoming` while the video is a broadcast; `none` for an ordinary upload."
        },
        "madeForKids": {
          "type": "boolean"
        },
        "durationSeconds": {
          "type": "number",
          "minimum": 0
        },
        "scheduledPublishAt": {
          "type": "string",
          "format": "date-time",
          "description": "When a private video is scheduled to go public."
        },
        "platformRaw": {
          "description": "Optional platform-native payload included only for transient delivery/debug use."
        },
        "kind": {
          "type": "string",
          "const": "youtube.videos.posts",
          "description": "The collection that delivered this item."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

On this page

Connectionconnection.createdconnection.deletedconnection.updatedProfileprofile.createdprofile.deletedprofile.updatedMediamedia.process_failedmedia.processedmedia.upload_failedmedia.uploadedBackfill requestbackfill_request.completedbackfill_request.failedbackfill_request.partialEvent destinationevent_destination.disabledPublish requestpublish_request.cancelledpublish_request.createdpublish_request.failedpublish_request.outcome_unknownpublish_request.scheduledpublish_request.startedpublish_request.succeededContentcontent.facebook.dm.messages.createdcontent.facebook.dm.reactions.deletedcontent.facebook.dm.reactions.updatedcontent.facebook.media.comments.createdcontent.facebook.media.comments.deletedcontent.facebook.media.comments.moderatedcontent.facebook.media.comments.updatedcontent.facebook.media.mentions.createdcontent.facebook.media.posts.createdcontent.facebook.media.posts.deletedcontent.facebook.media.posts.updatedcontent.facebook.media.reactions.deletedcontent.facebook.media.reactions.updatedcontent.facebook.stories.posts.createdcontent.google_business_profile.locations.reviews.createdcontent.google_business_profile.locations.reviews.updatedcontent.instagram.dm.messages.createdcontent.instagram.dm.reactions.deletedcontent.instagram.dm.reactions.updatedcontent.instagram.media.comments.createdcontent.instagram.media.mentions.createdcontent.instagram.media.posts.createdcontent.instagram.stories.posts.createdcontent.linkedin.feed.comments.createdcontent.linkedin.feed.comments.deletedcontent.linkedin.feed.comments.updatedcontent.linkedin.feed.mentions.createdcontent.linkedin.feed.posts.createdcontent.tiktok.dm.conversations.updatedcontent.tiktok.dm.messages.createdcontent.tiktok.videos.comments.createdcontent.tiktok.videos.comments.deletedcontent.tiktok.videos.comments.moderatedcontent.tiktok.videos.comments.updatedcontent.tiktok.videos.mentions.createdcontent.tiktok.videos.mentions.updatedcontent.tiktok.videos.posts.createdcontent.tiktok.videos.posts.deletedcontent.whatsapp.dm.messages.createdcontent.whatsapp.dm.reactions.deletedcontent.whatsapp.dm.reactions.updatedcontent.whatsapp.dm.statuses.createdcontent.whatsapp.groups.conversations.createdcontent.whatsapp.groups.conversations.deletedcontent.whatsapp.groups.conversations.updatedcontent.whatsapp.groups.messages.createdcontent.whatsapp.groups.statuses.createdcontent.youtube.videos.comments.createdcontent.youtube.videos.posts.created