> ## 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

> Saves an integration's settings form, then returns the integration exactly as GET /v1/integration/{id} does. Send the keys you want to change, shaped like the GET response's `data`; keys you don't send are left alone.

**Validation.** The body is validated against the platform's settings schema, so required settings must be included (400 `Form errors found: …`). Some platforms also check their settings and return 400 with their own message. Computed fields are dropped, and owner-only fields are dropped for non-owners.

**What is saved:**

- `account_name`: blank or null falls back to the owning organisation's name, as at connect.
- `description`: free-text note; blank clears it.
- `filter`: `{type: include|exclude, list: [organisation ids]}`. It replaces the caller organisation's filter for this integration, and an empty list removes it. This is saved for any caller with access, owner or not.
- `ads_txt` / `app_ads_txt`: newline-separated lines that replace the stored set. A line may be prefixed `[managed]`, `[unmanaged]` or `[UID:<uid>]`. Comments, blanks and duplicates are dropped.
- `token`, `refresh_token`, `expires`: only for platforms that declare them.
- Any other key is a platform setting. Nested objects are saved field by field, and an array you send replaces the stored array (an empty array clears it).

**Ownership.** Apart from `filter`, changes are only stored when the caller has `integration.edit` in the integration's owning organisation. Other callers get 200 with their changes silently ignored.

**Mapping v2.** `publisher_mapping`, `organisation_mapping` and `ad_unit_mapping` are no longer accepted. If posted, they are dropped and not written. Use POST /v1/mapping/apply. If settings that shape stored report data change, a reprocess is started.

Requires the `integration.edit` permission.



## OpenAPI

