Skip to content

API: Publishing

Check a post against the limits of its network; sends nothing

POST /api/v1/publish/validate: Check a post against the limits of its network; sends nothing

Last updated:

POST/api/v1/publish/validate

Authentication#

Send the secret in the header Authorization: Bearer <secret>: the local token in local mode, an API key in network mode. An API key needs the read scope; the local token has every scope. See the API overview for both modes.

Request body#

Content type application/json.

NameTypeRequiredDescription
ai_disclosurebooleannoThe video has realistic altered or synthetic content.
connection_idstringyesThe connection of the network and the account the video goes to.. min length 1
descriptionstringnoThe description, at most 5,000 bytes on YouTube.
exportstringyesThe id of a succeeded export job of the project: the video.. min length 1
made_for_kidsboolean or nullnoRequired: whether the video is made for kids.
project_idstringyesThe project the video was exported from.. min length 1
tagsarray of stringnoThe tags, at most 500 characters in all on YouTube.
thumbnailstringnoThe id of a succeeded export job of a still of the project: the cover.
titlestringnoThe title, at most 100 characters on YouTube.
visibilitystringnoprivate (the default), unlisted or public.

Responses#

200 OK#

Content type application/json. Schema: PublishValidateResult.

NameTypeRequiredDescription
issuesarray of Issueno
networkstringno
statestringno
summarystringno

400#

Validation failed; errors maps each field to its messages and issues lists each problem with its code, key and params

Content type application/problem+json. Schema: Problem.

401 Unauthorized#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

403#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

409#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

422 Unprocessable Content#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

429#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

Any other status#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

curl -X POST "http://127.0.0.1:7878/api/v1/publish/validate" \
  -H "Authorization: Bearer $STUARTY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "connection_id": "string",
  "export": "string",
  "project_id": "string"
}'

Response examples

{
  "issues": [
    {
      "code": "string",
      "message": "string",
      "path": "string"
    }
  ],
  "network": "string",
  "state": "string",
  "summary": "string"
}

The examples are built from the schemas of the OpenAPI document, so a value is a placeholder of its type. The fields that carry the real values are in the tables.