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

# Create an environment request

> Creates a new environment request. You must supply either a `SecurityTemplateID` or both `AdminUsersStr` and `GenericUsersStr`. The request is created with status `AwaitingApproval`. `Title` is limited to 50 characters.



## OpenAPI

````yaml /developers/flowforma-governance-api/openapi.json post /v1/environmentRequests
openapi: 3.0.3
info:
  title: FlowForma Governance API
  version: 1.0.0
  description: >-
    REST API for FlowForma Governance. Manage app environments, environment
    requests, process promotion requests, security templates, settings, and API
    connection credentials across your FlowForma tenant.
servers:
  - url: https://api.flowforma.com
    description: Production
security:
  - BearerAuth: []
  - IntegrationToken: []
tags:
  - name: Authorization
    description: Obtain an access token.
  - name: Environments
    description: Read FlowForma app environments, their flows and lists.
  - name: Environment Requests
    description: Create and promote requests for new FlowForma app environments.
  - name: Processes
    description: Create and promote process promotion requests between environments.
  - name: Process Actions
    description: Create and update forms in a live FlowForma environment.
  - name: Security Templates
    description: Read and create security templates used by environment requests.
  - name: Settings
    description: Read governance settings.
  - name: API Connections
    description: Set credentials on the subscription's stored API connections.
paths:
  /v1/environmentRequests:
    post:
      tags:
        - Environment Requests
      summary: Create an environment request
      description: >-
        Creates a new environment request. You must supply either a
        `SecurityTemplateID` or both `AdminUsersStr` and `GenericUsersStr`. The
        request is created with status `AwaitingApproval`. `Title` is limited to
        50 characters.
      operationId: PostEnvironment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentRequestCreate'
            example:
              Title: New Sandbox for Finance
              EnvironmentType: Sandbox
              SecurityTemplateID: 3fa85f64-5717-4562-b3fc-2c963f66afa6
              Rationale: Pilot environment for the finance team
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentRequest'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    EnvironmentRequestCreate:
      type: object
      description: >-
        Supply either a `SecurityTemplateID` or both `AdminUsersStr` and
        `GenericUsersStr`.
      properties:
        Title:
          type: string
          description: Request title (max 50 characters).
        EnvironmentType:
          $ref: '#/components/schemas/EnvironmentTypeEnum'
        SecurityTemplateID:
          type: string
          format: uuid
          description: ID of an existing security template.
        AdminUsersStr:
          type: string
          description: >-
            Semicolon-separated admin users. Required if no security template is
            supplied.
        GenericUsersStr:
          type: string
          description: >-
            Semicolon-separated generic users. Required if no security template
            is supplied.
        PrintViewersStr:
          type: string
          description: Semicolon-separated print viewers.
        AppInstanceID:
          type: string
        Rationale:
          type: string
          description: Reason for the request (max 50 characters).
      required:
        - Title
        - EnvironmentType
    EnvironmentRequest:
      type: object
      properties:
        RequestID:
          type: string
          format: uuid
        Title:
          type: string
        EnvironmentType:
          $ref: '#/components/schemas/EnvironmentTypeEnum'
        RequestStatus:
          $ref: '#/components/schemas/RequestStatusEnum'
        SecurityTemplateID:
          type: string
          format: uuid
          nullable: true
        AdminUsersStr:
          type: string
        GenericUsersStr:
          type: string
        PrintViewersStr:
          type: string
        SiteCollection:
          type: string
        Site:
          type: string
        NewSiteUrl:
          type: string
        URL:
          type: string
        AppInstanceID:
          type: string
        Rationale:
          type: string
        Author:
          type: string
        Created:
          type: string
          format: date-time
          nullable: true
    EnvironmentTypeEnum:
      type: string
      enum:
        - Sandbox
        - UAT
        - Production
        - NA
      description: Environment type.
    RequestStatusEnum:
      type: string
      enum:
        - AwaitingApproval
        - Accepted
        - NotAccepted
        - Processing
        - Completed
        - Failed
      description: Request lifecycle status.
    Error:
      type: object
      description: Standard error body.
      properties:
        code:
          type: string
          description: HTTP status code as a string.
        message:
          type: string
          description: Human-readable error message.
      required:
        - code
        - message
      example:
        code: '400'
        message: Page does not exist.
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Azure AD app-only access token. Obtain it from GET /v1/oauthToken and
        send it as the `Authorization: Bearer {token}` header.
    IntegrationToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        FlowForma integration access token, copied from FlowForma Settings. Send
        it as the raw `Authorization` header value, without a `Bearer` prefix.

````