publications_draft
Create draft publications for the selected accounts.
REST · POST /api/v1/operations/publications_draft · MCP · publications_draft
Required scope · publish. Send Idempotency-Key in REST or requestKey in MCP. Replace example IDs and times before running.
Example request body
{
"mediaId": "MEDIA_ID",
"targets": [
{
"accountId": "ACCOUNT_ID"
}
]
}
REST returns the output below directly. In MCP read structuredContent.result. Check the current installation at /api/v1/openapi.json.
For 401 check credential validity. For 403 inspect the role, scopes and selected accounts. For 409 reread the record before retrying.
JSON Schema · Input
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"caption": {
"default": "",
"type": "string",
"maxLength": 12000
},
"hashtags": {
"default": [],
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 100
}
},
"targets": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"caption": {
"type": "string",
"maxLength": 12000
},
"hashtags": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 100
}
},
"title": {
"type": "string",
"maxLength": 200
},
"visibility": {
"type": "string",
"enum": [
"public",
"unlisted",
"private"
]
},
"coverMs": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"madeForKids": {
"type": "boolean"
},
"tiktok": {
"type": "object",
"properties": {
"privacy": {
"type": "string",
"enum": [
"PUBLIC_TO_EVERYONE",
"FOLLOWER_OF_CREATOR",
"MUTUAL_FOLLOW_FRIENDS",
"SELF_ONLY"
]
},
"comment": {
"type": "boolean"
},
"duet": {
"type": "boolean"
},
"stitch": {
"type": "boolean"
},
"commercial": {
"type": "boolean"
},
"ownBrand": {
"type": "boolean"
},
"brandedContent": {
"type": "boolean"
},
"aiGenerated": {
"type": "boolean"
}
},
"additionalProperties": false
},
"accountId": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"accountId"
]
}
}
},
"required": [
"mediaId",
"targets"
],
"additionalProperties": false
}
JSON Schema · Output
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"publications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
}
},
"required": [
"accountId",
"errors",
"id"
],
"additionalProperties": {}
}
}
},
"required": [
"groupId",
"publications"
],
"additionalProperties": {}
}