> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contentignite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /integration/:id/mapping/validate

> Checks candidate mapping records for one integration without storing anything. Use it before `POST /v1/integration/{id}/mapping/apply` (a bulk upload's Validate step, or an agent's dry run); apply runs the same checks and only writes the valid rows.

- **Permission:** `integration.view`; the integration must be available to the caller, otherwise 404.
- Per record: `level` is known; `field` exists in the catalogue (`GET /v1/integration/{id}/fields`, including dotted sub-fields and `approved`); the field is writable by the caller (not computed, not owner-only for a non-owner); an ad-unit (`config`) record only for a field that can vary per unit; `approved` only from the owner, only at integration / organisation / publisher level and never `wnm`; a non-empty, non-`wnm` value validates against the field's JSON Schema (up to 5 messages).
- Entity checks: the entity exists and isn't archived; restricted callers may only target entities in their organisation tree; integration-level records need the integration's owner. Failures appear in the row's `errors` and in `unknown_entities`.
- `mode` is accepted for parity with apply but **ignored**: validate doesn't flag records apply would skip in `append` mode.
- Empty `records` returns zero counts.
- Example error texts: `Unknown field 'placement' for this integration`, `'Publisher ID' is filled in automatically, so it can't be set`, `Only the integration's owner can set '<title>'`, `'s2s' can't be set per ad unit: Pubmatic uses one value for every unit. Set it at publisher level or above.`, `The data (string) must match the type: integer`.



## OpenAPI

````yaml /openapi.json post /v1/integration/{id}/mapping/validate
openapi: 3.0.1
info:
  title: CI Public API
  description: >-
    # Introduction

    Welcome to the Content Ignite API. A central place for all Content Ignite
    functionality. 


    This API enforces a separation between function and form, meaning anything
    you can do in our platforms can be replicated in your own bespoke solution.


    # Authentication

    Authentication is handled via JWTs. You can retrieve your unique JSON Web
    Token from the settings page in the platform, which needs to be passed in
    with every request.

    To do this, simple include it in an Authorization header with the "Bearer"
    key word.


    Please contact support for help getting started.


    # Error Codes

    This is a fully RESTful API, so prepare for a number of different HTTP
    status codes.


    There is also a standard "success" field returned for each request. This
    boolean value can provide a first check against a response.


    # Rate limit

    We reserve the right to block requests if we deem a client to be abusing the
    API.
  version: 1.0.0
servers:
  - url: https://api.tagdeliver.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Reporting
  - name: Reporting/Revenue Reports
  - name: Reporting/Experiment Reporting
  - name: Reporting/Campaign Reports
  - name: Reporting/Health Check
  - name: Reporting/Ads.txt
  - name: Reporting/Utility
  - name: Reporting/Insights Hub
  - name: Reporting/Insights Hub/SSP Insights
  - name: Reporting/Insights Hub/Core Web Vitals
  - name: Reporting/Insights Hub/Ads.txt Insights
  - name: Reporting/Insights Hub/Live Insights
  - name: Reporting/Insights Hub/Metrics
  - name: Reporting/Insights Hub/Diagnostics
  - name: Reporting/Insights Hub/Revenue Insights
  - name: Reporting/Insights Hub/Revenue Analytics
  - name: Reporting/Insights Hub/Demand Mix
  - name: Reporting/Insights Hub/Benchmarking
  - name: Organisation
  - name: Organisation/Organisation Meta
  - name: Organisation/Pricing
  - name: Ad Stack
  - name: Ad Stack/Integration
  - name: Publisher
  - name: Publisher/Publisher Stack
  - name: Publisher/Publisher Tag
  - name: Publisher/Publisher Meta
  - name: Publisher/Experiment
  - name: Publisher/Config (Ad unit)
  - name: Publisher/App Placement
  - name: AI
  - name: AI/Activity
  - name: Billing
  - name: Billing/Invoice
  - name: Audit Log
  - name: '[IN PROGRESS] Integration'
  - name: '[IN PROGRESS] Integration/Mapping'
  - name: '[IN PROGRESS] User'
  - name: '[IN PROGRESS] User/Account'
  - name: Mapping
  - name: public
