@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Type Alias RightsConstraint

    RightsConstraint: {} & {
        rights_id: string;
        rights_agent: { url: string; id: string };
        rights_holder?: BrandReference;
        valid_from?: string;
        valid_until?: string;
        uses: [RightUse, ...RightUse[]];
        countries?: string[];
        excluded_countries?: string[];
        channels?: MediaChannel[];
        excluded_channels?: MediaChannel[];
        impression_cap?: number;
        right_type?: RightType;
        approval_status?: "pending" | "approved" | "rejected";
        grant_status?: "active" | "paused" | "revoked";
        restrictions?: [string, ...string[]];
        disclosure?: {};
        creative_approval_required?: boolean;
        verification_url?: string;
        content_digest?: string;
        attestation_refs?: (
            AttestationReference & {
                issuer?: { type: "brand"; brand: BrandReference };
                claim_type?: "https://adcontextprotocol.org/claims/rights/grant";
                subject?: {
                    type: "resource";
                    resource_type: "https://adcontextprotocol.org/claims/subjects/rights-grant";
                };
            }
        )[];
        ext?: ExtensionObject;
    } & {
        rights_id: string;
        rights_agent: { url: string; id: string };
        rights_holder?: BrandReference;
        valid_from?: string;
        valid_until?: string;
        uses: [RightUse, ...RightUse[]];
        countries?: string[];
        excluded_countries?: string[];
        channels?: MediaChannel[];
        excluded_channels?: MediaChannel[];
        impression_cap?: number;
        right_type?: RightType;
        approval_status?: "pending" | "approved" | "rejected";
        grant_status?: "active" | "paused" | "revoked";
        restrictions?: [string, ...string[]];
        disclosure?: {};
        creative_approval_required?: boolean;
        verification_url?: string;
        content_digest?: string;
        attestation_refs?: (
            AttestationReference & {
                issuer?: { type: "brand"; brand: BrandReference };
                claim_type?: "https://adcontextprotocol.org/claims/rights/grant";
                subject?: {
                    type: "resource";
                    resource_type: "https://adcontextprotocol.org/claims/subjects/rights-grant";
                };
            }
        )[];
        ext?: ExtensionObject;
    }

    Rights metadata attached to a creative. Each entry represents constraints from a single rights holder. Buyer-carried fields are a presentation, not authorization. In AdCP 3.2, a serving party treats a constraint as machine-verified only after one attestation_refs entry evaluates to verified under its own adcp.attestations policy and matches the complete digest-pinned grant.

    Type Declaration

      • rights_id: string

        Rights grant identifier from the acquire_rights response

      • rights_agent: { url: string; id: string }

        The agent that granted these rights

        • url: string

          MCP endpoint URL of the rights agent

        • id: string

          Agent identifier

      • Optionalrights_holder?: BrandReference
      • Optionalvalid_from?: string

        Start of the rights validity period

      • Optionalvalid_until?: string

        End of the rights validity period. Creative should not be served after this time.

      • uses: [RightUse, ...RightUse[]]

        Rights uses covered by this constraint

        1

      • Optionalcountries?: string[]

        Countries where this creative may be served under these rights (ISO 3166-1 alpha-2). If omitted, no country restriction. When both countries and excluded_countries are present, the effective set is countries minus excluded_countries.

      • Optionalexcluded_countries?: string[]

        Countries excluded from rights availability (ISO 3166-1 alpha-2). Use when the grant is worldwide except specific markets.

      • Optionalchannels?: MediaChannel[]

        Media channels where this creative may run under these rights, using the standard media channel vocabulary (the same enums/channels.json values as sync_plans). If omitted, no channel restriction. When present, only these channels are granted (an empty array grants no channel), less any also in excluded_channels (deny wins). When only excluded_channels is present, every channel except those excluded is permitted. Mirrors countries and excluded_countries. Advisory, like the other constraint fields on the wire: orchestrators and serving parties SHOULD NOT place the creative on a channel outside the effective set, and creative agents SHOULD NOT build for one (see build_creative). While approval_status is pending the entry grants no placement on any channel (the existing rule that a pending grant never authorizes serving); that rule applies to placement and serving, not to building, so creative agents do not raise a channel advisory for pending status alone. Verifying an attestation proves the term was granted; it does not turn this advisory check into a mandatory one in 3.3, and terms the holder needs enforced belong in restrictions. This is a channel-level restriction only; finer platform or placement scope (for example a single social network) is carried in ext until a platform axis is specified. When the constraint is attested, channels and excluded_channels are covered by content_digest like every other serving-relevant field.

      • Optionalexcluded_channels?: MediaChannel[]

        Media channels excluded under these rights (enums/channels.json values); the creative SHOULD NOT be placed there. Use when the grant is for every channel except specific ones. Wins over channels when a channel appears in both.

      • Optionalimpression_cap?: number

        Maximum total impressions allowed for the full validity period (valid_from to valid_until). This is the absolute cap across all creatives using this rights grant, not a per-creative or per-period limit.

      • Optionalright_type?: RightType
      • Optionalapproval_status?: "pending" | "approved" | "rejected"

        Approval status from the rights holder at manifest creation time (snapshot, not a live value)

      • Optionalgrant_status?: "active" | "paused" | "revoked"

        Authoritative lifecycle state bound into the grant digest and credential status evidence. Only active can evaluate to verified. paused and revoked credentials are ineligible for serving; resumption issues a fresh active credential and reference.

      • Optionalrestrictions?: [string, ...string[]]

        Normalized enforceable content and usage restrictions issued with the grant. When present these values are part of content_digest and cannot be omitted or changed without invalidating the attestation.

        1

      • Optionaldisclosure?: {}

        Disclosure obligation issued with the grant and bound by content_digest.

      • Optionalcreative_approval_required?: boolean

        Whether each creative produced under this grant requires holder approval before distribution. This enforceable term is bound by content_digest.

      • Optionalverification_url?: string

        DEPRECATED legacy informational locator. It is not proof of grant status, a revocation source, a credential locator, or permission to make a network request. Receivers MUST NOT fetch it during rights evaluation, and HTTP status codes have no AdCP authorization meaning. Rights authorization uses attestation_refs and a verifier-of-record evaluation under evaluator-owned policy.

      • Optionalcontent_digest?: string

        SHA-256 of UTF8(JCS(rights_constraint minus content_digest, attestation_refs, and verification_url)), formatted as sha256:. This binds all serving-relevant grant fields, including future extension fields, while deliberately excluding the legacy non-authoritative URL.

      • Optionalattestation_refs?: (
            AttestationReference & {
                issuer?: { type: "brand"; brand: BrandReference };
                claim_type?: "https://adcontextprotocol.org/claims/rights/grant";
                subject?: {
                    type: "resource";
                    resource_type: "https://adcontextprotocol.org/claims/subjects/rights-grant";
                };
            }
        )[]

        Alternative portable presentations of a holder-issued rights-grant credential signed by its authorized rights agent. The buyer carries references only; the serving party remains verifier-of-record. At least one reference must evaluate to verified and match rights_holder, rights_id, rights_agent, content_digest, validity, revocation state, and local policy before this constraint can contribute to serving eligibility.

        1

        4

      • Optionalext?: ExtensionObject
      • rights_id: string

        Rights grant identifier from the acquire_rights response

      • rights_agent: { url: string; id: string }

        The agent that granted these rights

        • url: string

          MCP endpoint URL of the rights agent

        • id: string

          Agent identifier

      • Optionalrights_holder?: BrandReference
      • Optionalvalid_from?: string

        Start of the rights validity period

      • Optionalvalid_until?: string

        End of the rights validity period. Creative should not be served after this time.

      • uses: [RightUse, ...RightUse[]]

        Rights uses covered by this constraint

        1

      • Optionalcountries?: string[]

        Countries where this creative may be served under these rights (ISO 3166-1 alpha-2). If omitted, no country restriction. When both countries and excluded_countries are present, the effective set is countries minus excluded_countries.

      • Optionalexcluded_countries?: string[]

        Countries excluded from rights availability (ISO 3166-1 alpha-2). Use when the grant is worldwide except specific markets.

      • Optionalchannels?: MediaChannel[]

        Media channels where this creative may run under these rights, using the standard media channel vocabulary (the same enums/channels.json values as sync_plans). If omitted, no channel restriction. When present, only these channels are granted (an empty array grants no channel), less any also in excluded_channels (deny wins). When only excluded_channels is present, every channel except those excluded is permitted. Mirrors countries and excluded_countries. Advisory, like the other constraint fields on the wire: orchestrators and serving parties SHOULD NOT place the creative on a channel outside the effective set, and creative agents SHOULD NOT build for one (see build_creative). While approval_status is pending the entry grants no placement on any channel (the existing rule that a pending grant never authorizes serving); that rule applies to placement and serving, not to building, so creative agents do not raise a channel advisory for pending status alone. Verifying an attestation proves the term was granted; it does not turn this advisory check into a mandatory one in 3.3, and terms the holder needs enforced belong in restrictions. This is a channel-level restriction only; finer platform or placement scope (for example a single social network) is carried in ext until a platform axis is specified. When the constraint is attested, channels and excluded_channels are covered by content_digest like every other serving-relevant field.

      • Optionalexcluded_channels?: MediaChannel[]

        Media channels excluded under these rights (enums/channels.json values); the creative SHOULD NOT be placed there. Use when the grant is for every channel except specific ones. Wins over channels when a channel appears in both.

      • Optionalimpression_cap?: number

        Maximum total impressions allowed for the full validity period (valid_from to valid_until). This is the absolute cap across all creatives using this rights grant, not a per-creative or per-period limit.

      • Optionalright_type?: RightType
      • Optionalapproval_status?: "pending" | "approved" | "rejected"

        Approval status from the rights holder at manifest creation time (snapshot, not a live value)

      • Optionalgrant_status?: "active" | "paused" | "revoked"

        Authoritative lifecycle state bound into the grant digest and credential status evidence. Only active can evaluate to verified. paused and revoked credentials are ineligible for serving; resumption issues a fresh active credential and reference.

      • Optionalrestrictions?: [string, ...string[]]

        Normalized enforceable content and usage restrictions issued with the grant. When present these values are part of content_digest and cannot be omitted or changed without invalidating the attestation.

        1

      • Optionaldisclosure?: {}

        Disclosure obligation issued with the grant and bound by content_digest.

      • Optionalcreative_approval_required?: boolean

        Whether each creative produced under this grant requires holder approval before distribution. This enforceable term is bound by content_digest.

      • Optionalverification_url?: string

        DEPRECATED legacy informational locator. It is not proof of grant status, a revocation source, a credential locator, or permission to make a network request. Receivers MUST NOT fetch it during rights evaluation, and HTTP status codes have no AdCP authorization meaning. Rights authorization uses attestation_refs and a verifier-of-record evaluation under evaluator-owned policy.

      • Optionalcontent_digest?: string

        SHA-256 of UTF8(JCS(rights_constraint minus content_digest, attestation_refs, and verification_url)), formatted as sha256:. This binds all serving-relevant grant fields, including future extension fields, while deliberately excluding the legacy non-authoritative URL.

      • Optionalattestation_refs?: (
            AttestationReference & {
                issuer?: { type: "brand"; brand: BrandReference };
                claim_type?: "https://adcontextprotocol.org/claims/rights/grant";
                subject?: {
                    type: "resource";
                    resource_type: "https://adcontextprotocol.org/claims/subjects/rights-grant";
                };
            }
        )[]

        Alternative portable presentations of a holder-issued rights-grant credential signed by its authorized rights agent. The buyer carries references only; the serving party remains verifier-of-record. At least one reference must evaluate to verified and match rights_holder, rights_id, rights_agent, content_digest, validity, revocation state, and local policy before this constraint can contribute to serving eligibility.

        1

        4

      • Optionalext?: ExtensionObject