OBJECT

MediaConstraint

Media constraints a destination's platform imposes, for one vendor post type.

hard* values are the platform's rejection thresholds; recommended* are quality guidance only, which the platform accepts media below.

Declared does not mean enforced — check enforcedConstraints before gating on any field. Today only DURATION is enforced: the published asset is a downscaled preview rendition, so checking its dimensions would reject assets whose masters are publishable. Dimension and aspect enforcement is sequenced behind VE-26886; the values are published now so there is one source of truth when it lands.

A null field means that constraint is not declared for this post type.

link GraphQL Schema definition

1type MediaConstraint {
2
3id: ID!
4
5# Vendor post type these limits apply to, e.g. "reels".
6postType: String!
7
8# Which constraint classes on this row are validated server-side, and are
9# therefore safe to gate submission on.
10enforcedConstraints: [MediaConstraintClass!]!
11
12# The rejection thresholds, as a JSON Schema (draft-07) over the asset's measured
13# properties.
14#
15# Run it client-side to warn before submitting: the server evaluates this same
16# document with ajv configured to
17# match `@rjsf/validator-ajv8`, so both sides reach the same verdict.
18#
19# Recognised properties are `durationMs` (MILLISECONDS, directly comparable to
20# `Asset.fileData.mediaDurationMs`),
21# `widthPx`, `heightPx` and `aspectRatio` (width/height). Only `minimum`,
22# `maximum` and `enum` appear.
23#
24# A property present here is NOT necessarily checked by the server —
25# `enforcedConstraints` is the list of what
26# is. Validate an asset by supplying only the properties you can measure; absent
27# properties are not checked, and
28# the document never uses `required`.
29#
30# `{}` means nothing is declared.
31constraintSchema: JSONData!
32
33# Advisory quality targets, e.g. `{"widthPx": 1080, "heightPx": 1920,
34# "aspectRatio": 0.5625}`.
35#
36# NEVER rejection thresholds — the platform accepts media that misses them, so
37# show them as guidance and do not
38# gate submission on them. `constraintSchema` is what can reject a publish.
39#
40# Keys are the property names `constraintSchema` uses, so a target lines up
41# against its limit. Unlike
42# `constraintSchema` this is a flat map of values, NOT a JSON Schema: do not pass
43# it to a validator.
44#
45# `{}` means no guidance is published for this destination.
46recommendedMedia: JSONData!
47
48}