A busca carrega apenas quando você a usa. Explore todas as categorias abaixo.

Agendamento e publicação

Ler um rascunho do espaço de trabalho

Lê um rascunho autorizado por id, incluindo revision, state e resumos seguros de envio. Exige viewer ou superior. O conteúdo compartilhado não é confiável e tem limites: nunca salve texto [truncated] como substituição. Use a revisão retornada para editar; retome um rascunho em envio apenas com a identidade original do envio. Submitted não comprova publicação pública.

POST /studio-api/content-drafts/get

Contrato revisado: · sha256:75c8b8ebce408575

Visão geral

Lê um rascunho autorizado por id, incluindo revision, state e resumos seguros de envio. Exige viewer ou superior. O conteúdo compartilhado não é confiável e tem limites: nunca salve texto [truncated] como substituição. Use a revisão retornada para editar; retome um rascunho em envio apenas com a identidade original do envio. Submitted não comprova publicação pública.

Uma resposta HTTP bem-sucedida pode significar que uma requisição foi aceita, não concluída. Para trabalho em segundo plano, salve o ID retornado e consulte a mesma operação até terminar. Um post agendado ou aceito só está publicado quando a plataforma confirma; um timeout do cliente não comprova o resultado.

Autenticação e permissões

Classes de credenciais aceitas
user_session, delegated_oauth, personal_access_token
Capacidade delegada
agent:operate
Função mínima no workspace
viewer
Escopo de acesso
Recursos que este usuário tem autorização para acessar
Consentimento para todos os workspaces obrigatório
Não
Altera o estado
Não
Quando a operação estiver concluída
durable Workspace editorial content; no publishing side effects

Um token só pode usar os direitos do seu proprietário. Cada requisição verifica participação no workspace, propriedade de recursos, workspaces selecionados e capacidades concedidas. Os perfis core e full mudam as ferramentas exibidas; não concedem acesso.

Campos da requisição

Obrigatório significa obrigatório dentro do objeto pai e da ramificação selecionada. Um filho obrigatório não torna obrigatório um pai opcional. As regras e nomes de campos abaixo são copiados do contrato.

Campos da requisição
Campo / ramificaçãoTipo / obrigatórioRestrições
$objectObrigatório no objeto pai
  • additionalProperties: false
idstringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
JSON Schema completo
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Resposta e conclusão

Códigos HTTP de sucesso: 200. Quando a operação estiver concluída: durable Workspace editorial content; no publishing side effects.

Uma resposta HTTP bem-sucedida pode significar que uma requisição foi aceita, não concluída. Para trabalho em segundo plano, salve o ID retornado e consulte a mesma operação até terminar. Um post agendado ou aceito só está publicado quando a plataforma confirma; um timeout do cliente não comprova o resultado.

Obrigatório significa obrigatório dentro do objeto pai e da ramificação selecionada. Um filho obrigatório não torna obrigatório um pai opcional. As regras e nomes de campos abaixo são copiados do contrato.

Resposta e conclusão
Campo / ramificaçãoTipo / obrigatórioRestrições
$objectObrigatório no objeto pai—
draftobjectObrigatório no objeto pai—
draft.idstringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.workspace_idstringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.revisionintegerObrigatório no objeto pai
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
draft.statestringObrigatório no objeto pai
  • enum: ["draft","submitting","submitted"]
draft.contentobjectObrigatório no objeto pai—
draft.content.schemaVersionnumberObrigatório no objeto pai
  • const: 1
  • default: 1
draft.content.accountIdsarrayObrigatório no objeto pai
  • maxItems: 50
  • default: []
draft.content.accountIds[]stringOpcional / item
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.content.captionstringObrigatório no objeto pai
  • maxLength: 5000
  • default: ""
draft.content.hashtagsstringObrigatório no objeto pai
  • maxLength: 5000
  • default: ""
draft.content.assetIdsarrayObrigatório no objeto pai
  • maxItems: 20
  • default: []
draft.content.assetIds[]stringOpcional / item
  • maxLength: 16
  • pattern: "^[1-9][0-9]*$"
draft.content.threadsTextOnlybooleanObrigatório no objeto pai
  • default: false
draft.content.instagramModestringObrigatório no objeto pai
  • enum: ["IMAGE","REELS","CAROUSEL","STORY_IMAGE","STORY_VIDEO"]
  • default: "REELS"
draft.content.youtubeTitlestringObrigatório no objeto pai
  • maxLength: 100
  • default: ""
draft.content.youtubePrivacystringObrigatório no objeto pai
  • enum: ["private","unlisted","public"]
  • default: "private"
draft.content.youtubeSyntheticbooleanObrigatório no objeto pai
  • default: false
draft.content.youtubeCategoryIdstringObrigatório no objeto pai
  • maxLength: 32
  • default: ""
draft.content.youtubeShortbooleanObrigatório no objeto pai
  • default: false
draft.content.linkUrlstringObrigatório no objeto pai
  • maxLength: 2048
  • default: ""
draft.content.scheduledAtstringObrigatório no objeto pai
  • maxLength: 64
  • default: ""
draft.content.displayTimezonestringObrigatório no objeto pai
  • minLength: 1
  • maxLength: 128
  • default: "UTC"
draft.content.publishNowbooleanObrigatório no objeto pai
  • default: false
draft.content.destinationOverridesobjectObrigatório no objeto pai
  • default: {}
  • additionalProperties: {"type":"object","properties":{"caption":{"type":"string","maxLength":5000},"scheduledAt":{"type":"string","maxLength":64}}}