````yaml /openapi.json put /v1/integration/{id}
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}:
    put:
      tags:
        - '[IN PROGRESS] Integration'
        - public
      summary: /integration/:id
      description: >-
        Saves an integration's settings form, then returns the integration
        exactly as GET /v1/integration/{id} does. Send the keys you want to
        change, shaped like the GET response's `data`; keys you don't send are
        left alone.


        **Validation.** The body is validated against the platform's settings
        schema, so required settings must be included (400 `Form errors found:
        …`). Some platforms also check their settings and return 400 with their
        own message. Computed fields are dropped, and owner-only fields are
        dropped for non-owners.


        **What is saved:**


        - `account_name`: blank or null falls back to the owning organisation's
        name, as at connect.

        - `description`: free-text note; blank clears it.

        - `filter`: `{type: include|exclude, list: [organisation ids]}`. It
        replaces the caller organisation's filter for this integration, and an
        empty list removes it. This is saved for any caller with access, owner
        or not.

        - `ads_txt` / `app_ads_txt`: newline-separated lines that replace the
        stored set. A line may be prefixed `[managed]`, `[unmanaged]` or
        `[UID:<uid>]`. Comments, blanks and duplicates are dropped.

        - `token`, `refresh_token`, `expires`: only for platforms that declare
        them.

        - Any other key is a platform setting. Nested objects are saved field by
        field, and an array you send replaces the stored array (an empty array
        clears it).


        **Ownership.** Apart from `filter`, changes are only stored when the
        caller has `integration.edit` in the integration's owning organisation.
        Other callers get 200 with their changes silently ignored.


        **Mapping v2.** `publisher_mapping`, `organisation_mapping` and
        `ad_unit_mapping` are no longer accepted. If posted, they are dropped
        and not written. Use POST /v1/mapping/apply. If settings that shape
        stored report data change, a reprocess is started.


        Requires the `integration.edit` permission.
      parameters:
        - name: id
          in: path
          description: >-
            Encoded integration id (opaque string from GET /v1/integration, e.g.
            `gjdi9e`).
          required: true
          example: gjdi9e
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              description: >-
                Settings to save, keyed as GET /v1/integration/{id}
                `schema.properties`. Platform-specific keys are allowed.
              properties:
                account_name:
                  type: string
                  description: >-
                    Account name. Blank or null falls back to the owning
                    organisation's name. Owner only.
                  nullable: true
                description:
                  type: string
                  description: >-
                    Free-text note shown when choosing the integration. Owner
                    only.
                  nullable: true
                filter:
                  type: object
                  description: >-
                    The caller organisation's include / exclude list for this
                    integration. `exclude`: the listed organisations (and their
                    child organisations) can't use it. `include`: only the
                    listed organisations (and their children) can. Filters set
                    by an organisation or its parents (or CORE) apply. An empty
                    list removes the filter.
                  required:
                    - type
                    - list
                  properties:
                    type:
                      type: string
                      enum:
                        - include
                        - exclude
                      description: >-
                        Filter type. GET returns `exclude` when no filter is
                        stored.
                    list:
                      type: array
                      uniqueItems: true
                      items:
                        type: integer
                      description: Organisation ids.
                ads_txt:
                  type: string
                  description: >-
                    Ads.txt lines this integration requires, newline-separated.
                    Present only when the platform's schema declares it. Each
                    line may be prefixed `[managed]` (check only managed
                    publishers), `[unmanaged]` (only unmanaged ones) or
                    `[UID:<uid>]` (only that publisher). Comment lines (`#`),
                    blank lines and duplicates are dropped on save; whitespace
                    is normalised. Replaces the stored lines. Owner only.
                app_ads_txt:
                  type: string
                  description: >-
                    App-ads.txt lines this integration requires, in the same
                    format as `ads_txt`. Present only when the platform's schema
                    declares it. Replaces the stored lines. Owner only.
                token:
                  type: string
                  description: API token, for platforms that declare it. Owner only.
                  nullable: true
                refresh_token:
                  type: string
                  description: >-
                    Refresh token / secret, for platforms that declare it. Owner
                    only.
                  nullable: true
                expires:
                  type: string
                  description: Token expiry, for platforms that declare it. Owner only.
                  nullable: true
            example:
              account_name: Example Media
              description: Display demand for Example Media sites
              ads_txt: |-
                amxrtb.com, 105199691, DIRECT
                [managed] amxrtb.com, 105199692, RESELLER
              filter:
                type: exclude
                list:
                  - 234523900
        required: true
      responses:
        '200':
          description: >-
            The integration after saving, as GET /v1/integration/{id} returns
            it.
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                  - success
                properties:
                  results:
                    type: object
                    required:
                      - oid
                      - type
                      - platform
                      - description
                      - account_id
                      - account_name
                      - account_type
                      - status
                      - schema
                      - data
                      - can_refresh
                      - platform_name
                      - preview
                    properties:
                      oid:
                        type: integer
                        description: Owning organisation id (0 = CORE).
                      type:
                        type: string
                        enum:
                          - ad_demand
                          - ad_server
                          - ad_tech
                          - analytic
                          - comms
                          - fallback
                        description: Integration category.
                      platform:
                        type: string
                        description: Platform module id, e.g. `AMX`, `GAM`.
                      description:
                        type: string
                        description: >-
                          The platform's description (not the integration's own
                          note, which is `data.description`).
                      account_id:
                        description: >-
                          Account id on the platform. A string; numeric-looking
                          ids come back as JSON numbers.
                      account_name:
                        description: >-
                          Account name (string; a numeric-looking name comes
                          back as a number). Same as `data.account_name`.
                      account_type:
                        type: string
                        description: >-
                          Platform account type where relevant (e.g. a GAM
                          network type), else null.
                        nullable: true
                      status:
                        type: integer
                        enum:
                          - 0
                          - 1
                        description: 1 active, 0 deactivated.
                      schema:
                        type: object
                        additionalProperties: true
                        description: >-
                          JSON Schema of the settings form: `type: object`,
                          `properties` (always `account_name` (not for fallback
                          creatives), `description`, `filter`, then platform
                          settings), optional `required`, and `definitions` that
                          properties point to with JSON Schema references (e.g.
                          `organisation_list_anyOf`, listing the organisations
                          `filter.list` can hold, and `field.ads_txt`). The
                          example shows those references resolved inline. Fields
                          only the owner may change can be marked `readOnly`.
                          Keeps value types.
                        properties: {}
                      data:
                        type: object
                        additionalProperties: true
                        description: >-
                          Current setting values, keyed as `schema.properties`.
                          Keeps value types (no numeric coercion). Besides the
                          keys below, a platform adds its own settings (strings,
                          numbers, booleans, nested objects and arrays as
                          `schema` declares).
                        required:
                          - description
                          - account_name
                          - filter
                        properties:
                          account_name:
                            type: string
                            description: >-
                              Account name, to tell several accounts on one
                              platform apart in ad stacks and reporting. New in
                              Mapping v2.
                          description:
                            type: string
                            description: >-
                              Free-text note shown when choosing the
                              integration.
                            nullable: true
                          filter:
                            type: object
                            description: >-
                              The caller organisation's include / exclude list
                              for this integration. `exclude`: the listed
                              organisations (and their child organisations)
                              can't use it. `include`: only the listed
                              organisations (and their children) can. Filters
                              set by an organisation or its parents (or CORE)
                              apply. An empty list removes the filter.
                            required:
                              - type
                              - list
                            properties:
                              type:
                                type: string
                                enum:
                                  - include
                                  - exclude
                                description: >-
                                  Filter type. GET returns `exclude` when no
                                  filter is stored.
                              list:
                                type: array
                                uniqueItems: true
                                items:
                                  type: integer
                                description: Organisation ids.
                          ads_txt:
                            type: string
                            description: >-
                              Ads.txt lines this integration requires,
                              newline-separated. Present only when the
                              platform's schema declares it. Each line may be
                              prefixed `[managed]` (check only managed
                              publishers), `[unmanaged]` (only unmanaged ones)
                              or `[UID:<uid>]` (only that publisher). Comment
                              lines (`#`), blank lines and duplicates are
                              dropped on save; whitespace is normalised.
                          app_ads_txt:
                            type: string
                            description: >-
                              App-ads.txt lines this integration requires, in
                              the same format as `ads_txt`. Present only when
                              the platform's schema declares it.
                          token:
                            type: string
                            description: >-
                              API token, present only for platforms that take
                              API details directly (declared in `schema`).
                              Sensitive.
                            nullable: true
                          refresh_token:
                            type: string
                            description: >-
                              Refresh token / secret, present only when declared
                              in `schema`. Sensitive.
                            nullable: true
                          expires:
                            type: string
                            description: >-
                              Token expiry, present only when declared in
                              `schema` (`YYYY-MM-DD` when the schema format is
                              `date`, otherwise a datetime).
                            nullable: true
                      can_refresh:
                        type: boolean
                        description: >-
                          Whether a refresh token is stored (OAuth connections
                          can renew themselves).
                      platform_name:
                        type: string
                        description: Platform display name.
                      preview:
                        type: object
                        description: >-
                          Labels for the platform's settings preview tool (POST
                          /v1/integration/{id}/preview), or null when the
                          platform has none or the caller can't run it.
                        properties:
                          title:
                            type: string
                          description:
                            type: string
                          platform_label:
                            type: string
                          no_platforms:
                            type: string
                          run_label:
                            type: string
                        nullable: true
                  success:
                    type: boolean
                    enum:
                      - true
                    description: Always true on success.
              example:
                results:
                  oid: 234523814
                  type: ad_demand
                  platform: AMX
                  description: >-
                    Solutions to the fast changing digital ad ecosystem with
                    adaptive creative templates and targeting.
                  account_id: cHJlYmlkLm9yZw
                  account_name: Example Media
                  account_type: null
                  status: 1
                  schema:
                    type: object
                    properties:
                      account_name:
                        title: Account Name
                        type:
                          - string
                          - 'null'
                        description: >-
                          Optional. Helps you tell this account apart in ad
                          stacks and reporting when there are several. Defaults
                          to your organisation's name.
                      description:
                        title: Description
                        type:
                          - string
                          - 'null'
                        description: >-
                          Optional. Shows up at selection to provide the user
                          with any additional context.
                      filter:
                        type: object
                        description: Block this integration for certain organisations
                        properties:
                          type:
                            title: Filter Type
                            type: string
                            default: include
                            oneOf:
                              - const: include
                                title: Include
                              - const: exclude
                                title: Exclude
                          list:
                            title: Filter Targets
                            type: array
                            uniqueItems: true
                            items:
                              type: integer
                              anyOf:
                                - const: 234523814
                                  title: Example Media
                                - const: 234523900
                                  title: Example Media Sport
                      ads_txt:
                        title: Ads.txt requirements
                        type: string
                        description: >-
                          Optionally add in the ads.txt requirements of this
                          integration… Line separated.
                  data:
                    description: Display demand for Example Media sites
                    account_name: Example Media
                    ads_txt: |-
                      amxrtb.com, 105199691, DIRECT
                      [managed] amxrtb.com, 105199692, RESELLER
                    filter:
                      type: exclude
                      list:
                        - 234523900
                  can_refresh: false
                  platform_name: AdaptMX
                  preview: null
                success: true
          headers: {}
        '400':
          description: >-
            The body fails the settings schema, or the platform rejected a
            setting.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false on errors.
              example:
                message: >-
                  Form errors found: /filter/type: The data should match one
                  item from enum
                success: false
          headers: {}
        '403':
          description: >-
            The caller lacks the required permission (or no user could be read
            from the token).
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false on errors.
              example:
                message: User forbidden
                success: false
          headers: {}
        '404':
          description: >-
            No such integration, or it isn't owned by the caller's organisation
            chain or CORE.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false on errors.
              example:
                message: 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.