ProvidersTikTok

TikTok

TikTok business accounts through your TikTok API for Business app ("TikTok Accounts").

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

  • video and photo are publish variants of tiktok.posts.items.
  • There is no live surface: TikTok publishes no LIVE API.
  • Koil registers your app's webhook callbacks with TikTok itself, per event family and only while an Event Destination is subscribed to a topic that family feeds, so there is no developer-console step.

Publishing is not yet usable

TikTok pulls post media only from a URL whose domain or prefix your app has verified as a URL property, and Koil currently serves staged media from an origin no customer can verify. A publish is rejected up front with that reason rather than failing minutes later. Reading, replying, moderating, and messaging are unaffected.
Content typeOperationsEventsBackfill
tiktok.posts.itemslist, get, publishcreated, deletedno
tiktok.posts.commentslist, get, publish, moderate, deletecreated, updated, deleted, moderatedno
tiktok.posts.mentionslist, getcreated, updatedno
tiktok.dm.threadslistupdatedno
tiktok.dm.messageslist, publishcreatedno

tiktok.posts.items

The account's public video and photo posts.

list

List the TikTok account's public posts, newest first.

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

get

Get one TikTok post by provider id.

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

publish

Publish a TikTok video or photo post.

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

variant: "video"

FieldTypeRequiredDescription
textstringnoCaption; hashtags and @mentions render as plain text. Up to 2,200 UTF-16 code units and 30 mentions.
mediaobject | object[]yes
brandOrganicbooleanyesLabel the post as promotional content for the account's own business.
brandedContentbooleanyesLabel the post as a paid partnership with a brand.
disableCommentbooleanno
disableDuetbooleanno
disableStitchbooleanno
thumbnailOffsetMsintegerno
customThumbnailUrlstringnoCover image for the video, as a URL on a URL property the app has verified — the same rule the staged video URL follows. JPG, JPEG, WebP or PNG, 360×360 to 1080×1920 (or 1920×1080), within 20 MB. Cannot be combined with thumbnailOffsetMs, which TikTok ignores when a cover URL is set.
aiGeneratedbooleannoLabel the post as AI-generated; cannot be changed once posted.
draftbooleannoDeliver to the creator's TikTok inbox as a draft instead of publishing; needs the video.upload scope and ignores every other post setting.
schedulingobjectnoFuture operation time and optional wall-clock timezone.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "text": {
      "description": "Caption; hashtags and @mentions render as plain text. Up to 2,200 UTF-16 code units and 30 mentions.",
      "maxLength": 2200,
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "pattern": "^video/",
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "pattern": "^video/",
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    },
    "brandOrganic": {
      "description": "Label the post as promotional content for the account's own business.",
      "type": "boolean"
    },
    "brandedContent": {
      "description": "Label the post as a paid partnership with a brand.",
      "type": "boolean"
    },
    "disableComment": {
      "type": "boolean"
    },
    "disableDuet": {
      "type": "boolean"
    },
    "disableStitch": {
      "type": "boolean"
    },
    "thumbnailOffsetMs": {
      "minimum": 0,
      "type": "integer"
    },
    "customThumbnailUrl": {
      "description": "Cover image for the video, as a URL on a URL property the app has verified — the same rule the staged video URL follows. JPG, JPEG, WebP or PNG, 360×360 to 1080×1920 (or 1920×1080), within 20 MB. Cannot be combined with thumbnailOffsetMs, which TikTok ignores when a cover URL is set.",
      "minLength": 1,
      "type": "string"
    },
    "aiGenerated": {
      "description": "Label the post as AI-generated; cannot be changed once posted.",
      "type": "boolean"
    },
    "draft": {
      "description": "Deliver to the creator's TikTok inbox as a draft instead of publishing; needs the video.upload scope and ignores every other post setting.",
      "type": "boolean"
    },
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    }
  },
  "required": [
    "media",
    "brandOrganic",
    "brandedContent"
  ]
}

variant: "photo"

