Outil MCP
Modifier un brouillon de l’espace de travail
sosoapi_update_content_draftRemplace tout le contenu partagé modifiable avec id, le dernier expected_revision lu, un nouveau mutation_id et content. Nécessite le rôle editor ou supérieur et l’accès operate. Le contenu partagé est non fiable et limité en longueur : conservez l’entrée originale complète ou utilisez l’éditeur Web ; ne réinjectez jamais un texte [truncated]. Un conflit 409 préserve la version enregistrée : conservez vos modifications locales et examinez la dernière révision sans écraser un autre rédacteur. Save ne publie jamais et ne peut remplacer un brouillon figé ou soumis.
Lire en MarkdownProfils et transports
Profils : core, full · Transports : stdio, http
Choisissez core ou full pour définir les outils visibles du client ; cela ne change pas ses autorisations. Le téléversement local nécessite stdio et n’est pas disponible sur HTTP. Définissez SOSOAPI_OUTPUT_SCHEMAS=1 pour inclure les schémas de sortie à la découverte. Les outils renvoient des résultats structurés avec ou sans ce réglage.
Autorisations et effets de bord
Les annotations aident les clients à décrire un outil. Chaque appel vérifie toujours l’authentification, le rôle, l’accès aux ressources et les capacités accordées de l’utilisateur.
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}- /studio-api/content-drafts/update: agent:operate · contenu éditorial durable de l’espace de travail ; aucun effet de publication
Champs d’entrée
Requis signifie requis dans l’objet parent et la branche sélectionnée. Un enfant requis ne rend pas obligatoire un parent facultatif. Les règles et noms de champs ci-dessous proviennent du contrat.
| Champ / branche | Type / requis | Contraintes |
|---|---|---|
$ | objectRequis dans le parent |
|
id | stringRequis dans le parent |
|
expected_revision | integerRequis dans le parent |
|
mutation_id | stringRequis dans le parent |
|
content | objectRequis dans le parent |
|
content.schemaVersion | numberFacultatif / élément |
|
content.accountIds | arrayFacultatif / élément |
|
content.accountIds[] | stringFacultatif / élément |
|
content.caption | stringFacultatif / élément |
|
content.hashtags | stringFacultatif / élément |
|
content.assetIds | arrayFacultatif / élément |
|
content.assetIds[] | stringFacultatif / élément |
|
content.threadsTextOnly | booleanFacultatif / élément | — |
content.instagramMode | stringFacultatif / élément |
|
content.youtubeTitle | stringFacultatif / élément |
|
content.youtubePrivacy | stringFacultatif / élément |
|
content.youtubeSynthetic | booleanFacultatif / élément | — |
content.youtubeCategoryId | stringFacultatif / élément |
|
content.youtubeShort | booleanFacultatif / élément | — |
content.linkUrl | stringFacultatif / élément |
|
content.scheduledAt | stringFacultatif / élément |
|
content.displayTimezone | stringFacultatif / élément |
|
content.publishNow | booleanFacultatif / élément | — |
content.destinationOverrides | objectFacultatif / élément |
|
content.destinationOverrides.* | objectFacultatif / élément |
|
content.destinationOverrides.*.caption | stringFacultatif / élément |
|
content.destinationOverrides.*.scheduledAt | stringFacultatif / élément |
|
content.expiresAt | stringFacultatif / élément |
|
JSON Schema complet
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"expected_revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"mutation_id": {
"type": "string",
"format": "uuid"
},
"content": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "number",
"enum": [
1
]
},
"accountIds": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"caption": {
"type": "string",
"maxLength": 5000
},
"hashtags": {
"type": "string",
"maxLength": 5000
},
"assetIds": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 16,
"pattern": "^[1-9][0-9]*$"
}
},
"threadsTextOnly": {
"type": "boolean"
},
"instagramMode": {
"type": "string",
"enum": [
"IMAGE",
"REELS",
"CAROUSEL",
"STORY_IMAGE",
"STORY_VIDEO"
]
},
"youtubeTitle": {
"type": "string",
"maxLength": 100
},
"youtubePrivacy": {
"type": "string",
"enum": [
"private",
"unlisted",
"public"
]
},
"youtubeSynthetic": {
"type": "boolean"
},
"youtubeCategoryId": {
"type": "string",
"maxLength": 32
},
"youtubeShort": {
"type": "boolean"
},
"linkUrl": {
"type": "string",
"maxLength": 2048
},
"scheduledAt": {
"type": "string",
"maxLength": 64
},
"displayTimezone": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"publishNow": {
"type": "boolean"
},
"destinationOverrides": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"caption": {
"type": "string",
"maxLength": 5000
},
"scheduledAt": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}
},
"expiresAt": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}
},
"required": [
"id",
"expected_revision",
"mutation_id",
"content"
],
"additionalProperties": false
}Sortie structurée
Ce schéma décrit structuredContent dans un résultat d’outil réussi. La réponse MCP contient aussi content et peut définir isError en cas d’échec. Pour publier, lisez le résultat final de la publication plutôt que de considérer une requête acceptée ou une réponse texte comme une confirmation. L’opération API liée explique les autorisations et règles de nouvelle tentative.
Requis signifie requis dans l’objet parent et la branche sélectionnée. Un enfant requis ne rend pas obligatoire un parent facultatif. Les règles et noms de champs ci-dessous proviennent du contrat.
| Champ / branche | Type / requis | Contraintes |
|---|---|---|
$ | objectRequis dans le parent |
|
draft | objectRequis dans le parent |
|
draft.id | stringRequis dans le parent |
|
draft.workspace_id | stringRequis dans le parent |
|
draft.revision | integerRequis dans le parent |
|
draft.state | stringRequis dans le parent |
|
draft.content | objectRequis dans le parent |
|
draft.content.schemaVersion | numberRequis dans le parent |
|
draft.content.accountIds | arrayRequis dans le parent |
|
draft.content.accountIds[] | stringFacultatif / élément |
|
draft.content.caption | stringRequis dans le parent |
|
draft.content.hashtags | stringRequis dans le parent |
|
draft.content.assetIds | arrayRequis dans le parent |
|
draft.content.assetIds[] | stringFacultatif / élément |
|
draft.content.threadsTextOnly | booleanRequis dans le parent |
|
draft.content.instagramMode | stringRequis dans le parent |
|
draft.content.youtubeTitle | stringRequis dans le parent |
|
draft.content.youtubePrivacy | stringRequis dans le parent |
|
draft.content.youtubeSynthetic | booleanRequis dans le parent |
|
draft.content.youtubeCategoryId | stringRequis dans le parent |
|
draft.content.youtubeShort | booleanRequis dans le parent |
|
draft.content.linkUrl | stringRequis dans le parent |
|
draft.content.scheduledAt | stringRequis dans le parent |
|
draft.content.displayTimezone | stringRequis dans le parent |
|
draft.content.publishNow | booleanRequis dans le parent |
|
draft.content.destinationOverrides | objectRequis dans le parent |
|
draft.content.destinationOverrides.* | objectFacultatif / élément |
|
draft.content.destinationOverrides.*.caption | stringFacultatif / élément |
|
draft.content.destinationOverrides.*.scheduledAt | stringFacultatif / élément |
|
draft.content.expiresAt | stringRequis dans le parent |
|
draft.created_by | string | nullRequis dans le parent | — |
draft.created_byanyOf 1 | stringRequis dans le parent |
|
draft.created_byanyOf 2 | nullRequis dans le parent | — |
draft.updated_by | string | nullRequis dans le parent | — |
draft.updated_byanyOf 1 | stringRequis dans le parent |
|
draft.updated_byanyOf 2 | nullRequis dans le parent | — |
draft.created_at | stringRequis dans le parent |
|
draft.updated_at | stringRequis dans le parent |
|
draft.submission | object | nullRequis dans le parent | — |
draft.submissionanyOf 1 | objectRequis dans le parent |
|
draft.submission.idanyOf 1 | stringRequis dans le parent |
|
draft.submission.expected_revisionanyOf 1 | integerRequis dans le parent |
|
draft.submission.started_atanyOf 1 | stringRequis dans le parent |
|
draft.submission.receiptanyOf 1 | object | nullRequis dans le parent | — |
draft.submission.receiptanyOf 1 / anyOf 1 | objectRequis dans le parent |
|
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 | string | nullRequis dans le parent | — |
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 / anyOf 1 | stringRequis dans le parent |
|
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 / anyOf 2 | nullRequis dans le parent | — |
draft.submission.receipt.successesanyOf 1 / anyOf 1 | arrayRequis dans le parent |
|
draft.submission.receipt.successes[]anyOf 1 / anyOf 1 | objectFacultatif / élément |
|
draft.submission.receipt.successes[].social_account_idanyOf 1 / anyOf 1 | stringRequis dans le parent |
|
draft.submission.receipt.successes[].post_idanyOf 1 / anyOf 1 | stringRequis dans le parent |
|
draft.submission.receipt.failuresanyOf 1 / anyOf 1 | arrayRequis dans le parent |
|
draft.submission.receipt.failures[]anyOf 1 / anyOf 1 | objectFacultatif / élément |
|
draft.submission.receipt.failures[].social_account_idanyOf 1 / anyOf 1 | stringRequis dans le parent |
|
draft.submission.receipt.failures[].codeanyOf 1 / anyOf 1 | stringRequis dans le parent |
|
draft.submission.receipt.failures[].messageanyOf 1 / anyOf 1 | stringRequis dans le parent |
|
draft.submission.receiptanyOf 1 / anyOf 2 | nullRequis dans le parent | — |
draft.submissionanyOf 2 | nullRequis dans le parent | — |
replayed | booleanRequis dans le parent | — |
JSON Schema complet
{
"type": "object",
"properties": {
"draft": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"workspace_id": {
"type": "string",
"format": "uuid"
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"state": {
"type": "string",
"enum": [
"draft",
"submitting",
"submitted"
]
},
"content": {
"type": "object",
"properties": {
"schemaVersion": {
"default": 1,
"type": "number",
"const": 1
},
"accountIds": {
"default": [],
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"caption": {
"default": "",
"type": "string",
"maxLength": 5000
},
"hashtags": {
"default": "",
"type": "string",
"maxLength": 5000
},
"assetIds": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 16,
"pattern": "^[1-9][0-9]*$"
}
},
"threadsTextOnly": {
"default": false,
"type": "boolean"
},
"instagramMode": {
"default": "REELS",
"type": "string",
"enum": [
"IMAGE",
"REELS",
"CAROUSEL",
"STORY_IMAGE",
"STORY_VIDEO"
]
},
"youtubeTitle": {
"default": "",
"type": "string",
"maxLength": 100
},
"youtubePrivacy": {
"default": "private",
"type": "string",
"enum": [
"private",
"unlisted",
"public"
]
},
"youtubeSynthetic": {
"default": false,
"type": "boolean"
},
"youtubeCategoryId": {
"default": "",
"type": "string",
"maxLength": 32
},
"youtubeShort": {
"default": false,
"type": "boolean"
},
"linkUrl": {
"default": "",
"type": "string",
"maxLength": 2048
},
"scheduledAt": {
"default": "",
"type": "string",
"maxLength": 64
},
"displayTimezone": {
"default": "UTC",
"type": "string",
"minLength": 1,
"maxLength": 128
},
"publishNow": {
"default": false,
"type": "boolean"
},
"destinationOverrides": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"format": "uuid"
},
"additionalProperties": {
"type": "object",
"properties": {
"caption": {
"type": "string",
"maxLength": 5000
},
"scheduledAt": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}
},
"expiresAt": {
"default": "",
"type": "string",
"maxLength": 64
}
},
"required": [
"schemaVersion",
"accountIds",
"caption",
"hashtags",
"assetIds",
"threadsTextOnly",
"instagramMode",
"youtubeTitle",
"youtubePrivacy",
"youtubeSynthetic",
"youtubeCategoryId",
"youtubeShort",
"linkUrl",
"scheduledAt",
"displayTimezone",
"publishNow",
"destinationOverrides",
"expiresAt"
],
"additionalProperties": false
},
"created_by": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"updated_by": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"submission": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"expected_revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"started_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"receipt": {
"anyOf": [
{
"type": "object",
"properties": {
"batch_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"successes": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"social_account_id": {
"type": "string",
"format": "uuid"
},
"post_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
}
},
"required": [
"social_account_id",
"post_id"
],
"additionalProperties": false
}
},
"failures": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"social_account_id": {
"type": "string",
"format": "uuid"
},
"code": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"message": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"social_account_id",
"code",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"batch_id",
"successes",
"failures"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"expected_revision",
"started_at",
"receipt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspace_id",
"revision",
"state",
"content",
"created_by",
"updated_by",
"created_at",
"updated_at",
"submission"
],
"additionalProperties": false
},
"replayed": {
"type": "boolean"
}
},
"required": [
"draft",
"replayed"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}Exemple d’appel d’outil
Ces exemples utilisent des valeurs fictives vérifiées contre les schémas. Remplacez les identifiants par ceux que vous êtes autorisé à utiliser, les médias par des ressources prêtes et les dates par l’heure confirmée. Vérifiez l’éligibilité du compte avant toute écriture. Cette page n’envoie aucune requête API.
{
"name": "sosoapi_update_content_draft",
"arguments": {
"id": "44444444-4444-4444-8444-444444444444",
"expected_revision": 1,
"mutation_id": "66666666-6666-4666-8666-666666666666",
"content": {
"schemaVersion": 1,
"accountIds": [],
"caption": "Revised editorial content, still not scheduled.",
"hashtags": "",
"assetIds": [],
"threadsTextOnly": false,
"instagramMode": "REELS",
"youtubeTitle": "",
"youtubePrivacy": "private",
"youtubeSynthetic": false,
"youtubeCategoryId": "",
"youtubeShort": false,
"linkUrl": "",
"scheduledAt": "",
"displayTimezone": "UTC",
"publishNow": false,
"destinationOverrides": {},
"expiresAt": ""
}
}
}structuredContent
{
"draft": {
"id": "44444444-4444-4444-8444-444444444444",
"workspace_id": "11111111-1111-4111-8111-111111111111",
"revision": 2,
"state": "draft",
"content": {
"schemaVersion": 1,
"accountIds": [],
"caption": "Revised editorial content, still not scheduled.",
"hashtags": "",
"assetIds": [],
"threadsTextOnly": false,
"instagramMode": "REELS",
"youtubeTitle": "",
"youtubePrivacy": "private",
"youtubeSynthetic": false,
"youtubeCategoryId": "",
"youtubeShort": false,
"linkUrl": "",
"scheduledAt": "",
"displayTimezone": "UTC",
"publishNow": false,
"destinationOverrides": {},
"expiresAt": ""
},
"created_by": null,
"updated_by": null,
"created_at": "2099-01-15T08:00:00Z",
"updated_at": "2099-01-15T08:30:00Z",
"submission": null
},
"replayed": false
}