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

# Push, pull or merge every tool of an integration

> Moves every tool of an integration from one of your team's environments into another, as environments.promote moves one.

> [accordion] Details
>
> * Each tool is checked first: a refusal, or a warning you haven't accepted, answers with nothing written. acknowledgment\_required names each warning's tool in details.tool\_id.
>
> * Then the tools are written one at a time, so a refusal partway, such as a target that changed since its check, leaves the tools before it moved.
>
> * Send dry\_run to see each tool's preview.
>
> * A forced breaking or unchecked version of a public tool lands in production as your team's private copy.
>
> * An API key limited to environments moves tools only into an environment it may be used in, from any of your team's environments.
>
> * **Callers:** an API key, an MCP OAuth token or a Dashboard session.
>
> * **Permission:** `tools:build`.
>
> * **Effect:** Creates or changes something.
>
> * **Errors:** [`acknowledgment_required`](https://docs.pomerado.ai/errors#acknowledgment_required), [`target_moved`](https://docs.pomerado.ai/errors#target_moved), [`production_protected`](https://docs.pomerado.ai/errors#production_protected), [`not_found`](https://docs.pomerado.ai/errors#not_found), [`environment_not_found`](https://docs.pomerado.ai/errors#environment_not_found), [`environments_unavailable`](https://docs.pomerado.ai/errors#environments_unavailable), [`merge_base_unknown`](https://docs.pomerado.ai/errors#merge_base_unknown), [`merge_too_large`](https://docs.pomerado.ai/errors#merge_too_large), and the [errors any request can get](https://docs.pomerado.ai/errors.md).


## OpenAPI

````yaml /api-reference/openapi.json post /v1/integrations/{id}/promote
openapi: 3.1.0
info:
  title: Pomerado API
  version: '1'
  description: >-
    Run and build website tools, follow their jobs, and manage logins, API keys
    and webhooks. Authenticate with a Pomerado API key (pom_…), an MCP OAuth
    token or a Dashboard session as a Bearer token.
servers:
  - url: https://api.pomerado.ai
security: []
tags:
  - name: account
    x-group: Account
  - name: api_keys
    x-group: API keys
  - name: environments
    x-group: Environments
  - name: connected_apps
    x-group: Connected apps
  - name: usage
    x-group: Usage
  - name: quota
    x-group: Quota
  - name: spend_controls
    x-group: Spend controls
  - name: usage_alerts
    x-group: Usage alerts
  - name: usage_summary
    x-group: Usage summary
  - name: billing
    x-group: Billing
  - name: integrations
    x-group: Integrations
  - name: connect
    x-group: Connect
  - name: code
    x-group: Code
  - name: logins
    x-group: Saved logins
  - name: two_factor
    x-group: 2FA
  - name: login_access
    x-group: Login access
  - name: tools
    x-group: Tools
  - name: shapes
    x-group: Shapes
  - name: webhooks
    x-group: Webhooks
  - name: payer_profiles
    x-group: Payer profiles
  - name: payer_addresses
    x-group: Payer addresses
  - name: payment_methods
    x-group: Payment methods
  - name: runs
    x-group: Runs
  - name: builds
    x-group: Builds
  - name: jobs
    x-group: Jobs
  - name: suggestions
    x-group: Suggestions
  - name: audit
    x-group: Audit
  - name: files
    x-group: Files
  - name: team
    x-group: Team
  - name: sso
    x-group: Single sign-on
  - name: issue_reports
    x-group: Problem reports
paths:
  /v1/integrations/{id}/promote:
    post:
      tags:
        - environments
      summary: Push, pull or merge every tool of an integration
      description: >-
        Moves every tool of an integration from one of your team's environments
        into another, as environments.promote moves one.
      operationId: environments.promote_integration
      parameters:
        - name: id
          in: path
          required: true
          description: 'an integration ID: int_ and 32 lowercase hex digits'
          schema:
            type: string
            examples:
              - int_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - from
                - to
                - mode
              properties:
                from:
                  type: string
                  description: >-
                    a string matching the pattern
                    ^[a-z](?:[a-z0-9-]{0,30}[a-z0-9])?$
                  pattern: ^[a-z](?:[a-z0-9-]{0,30}[a-z0-9])?$
                to:
                  type: string
                  description: >-
                    a string matching the pattern
                    ^[a-z](?:[a-z0-9-]{0,30}[a-z0-9])?$
                  pattern: ^[a-z](?:[a-z0-9-]{0,30}[a-z0-9])?$
                mode:
                  type: string
                  enum:
                    - replace
                    - merge
                  description: >-
                    replace: the target serves the source's version. merge: the
                    source's changes go onto the target's newest version
                dry_run:
                  type: boolean
                  description: >-
                    Preview: the warnings and the files that would change,
                    writing nothing
                force:
                  type: boolean
                  description: Accept every warning this call finds
                acknowledge:
                  type: array
                  items:
                    type: string
                    enum:
                      - inputs_change
                      - public_tool_fork
                      - target_changed
                      - target_ahead
                      - no_login_in_environment
                      - unchecked_code
                      - merge_conflicts
                  description: Accept only these warnings
              additionalProperties: false
      responses:
        '200':
          description: What it did, or would do, to each tool
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationPromotion'
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized, reauthentication_required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            production_protected, forbidden, environment_not_allowed,
            environments_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not_found, environment_not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            acknowledgment_required, target_moved, merge_base_unknown,
            merge_too_large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: request_too_large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: server_busy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: internal_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: temporarily_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    IntegrationPromotion:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Promotion'
      additionalProperties: false
      description: Each tool's promotion, in the integration's order
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - retryable
            - docs_url
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            docs_url:
              type: string
            details:
              type: object
              required: []
              properties: {}
              additionalProperties:
                $id: /schemas/unknown
          additionalProperties: false
      additionalProperties: false
    Promotion:
      anyOf:
        - type: object
          required:
            - status
            - tool_id
            - environment
            - version
            - promoted_from
            - mode
            - warnings_accepted
          properties:
            status:
              type: string
              enum:
                - published
            tool_id:
              $ref: '#/components/schemas/tool_id'
            environment:
              type: string
            version:
              type: number
            promoted_from:
              type: object
              required:
                - environment
                - version
              properties:
                environment:
                  type: string
                version:
                  type: number
              additionalProperties: false
            mode:
              type: string
              enum:
                - replace
                - merge
              description: >-
                replace: the target serves the source's version. merge: the
                source's changes go onto the target's newest version
            lands_as:
              type: string
              enum:
                - public_update
                - private_copy
                - new_tool
            merged:
              type: object
              required:
                - files
                - conflicts_taken_from_source
              properties:
                files:
                  type: number
                conflicts_taken_from_source:
                  type: array
                  items:
                    type: string
              additionalProperties: false
            warnings_accepted:
              type: array
              items:
                type: string
                enum:
                  - inputs_change
                  - public_tool_fork
                  - target_changed
                  - target_ahead
                  - no_login_in_environment
                  - unchecked_code
                  - merge_conflicts
          additionalProperties: false
        - type: object
          required:
            - status
            - tool_id
            - environment
            - follows
          properties:
            status:
              type: string
              enum:
                - reset
            tool_id:
              $ref: '#/components/schemas/tool_id'
            environment:
              type: string
            follows:
              type: string
              enum:
                - production
          additionalProperties: false
        - type: object
          required:
            - status
            - tool_id
            - environment
          properties:
            status:
              type: string
              enum:
                - unchanged
            tool_id:
              $ref: '#/components/schemas/tool_id'
            environment:
              type: string
          additionalProperties: false
        - type: object
          required:
            - status
            - tool_id
            - warnings
            - files
          properties:
            status:
              type: string
              enum:
                - preview
            tool_id:
              $ref: '#/components/schemas/tool_id'
            warnings:
              type: array
              items:
                $ref: '#/components/schemas/EnvironmentWarning'
            files:
              type: object
              required:
                - changed
                - conflicts
              properties:
                changed:
                  type: array
                  items:
                    type: string
                conflicts:
                  type: array
                  items:
                    type: string
              additionalProperties: false
          additionalProperties: false
      description: >-
        published: the target serves a new version. reset: it follows production
        again. unchanged: it already served it. preview: what a dry_run found
    tool_id:
      type: string
      description: 'a tool ID: tool_ and 32 lowercase hex digits'
      examples:
        - tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
    EnvironmentWarning:
      type: object
      required:
        - code
        - message
        - details
      properties:
        code:
          type: string
          enum:
            - inputs_change
            - public_tool_fork
            - target_changed
            - target_ahead
            - no_login_in_environment
            - unchecked_code
            - merge_conflicts
        message:
          type: string
        details:
          type: object
          required: []
          properties: {}
          additionalProperties:
            $id: /schemas/unknown
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

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