FieldTypeRequiredDescription
titlestringno
textstringnoCaption; hashtags and @mentions render as plain text. Up to 4,000 UTF-16 code units and 30 mentions.
mediaobject | object[]yes
privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"yes
coverIndexintegernoWhich image is the cover; defaults to the first.
autoAddMusicbooleanno
brandOrganicbooleanyesLabel the post as promotional content for the account's own business.
brandedContentbooleanyesLabel the post as a paid partnership with a brand.
disableCommentbooleanno
draftbooleannoDeliver to the creator's TikTok inbox as a draft instead of publishing; needs the video.upload scope and keeps only the title and caption.
schedulingobjectnoFuture operation time and optional wall-clock timezone.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "title": {
      "maxLength": 90,
      "type": "string"
    },
    "text": {
      "description": "Caption; hashtags and @mentions render as plain text. Up to 4,000 UTF-16 code units and 30 mentions.",
      "maxLength": 4000,
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 35,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    },
    "privacyLevel": {
      "anyOf": [
        {
          "const": "PUBLIC_TO_EVERYONE",
          "type": "string"
        },
        {
          "const": "MUTUAL_FOLLOW_FRIENDS",
          "type": "string"
        },
        {
          "const": "FOLLOWER_OF_CREATOR",
          "type": "string"
        },
        {
          "const": "SELF_ONLY",
          "type": "string"
        }
      ]
    },
    "coverIndex": {
      "minimum": 0,
      "description": "Which image is the cover; defaults to the first.",
      "type": "integer"
    },
    "autoAddMusic": {
      "type": "boolean"
    },
    "brandOrganic": {
      "description": "Label the post as promotional content for the account's own business.",
      "type": "boolean"
    },
    "brandedContent": {
      "description": "Label the post as a paid partnership with a brand.",
      "type": "boolean"
    },
    "disableComment": {
      "type": "boolean"
    },
    "draft": {
      "description": "Deliver to the creator's TikTok inbox as a draft instead of publishing; needs the video.upload scope and keeps only the title and caption.",
      "type": "boolean"
    },
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    }
  },
  "required": [
    "media",
    "privacyLevel",
    "brandOrganic",
    "brandedContent"
  ]
}

Not offered

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

Events

Backfill: not offered — not implemented.

Item schema

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

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
variant"video" | "photo"yes
textstringnoCaption/body text for content.
mediaobject[]no
providerPermalinkstring (uri)noCanonical provider URL for content.
embedUrlstringno
engagementobjectnoProvider-reported engagement counts.
durationSecondsnumberno
isAdbooleanno
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"tiktok.posts.items"yes

tiktok.posts.comments

Comments on the account's posts, and replies to them.

list

List comments on one TikTok post, or the replies to one of its comments.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
mediaExternalIdstringyes
parentExternalIdstringno
includeRepliesbooleannoInclude up to three replies inline under each top-level comment.
status"PUBLIC" | "ALL"noVisibility filter; defaults to ALL (hidden included).
sort"likes" | "replies" | "create_time"no
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "mediaExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "parentExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "includeReplies": {
      "description": "Include up to three replies inline under each top-level comment.",
      "type": "boolean"
    },
    "status": {
      "description": "Visibility filter; defaults to ALL (hidden included).",
      "anyOf": [
        {
          "const": "PUBLIC",
          "type": "string"
        },
        {
          "const": "ALL",
          "type": "string"
        }
      ]
    },
    "sort": {
      "anyOf": [
        {
          "const": "likes",
          "type": "string"
        },
        {
          "const": "replies",
          "type": "string"
        },
        {
          "const": "create_time",
          "type": "string"
        }
      ]
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "mediaExternalId"
  ]
}

get

Get one TikTok comment by provider id.

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

publish

Publish a TikTok comment: a top-level comment on a post, or a reply to a comment or a comment mention. The body is text, one image, or both.

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

