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

# Add an environment

> Adds an environment to your Business team, up to 15 with production.

> [accordion] Details
>
> The first one also adds production, so it turns environments on.
>
> * key is fixed once added, and production and all are reserved. The API's environment field, the environment's MCP URLs and Dashboard links carry it.
>
> * Each tool runs production's version in it until a change, repair, push or merge gives it its own.
>
> * auto\_repair, on unless false, repairs its failed runs automatically, in this environment only.
>
> * Once your team has environments, each API key belongs to one of them, so no API key or environment's MCP URL adds another. Add it on the Dashboard or through a connected agent on the Admin MCP URL.
>
> * off\_categories, off\_sites and off\_tools turn categories, sites and tools off in it for API keys and connected agents, as in update\_settings. Added by an API key or connected agent, it also turns off everything production does.
>
> * **Callers:** an API key, an MCP OAuth token or a Dashboard session.
>
> * **Permission:** `team:manage`; an API key also needs `team:manage`.
>
> * **Effect:** Creates or changes something.
>
> * **Errors:** [`environment_exists`](https://docs.pomerado.ai/errors#environment_exists), [`environment_limit_reached`](https://docs.pomerado.ai/errors#environment_limit_reached), [`environments_unavailable`](https://docs.pomerado.ai/errors#environments_unavailable), and the [errors any request can get](https://docs.pomerado.ai/errors.md).


## OpenAPI

````yaml /api-reference/openapi.json post /v1/environments
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/environments:
    post:
      tags:
        - environments
      summary: Add an environment
      description: Adds an environment to your Business team, up to 15 with production.
      operationId: environments.add
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - key
                - name
              properties:
                key:
                  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])?$
                name:
                  type: string
                  description: a string at most 40 character(s) long
                  minLength: 1
                  maxLength: 40
                auto_repair:
                  type: boolean
                  description: Repair failed runs automatically, on unless false
                off_categories:
                  type: array
                  items:
                    type: string
                    enum:
                      - retail
                      - travel
                      - flights
                      - events
                      - dev
                      - sales
                      - real_estate
                      - learning
                      - job_boards
                      - finance
                      - groceries
                      - services
                      - dining
                      - sports
                      - health
                      - suppliers
                      - logistics
                      - cars
                      - government
                      - news
                      - marketing
                      - business_tools
                      - games
                      - design
                      - social
                      - productivity
                      - other
                  description: >-
                    Catalog categories to turn off, such as flights: API keys
                    and connected agents working here don't find their sites'
                    tools, and their builds and runs there are refused
                  examples:
                    - - flights
                  maxItems: 27
                off_sites:
                  type: array
                  items:
                    type: string
                    description: >-
                      a string matching the pattern
                      ^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$
                    pattern: >-
                      ^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$
                  description: >-
                    Sites to turn off by domain, such as delta.com, up to 200:
                    no scheme, path or port. A domain covers its subdomains and
                    tools built there later
                  examples:
                    - - delta.com
                  maxItems: 200
                off_tools:
                  type: array
                  items:
                    $ref: '#/components/schemas/tool_id'
                  description: >-
                    Tools to turn off by ID, up to 500, such as a site's buy
                    tool while its search tool stays on
                  maxItems: 500
              additionalProperties: false
      responses:
        '200':
          description: The team's environments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentList'
        '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: environment_not_allowed, environments_unavailable, forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: environment_exists, environment_limit_reached
          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:
    tool_id:
      type: string
      description: 'a tool ID: tool_ and 32 lowercase hex digits'
      examples:
        - tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
    EnvironmentList:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
      additionalProperties: false
      description: The team's environments, production first; empty before it adds one
    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
    Environment:
      type: object
      required:
        - key
        - name
        - auto_repair
        - protected
        - daily_cap
        - created_at
      properties:
        key:
          type: string
          description: >-
            The fixed key the API's environment, the MCP URLs and Dashboard
            links carry
          examples:
            - staging
          pattern: ^[a-z](?:[a-z0-9-]{0,30}[a-z0-9])?$
        name:
          type: string
          examples:
            - Staging
        auto_repair:
          type: boolean
          description: >-
            Repair failed runs automatically. Always true for production, whose
            repairs always run
        protected:
          type: boolean
          description: >-
            Protect production: only Owners and Admins push, merge, roll back,
            publish, change or build there. Production only
        daily_cap:
          anyOf:
            - type: integer
              description: a number between 1 and 1000000000
              minimum: 1
              maximum: 1000000000
            - type: 'null'
          description: >-
            Tool calls a UTC day this environment's runs may make; null for
            none. At it, new runs here are refused with quota_exceeded
            (details.limit_source environment_cap) until the UTC day resets;
            runs already started finish, and builds never count. Your team's
            daily cap still counts these calls too, and whichever cap is lower
            refuses first. Always null for production, which the team's daily
            cap holds
        created_at:
          $ref: '#/components/schemas/Timestamp'
        off_categories:
          type: array
          items:
            type: string
            enum:
              - retail
              - travel
              - flights
              - events
              - dev
              - sales
              - real_estate
              - learning
              - job_boards
              - finance
              - groceries
              - services
              - dining
              - sports
              - health
              - suppliers
              - logistics
              - cars
              - government
              - news
              - marketing
              - business_tools
              - games
              - design
              - social
              - productivity
              - other
          description: >-
            The catalog categories turned off here for API keys and connected
            agents, in the catalog's order; empty for none
        off_sites:
          type: array
          items:
            type: string
          description: >-
            The sites turned off here, by domain, each with its subdomains;
            empty for none
        off_tools:
          type: array
          items:
            type: string
          description: The tools turned off here, by ID; empty for none
      additionalProperties: false
    Timestamp:
      type: string
      format: date-time
      description: An ISO 8601 timestamp in UTC
      examples:
        - '2026-10-05T18:30:00.000Z'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

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