paths:
  /v1/integration/{id}/mapping/validate:
    post:
      tags:
        - '[IN PROGRESS] Integration/Mapping'
        - public
      summary: /integration/:id/mapping/validate
      description: >-
        Checks candidate mapping records for one integration without storing
        anything. Use it before `POST /v1/integration/{id}/mapping/apply` (a
        bulk upload's Validate step, or an agent's dry run); apply runs the same
        checks and only writes the valid rows.


        - **Permission:** `integration.view`; the integration must be available
        to the caller, otherwise 404.

        - Per record: `level` is known; `field` exists in the catalogue (`GET
        /v1/integration/{id}/fields`, including dotted sub-fields and
        `approved`); the field is writable by the caller (not computed, not
        owner-only for a non-owner); an ad-unit (`config`) record only for a
        field that can vary per unit; `approved` only from the owner, only at
        integration / organisation / publisher level and never `wnm`; a
        non-empty, non-`wnm` value validates against the field's JSON Schema (up
        to 5 messages).

        - Entity checks: the entity exists and isn't archived; restricted
        callers may only target entities in their organisation tree;
        integration-level records need the integration's owner. Failures appear
        in the row's `errors` and in `unknown_entities`.

        - `mode` is accepted for parity with apply but **ignored**: validate
        doesn't flag records apply would skip in `append` mode.

        - Empty `records` returns zero counts.

        - Example error texts: `Unknown field 'placement' for this integration`,
        `'Publisher ID' is filled in automatically, so it can't be set`, `Only
        the integration's owner can set '<title>'`, `'s2s' can't be set per ad
        unit: Pubmatic uses one value for every unit. Set it at publisher level
        or above.`, `The data (string) must match the type: integer`.
      parameters:
        - name: id
          in: path
          description: >-
            Encoded integration id (an opaque base-36 string such as `gjdhye`,
            as returned by `GET /v1/integration`). Never the raw numeric id.
          required: true
          example: gjdhye
          schema:
            type: string
        - name: uid
          in: query
          description: >-
            Optional publisher uid. When given, the integration is looked up
            among those available to this publisher's organisation (and its
            parents) instead of the caller's own. The publisher must exist and
            not be archived; a restricted (non-core) caller may only pass a
            publisher of their own organisation, otherwise 404 `Not Found`.
          required: false
          example: 12345
          schema:
            type: integer
            minimum: 1
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - overwrite
                    - append
                  default: overwrite
                  description: >-
                    `overwrite` (default) upserts every valid record. `append`
                    skips a record when its (level, entity, field) already has a
                    row, including a will-not-map or empty one. Any other value
                    behaves as `overwrite`.
                records:
                  type: array
                  description: >-
                    Candidate records. Each is checked against this
                    integration's catalogue; a record's own `integration_id`, if
                    sent, is ignored.
                  items:
                    type: object
                    description: One per-field mapping record.
                    properties:
                      level:
                        type: string
                        enum:
                          - integration
                          - ad_stack
                          - organisation
                          - publisher
                          - config
                        description: >-
                          Mapping level: `integration` (the integration
                          default), `ad_stack`, `organisation`, `publisher` or
                          `config` (an ad unit).
                      entity_id:
                        type: integer
                        description: >-
                          Ad stack id, organisation id, publisher uid or ad unit
                          (config) id for the level. Required for every level
                          except `integration`, where it is ignored. A numeric
                          string is accepted.
                        nullable: true
                      field:
                        type: string
                        description: >-
                          Field key from `GET /v1/integration/{id}/fields`
                          (exact match; dotted for object sub-fields, e.g.
                          `video.mimes`; `approved` for the built-in approval
                          field).
                      value:
                        description: >-
                          The value: a scalar, or an array for array fields
                          (replaces the stored array entirely). Checked against
                          the field's JSON Schema unless empty or `wnm` is true.
                          Any JSON type.
                      wnm:
                        type: boolean
                        default: false
                        description: >-
                          Will not map: acknowledges the field is deliberately
                          left empty at this entity. The value is ignored and
                          stored as null. Not allowed for `approved`.
                    required:
                      - level
                      - field
              required:
                - records
            example:
              mode: overwrite
              records:
                - level: publisher
                  entity_id: 12345
                  field: adSlot
                  value: '38519891'
                - level: config
                  entity_id: 67890
                  field: video.mimes
                  value:
                    - video/mp4
                    - video/webm
                - level: publisher
                  entity_id: 12377
                  field: pmzoneid
                  wnm: true
                - level: publisher
                  entity_id: 99999
                  field: placement
                  value: abc
        required: true
      responses:
        '200':
          description: Validation results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: object
                    properties:
                      valid_count:
                        type: integer
                        description: Records with no errors.
                      invalid_count:
                        type: integer
                        description: Records with at least one error.
                      rows:
                        type: array
                        description: >-
                          One entry per submitted record, in order (valid ones
                          too).
                        items:
                          type: object
                          description: The outcome for one submitted record.
                          properties:
                            index:
                              type: integer
                              description: >-
                                Position of the record in the submitted
                                `records` array (0-based).
                            valid:
                              type: boolean
                              description: True when the record has no errors.
                            integration_id:
                              type: string
                              description: >-
                                Encoded id of the integration the record was
                                checked against (the path `{id}`). Returned as a
                                number if the encoded id happens to be all
                                digits.
                            field:
                              type: string
                              description: >-
                                The record's field key, as sent (null if
                                missing).
                              nullable: true
                            errors:
                              type: array
                              description: Why the record is invalid; empty when valid.
                              items:
                                type: string
                          required:
                            - index
                            - valid
                            - integration_id
                            - field
                            - errors
                      unknown_entities:
                        type: array
                        description: >-
                          Records rejected for their entity: missing, archived,
                          out of scope, no `entity_id`, or an integration-level
                          record from a non-owner. The same reason also appears
                          in that row's `errors`.
                        items:
                          type: object
                          properties:
                            index:
                              type: integer
                              description: Position of the record in `records`.
                            entity_type:
                              type: string
                              description: The record's `level`.
                              nullable: true
                            entity_id:
                              type: integer
                              description: >-
                                The record's `entity_id`, as sent (numeric
                                strings come back as numbers).
                              nullable: true
                            reason:
                              type: string
                              description: >-
                                e.g. `Unknown publisher 99999`, `No access to
                                publisher 99999`, `entity_id is required for
                                publisher`, `Only the integration owner can set
                                integration-level values`.
                          required:
                            - index
                            - entity_type
                            - entity_id
                            - reason
                    required:
                      - valid_count
                      - invalid_count
                      - rows
                      - unknown_entities
                  success:
                    type: boolean
                    description: Always true on success.
                required:
                  - results
                  - success
              example:
                results:
                  valid_count: 3
                  invalid_count: 1
                  rows:
                    - index: 0
                      valid: true
                      integration_id: gjdhye
                      field: adSlot
                      errors: []
                    - index: 1
                      valid: true
                      integration_id: gjdhye
                      field: video.mimes
                      errors: []
                    - index: 2
                      valid: true
                      integration_id: gjdhye
                      field: pmzoneid
                      errors: []
                    - index: 3
                      valid: false
                      integration_id: gjdhye
                      field: placement
                      errors:
                        - Unknown field 'placement' for this integration
                        - Unknown publisher 99999
                  unknown_entities:
                    - index: 3
                      entity_type: publisher
                      entity_id: 99999
                      reason: Unknown publisher 99999
                success: true
          headers: {}
        '400':
          description: '`records` isn''t an array.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    description: Always false on an error.
                required:
                  - message
                  - success
              example:
                message: records must be an array
                success: false
          headers: {}
        '403':
          description: Missing the required permission.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    description: Always false on an error.
                required:
                  - message
                  - success
              example:
                message: User forbidden
                success: false
          headers: {}
        '404':
          description: >-
            The integration (or another referenced entity) doesn't exist or
            isn't available to the caller.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    description: Always false on an error.
                required:
                  - message
                  - success
              example:
                message: Integration gjdhye Not Found
                success: false
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.