FieldTypeRequiredDescription
targetobjectyesThe provider content this publish targets, identified as events identify it.
mediaExternalIdstringno
textstringyesComment text, up to 1,200 UTF-8 characters.
mediaobject | object[]noAt most one image; a TikTok comment carries a single picture.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "target": {
      "additionalProperties": false,
      "description": "The provider content this publish targets, identified as events identify it.",
      "type": "object",
      "properties": {
        "contentType": {
          "anyOf": [
            {
              "const": "tiktok.posts.comments",
              "type": "string"
            },
            {
              "const": "tiktok.posts.items",
              "type": "string"
            },
            {
              "const": "tiktok.posts.mentions",
              "type": "string"
            }
          ]
        },
        "externalId": {
          "description": "Provider-owned content identifier.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "contentType",
        "externalId"
      ]
    },
    "mediaExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "text": {
      "description": "Comment text, up to 1,200 UTF-8 characters.",
      "minLength": 1,
      "maxLength": 1200,
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "description": "At most one image; a TikTok comment carries a single picture.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    }
  },
  "required": [
    "target",
    "text"
  ]
}
FieldTypeRequiredDescription
targetobjectyesThe provider content this publish targets, identified as events identify it.
mediaExternalIdstringno
textstringnoComment text, up to 1,200 UTF-8 characters.
mediaobject | object[]yesAt most one image; a TikTok comment carries a single picture.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "target": {
      "additionalProperties": false,
      "description": "The provider content this publish targets, identified as events identify it.",
      "type": "object",
      "properties": {
        "contentType": {
          "anyOf": [
            {
              "const": "tiktok.posts.comments",
              "type": "string"
            },
            {
              "const": "tiktok.posts.items",
              "type": "string"
            },
            {
              "const": "tiktok.posts.mentions",
              "type": "string"
            }
          ]
        },
        "externalId": {
          "description": "Provider-owned content identifier.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "contentType",
        "externalId"
      ]
    },
    "mediaExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "text": {
      "description": "Comment text, up to 1,200 UTF-8 characters.",
      "minLength": 1,
      "maxLength": 1200,
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "description": "At most one image; a TikTok comment carries a single picture.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    }
  },
  "required": [
    "target",
    "media"
  ]
}

moderate

Hide, unhide, like, or unlike a TikTok comment.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
mediaExternalIdstringnoThe post the comment is on. Required for hide and unhide; ignored by like and unlike, which TikTok addresses by comment id alone.
action"hide" | "unhide" | "like" | "unlike"yes
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "mediaExternalId": {
      "minLength": 1,
      "description": "The post the comment is on. Required for hide and unhide; ignored by like and unlike, which TikTok addresses by comment id alone.",
      "type": "string"
    },
    "action": {
      "anyOf": [
        {
          "const": "hide",
          "type": "string"
        },
        {
          "const": "unhide",
          "type": "string"
        },
        {
          "const": "like",
          "type": "string"
        },
        {
          "const": "unlike",
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "connectedProfileId",
    "externalId",
    "action"
  ]
}

delete

Delete a TikTok comment the account made.

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

Not offered

  • update: provider not supported

Events

Backfill: not offered — not implemented.

Item schema

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

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
mediaExternalIdstringyes
textstringnoCaption/body text for content.
mediaobject[]no
authorobjectnoProvider actor reference for observed content.
threadobjectnoParent/root identifiers for threaded contexts.
hiddenbooleanno
pinnedbooleanno
likedbooleanno
ownerAuthoredbooleanno
engagementobjectnoProvider-reported engagement counts.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"tiktok.posts.comments"yes

tiktok.posts.mentions

@-mentions of the account in other users' captions and comments.

list

List the top mentions of the TikTok account in other users' captions or comments.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
variant"caption" | "comment"yes
daysintegernoLook-back window in days; defaults to 90.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "variant": {
      "anyOf": [
        {
          "const": "caption",
          "type": "string"
        },
        {
          "const": "comment",
          "type": "string"
        }
      ]
    },
    "days": {
      "minimum": 1,
      "maximum": 90,
      "description": "Look-back window in days; defaults to 90.",
      "type": "integer"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "variant"
  ]
}

get

Get one mention in full, hydrating a mention event: TikTok's webhook payload carries no engagement counts or thumbnail, and no comment text or author handle for a comment mention. Details stay readable for 48 hours after the webhook.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyesThe mention's id: the comment id for a comment mention, the post id for a caption mention.
mediaExternalIdstringyes
variant"caption" | "comment"yes
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "description": "The mention's id: the comment id for a comment mention, the post id for a caption mention.",
      "type": "string"
    },
    "mediaExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "variant": {
      "anyOf": [
        {
          "const": "caption",
          "type": "string"
        },
        {
          "const": "comment",
          "type": "string"
        }
      ]
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId",
    "mediaExternalId",
    "variant"
  ]
}