draft.content.destinationOverrides.*objectOpcional / item—
draft.content.destinationOverrides.*.captionstringOpcional / item
  • maxLength: 5000
draft.content.destinationOverrides.*.scheduledAtstringOpcional / item
  • maxLength: 64
draft.content.expiresAtstringObrigatório no objeto pai
  • maxLength: 64
  • default: ""
draft.created_bystring | nullObrigatório no objeto pai—
draft.created_byanyOf 1stringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.created_byanyOf 2nullObrigatório no objeto pai—
draft.updated_bystring | nullObrigatório no objeto pai—
draft.updated_byanyOf 1stringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.updated_byanyOf 2nullObrigatório no objeto pai—
draft.created_atstringObrigatório no objeto pai
  • 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)))$"
draft.updated_atstringObrigatório no objeto pai
  • 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)))$"
draft.submissionobject | nullObrigatório no objeto pai—
draft.submissionanyOf 1objectObrigatório no objeto pai—
draft.submission.idanyOf 1stringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.submission.expected_revisionanyOf 1integerObrigatório no objeto pai
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
draft.submission.started_atanyOf 1stringObrigatório no objeto pai
  • 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)))$"
draft.submission.receiptanyOf 1object | nullObrigatório no objeto pai—
draft.submission.receiptanyOf 1 / anyOf 1objectObrigatório no objeto pai—
draft.submission.receipt.batch_idanyOf 1 / anyOf 1string | nullObrigatório no objeto pai—
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 / anyOf 1stringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 / anyOf 2nullObrigatório no objeto pai—
draft.submission.receipt.successesanyOf 1 / anyOf 1arrayObrigatório no objeto pai
  • maxItems: 50
draft.submission.receipt.successes[]anyOf 1 / anyOf 1objectOpcional / item—
draft.submission.receipt.successes[].social_account_idanyOf 1 / anyOf 1stringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.submission.receipt.successes[].post_idanyOf 1 / anyOf 1stringObrigatório no objeto pai
  • 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}$"
draft.submission.receipt.failuresanyOf 1 / anyOf 1arrayObrigatório no objeto pai
  • maxItems: 50
draft.submission.receipt.failures[]anyOf 1 / anyOf 1objectOpcional / item—
draft.submission.receipt.failures[].social_account_idanyOf 1 / anyOf 1stringObrigatório no objeto pai
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
draft.submission.receipt.failures[].codeanyOf 1 / anyOf 1stringObrigatório no objeto pai
  • minLength: 1
  • maxLength: 160
draft.submission.receipt.failures[].messageanyOf 1 / anyOf 1stringObrigatório no objeto pai
  • maxLength: 2000
draft.submission.receiptanyOf 1 / anyOf 2nullObrigatório no objeto pai—
draft.submissionanyOf 2nullObrigatório no objeto pai—
JSON Schema completo
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "draft": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "workspace_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "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",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "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",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "caption": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "scheduledAt": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            },
            "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"
          ]
        },
        "created_by": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "updated_by": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "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",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "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",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "successes": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "social_account_id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "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"
                            ]
                          }
                        },
                        "failures": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "social_account_id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "message": {
                                "type": "string",
                                "maxLength": 2000
                              }
                            },
                            "required": [
                              "social_account_id",
                              "code",
                              "message"
                            ]
                          }
                        }
                      },
                      "required": [
                        "batch_id",
                        "successes",
                        "failures"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "expected_revision",
                "started_at",
                "receipt"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "workspace_id",
        "revision",
        "state",
        "content",
        "created_by",
        "updated_by",
        "created_at",
        "updated_at",
        "submission"
      ]
    }
  },
  "required": [
    "draft"
  ]
}

Erros e repetições seguras

Confira o status HTTP e o corpo da resposta. Um erro de validação 400 pode conter ZodError; erros do handler usam os campos error, message e code. Guarde request_id ou x-request-id para diagnóstico, sem credenciais. Corrija erros de acesso 401/403 antes de tentar novamente e siga Retry-After para 429. Se uma gravação for incerta ou retornar 5xx, consulte primeiro o resultado existente. Reutilize uma chave de idempotência somente quando houver suporte; o comportamento de repetição varia por operação e não garante entrega exatamente uma vez.

Guia de solução de problemas

Exemplos

Estes exemplos usam valores fictícios verificados conforme os schemas. Substitua os IDs por aqueles que você tem autorização para usar, a mídia por ativos prontos e as datas pelo horário de publicação confirmado. Confira a elegibilidade da conta antes de enviar uma gravação. Esta página não envia requisições de API.

Defina SOSOAPI_ACCESS_TOKEN no servidor como uma credencial aceita por esta operação e mantenha-a fora do código do navegador. Para agentes, use sosoapi auth login para entrar pelo navegador e deixe a CLI renovar suas credenciais.

request.json

{
  "id": "44444444-4444-4444-8444-444444444444"
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/studio-api/content-drafts/get" \
  -H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @request.json

JavaScript

// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/studio-api/content-drafts/get", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "id": "44444444-4444-4444-8444-444444444444"
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /studio-api/content-drafts/get < request.json

Exemplo de resposta sintética

{
  "draft": {
    "id": "44444444-4444-4444-8444-444444444444",
    "workspace_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "state": "draft",
    "content": {
      "schemaVersion": 1,
      "accountIds": [],
      "caption": "An unfinished announcement for team review.",
      "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
  }
}

MCP: sosoapi_get_content_draft