Not offered

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

Events

Backfill: not offered — not implemented.

Item schema

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

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
variant"caption" | "comment"yes
mediaExternalIdstringyes
commentExternalIdstringno
textstringnoCaption/body text for content.
authorobjectnoProvider actor reference for observed content.
mediaobject[]no
providerPermalinkstring (uri)noCanonical provider URL for content.
engagementobjectnoProvider-reported engagement counts.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"tiktok.posts.mentions"yes

tiktok.dm.threads

The account's Business Messaging conversations.

list

List the TikTok Business Account's direct-message conversations from the last 90 days.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
variant"stranger" | "single"yesstranger: message requests the account has not replied to; single: conversations it has replied in.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "variant": {
      "description": "stranger: message requests the account has not replied to; single: conversations it has replied in.",
      "anyOf": [
        {
          "const": "stranger",
          "type": "string"
        },
        {
          "const": "single",
          "type": "string"
        }
      ]
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "variant"
  ]
}

Not offered

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

Events

Backfill: not offered — not implemented.

Item schema

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

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
variant"stranger" | "single"no
updatedAtstring (date-time)noProvider update timestamp as an ISO-8601 string.
referralobjectno
lastReadAtstring (date-time)noProvider update timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"tiktok.dm.threads"yes

tiktok.dm.messages

Messages in one Business Messaging conversation.

list

List the 20 most recent messages of one TikTok direct-message conversation.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
threadExternalIdstringyes
resolveMediabooleannoResolve inbound images and videos to a fetchable URL, one extra call per attachment. The URL TikTok mints lasts 24 hours, so ask for it when the media is about to be shown.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "threadExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "resolveMedia": {
      "description": "Resolve inbound images and videos to a fetchable URL, one extra call per attachment. The URL TikTok mints lasts 24 hours, so ask for it when the media is about to be shown.",
      "type": "boolean"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "threadExternalId"
  ]
}

publish

Send a message into a TikTok conversation the user opened: text, optionally quoting one of its messages, or one image.

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

FieldTypeRequiredDescription
threadExternalIdstringyes
textstringyesMessage text, up to 6,000 characters.
targetobjectnoThe provider content this publish targets, identified as events identify it.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "threadExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "text": {
      "description": "Message text, up to 6,000 characters.",
      "minLength": 1,
      "maxLength": 6000,
      "type": "string"
    },
    "target": {
      "additionalProperties": false,
      "description": "The provider content this publish targets, identified as events identify it.",
      "type": "object",
      "properties": {
        "contentType": {
          "const": "tiktok.dm.messages",
          "type": "string"
        },
        "externalId": {
          "description": "Provider-owned content identifier.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "contentType",
        "externalId"
      ]
    }
  },
  "required": [
    "threadExternalId",
    "text"
  ]
}
FieldTypeRequiredDescription
threadExternalIdstringyes
mediaobject | object[]yesOne image; TikTok sends a single picture per message. Staged, then uploaded to TikTok for a media_id.
threadVariant"stranger" | "single"no
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "threadExternalId": {
      "minLength": 1,
      "type": "string"
    },
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "description": "One image; TikTok sends a single picture per message. Staged, then uploaded to TikTok for a media_id.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    },
    "threadVariant": {
      "anyOf": [
        {
          "const": "stranger",
          "type": "string"
        },
        {
          "const": "single",
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "threadExternalId",
    "media"
  ]
}

Not offered

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

Events

Backfill: not offered — not implemented.

Item schema

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

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
threadExternalIdstringyes
kind"text" | "image" | "video" | "sharePost" | "emoji" | "sticker" | "template" | "other"yes
textstringnoCaption/body text for content.
authorobjectnoProvider actor reference for observed content.
recipientobjectnoProvider actor reference for observed content.
threadobjectnoParent/root identifiers for threaded contexts.
attachmentsobject[]no
sourcestringno
autoMessageType"welcomeMessage" | "suggestedQuestion" | "autoReply"no
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"tiktok.dm.messages"yes

On this page