Flatfile subpackage_environments API

The subpackage_environments API from Flatfile — 6 operation(s) for subpackage_environments.

Operations 12

GET /environments List environments #
POST /environments Create an environment #
GET /environments/subscription-token Get environment subscription credentials #
GET /environments/{environmentId} Get an environment #
PATCH /environments/{environmentId} Update an environment #
DELETE /environments/{environmentId} Delete an environment #
GET /environments/{environmentId}/guides List guides #
POST /environments/{environmentId}/guides Create a guide #
GET /environments/{environmentId}/guides/{guideId} Get a guide #
PATCH /environments/{environmentId}/guides/{guideId} Update a guide #
DELETE /environments/{environmentId}/guides/{guideId} Delete a guide #
GET /environments/{environmentId}/guides/{guideId}/versions/{version} Get guide version #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/flatfile-subpackage-environments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

flatfile-subpackage-environments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference subpackage_accounts Subpackage Environments API
  version: 1.0.0
servers:
- url: https://api.x.flatfile.com/v1
tags:
- name: subpackage_environments
paths:
  /environments:
    get:
      operationId: list
      summary: List environments
      description: Get all environments
      tags:
      - subpackage_environments
      parameters:
      - name: pageSize
        in: query
        description: Number of environments to return in a page (default 10)
        required: false
        schema:
          type: integer
      - name: pageNumber
        in: query
        description: Based on pageSize, which page of environments to return
        required: false
        schema:
          type: integer
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_ListEnvironmentsResponse'
    post:
      operationId: create
      summary: Create an environment
      description: Create a new environment
      tags:
      - subpackage_environments
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_EnvironmentResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_environments_EnvironmentConfigCreate'
  /environments/subscription-token:
    get:
      operationId: get-environment-event-token
      summary: Get environment subscription credentials
      description: Get a token which can be used to subscribe to events for this environment
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: query
        description: ID of environment to return
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_spaces_EventTokenResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
  /environments/{environmentId}:
    get:
      operationId: get
      summary: Get an environment
      description: Returns a single environment
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment to return. To fetch the current environment, pass `current`
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_EnvironmentResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
    patch:
      operationId: update
      summary: Update an environment
      description: Updates a single environment, to change the name for example
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment to update
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_Environment'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_environments_EnvironmentConfigUpdate'
    delete:
      operationId: delete
      summary: Delete an environment
      description: Deletes a single environment
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment to delete
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Success'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
  /environments/{environmentId}/guides:
    get:
      operationId: list-guides
      summary: List guides
      description: Returns guides in an account
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_GuideListResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
    post:
      operationId: create-guide
      summary: Create a guide
      description: Creates a guide
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_GuideDetailResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_environments_GuideCreateRequest'
  /environments/{environmentId}/guides/{guideId}:
    get:
      operationId: get-guide
      summary: Get a guide
      description: Returns a guide
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: guideId
        in: path
        description: ID of guide
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_GuideId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_GuideDetailResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
    patch:
      operationId: update-guide
      summary: Update a guide
      description: Updates a guide
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: guideId
        in: path
        description: ID of guide
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_GuideId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_GuideDetailResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_environments_GuideUpdateRequest'
    delete:
      operationId: delete-guide
      summary: Delete a guide
      description: Deletes a guide
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: guideId
        in: path
        description: ID of guide to delete
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_GuideId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_GuideDeleteResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
  /environments/{environmentId}/guides/{guideId}/versions/{version}:
    get:
      operationId: get-guide-version
      summary: Get guide version
      description: Returns a specified version of a specific guide
      tags:
      - subpackage_environments
      parameters:
      - name: environmentId
        in: path
        description: ID of the environment
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
      - name: guideId
        in: path
        description: ID of the guide
        required: true
        schema:
          $ref: '#/components/schemas/type_commons_GuideId'
      - name: version
        in: path
        description: Version of the guide
        required: true
        schema:
          type: integer
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_environments_GuideVersionResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons_Errors'
components:
  schemas:
    type_environments_GuideUpdateRequest:
      type: object
      properties:
        description:
          type: string
        title:
          type: string
        metadata:
          type: object
          additionalProperties:
            description: Any type
        slug:
          type: string
        versions:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_GuideVersionResource'
        blocks:
          type: array
          items:
            type: object
            additionalProperties:
              description: Any type
        environmentId:
          type: string
      description: Update a guide
      title: GuideUpdateRequest
    type_environments_EnvironmentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_environments_Environment'
      required:
      - data
      title: EnvironmentResponse
    type_environments_GuideListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_GuideResource'
      required:
      - data
      title: GuideListResponse
    type_commons_Error:
      type: object
      properties:
        key:
          type: string
        message:
          type: string
      required:
      - message
      title: Error
    type_commons_GuideId:
      type: string
      description: Guide ID
      title: GuideId
    type_environments_GuideDeleteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_environments_GuideDeleteResponseData'
      required:
      - data
      title: GuideDeleteResponse
    type_environments_EnvironmentConfigUpdate:
      type: object
      properties:
        name:
          type: string
          description: The name of the environment
        isProd:
          type: boolean
          description: Whether or not the environment is a production environment
        guestAuthentication:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_GuestAuthenticationEnum'
        metadata:
          type: object
          additionalProperties:
            description: Any type
        translationsPath:
          type: string
        namespaces:
          type: array
          items:
            type: string
        languageOverride:
          type: string
      description: Properties used to update an environment
      title: EnvironmentConfigUpdate
    type_environments_GuideVersionResource:
      type: object
      properties:
        id:
          type: string
        version:
          type: integer
        content:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - version
      - content
      - createdAt
      - updatedAt
      description: A version of a guide
      title: GuideVersionResource
    type_environments_GuideDetailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_environments_GuideResource'
      required:
      - data
      title: GuideDetailResponse
    type_environments_EnvironmentConfigCreate:
      type: object
      properties:
        name:
          type: string
          description: The name of the environment
        isProd:
          type: boolean
          description: Whether or not the environment is a production environment
        guestAuthentication:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_GuestAuthenticationEnum'
        metadata:
          type: object
          additionalProperties:
            description: Any type
        translationsPath:
          type: string
        namespaces:
          type: array
          items:
            type: string
        languageOverride:
          type: string
      required:
      - name
      - isProd
      description: Properties used to create a new environment
      title: EnvironmentConfigCreate
    type_commons_Success:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_commons_SuccessData'
      description: Informs whether or not a request was successful
      title: Success
    type_environments_ListEnvironmentsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_Environment'
        pagination:
          $ref: '#/components/schemas/type_commons_Pagination'
      required:
      - data
      title: ListEnvironmentsResponse
    type_commons_SuccessData:
      type: object
      properties:
        success:
          type: boolean
      required:
      - success
      title: SuccessData
    type_commons_Pagination:
      type: object
      properties:
        currentPage:
          type: integer
          description: current page of results
        pageCount:
          type: integer
          description: total number of pages of results
        totalCount:
          type: integer
          description: total available results
      required:
      - currentPage
      - pageCount
      - totalCount
      description: pagination info
      title: Pagination
    type_commons_Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/type_commons_Error'
      required:
      - errors
      title: Errors
    type_environments_GuideCreateRequest:
      type: object
      properties:
        description:
          type: string
        title:
          type: string
        metadata:
          type: object
          additionalProperties:
            description: Any type
        slug:
          type: string
        blocks:
          type: array
          items:
            type: object
            additionalProperties:
              description: Any type
        environmentId:
          type: string
      required:
      - description
      - title
      - slug
      - blocks
      - environmentId
      description: Create a guide
      title: GuideCreateRequest
    type_environments_GuideDeleteResponseData:
      type: object
      properties:
        success:
          type: boolean
      required:
      - success
      title: GuideDeleteResponseData
    type_environments_GuestAuthenticationEnum:
      type: string
      enum:
      - shared_link
      - magic_link
      description: The type of authentication to use for guests
      title: GuestAuthenticationEnum
    type_commons_EnvironmentId:
      type: string
      description: Environment ID
      title: EnvironmentId
    type_environments_GuideVersionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_environments_GuideVersionResource'
      required:
      - data
      title: GuideVersionResponse
    type_environments_Environment:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/type_commons_EnvironmentId'
        accountId:
          $ref: '#/components/schemas/type_commons_AccountId'
        name:
          type: string
          description: The name of the environment
        isProd:
          type: boolean
          description: Whether or not the environment is a production environment
        guestAuthentication:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_GuestAuthenticationEnum'
        features:
          type: object
          additionalProperties:
            description: Any type
        metadata:
          type: object
          additionalProperties:
            description: Any type
        translationsPath:
          type: string
        namespaces:
          type: array
          items:
            type: string
        languageOverride:
          type: string
      required:
      - id
      - accountId
      - name
      - isProd
      - guestAuthentication
      - features
      - metadata
      title: Environment
    type_commons_AccountId:
      type: string
      description: Account ID
      title: AccountId
    type_environments_GuideResource:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/type_commons_GuideId'
        description:
          type: string
        metadata:
          type: object
          additionalProperties:
            description: Any type
        slug:
          type: string
        title:
          type: string
        versions:
          type: array
          items:
            $ref: '#/components/schemas/type_environments_GuideVersionResource'
        blocks:
          type: array
          items:
            type: object
            additionalProperties:
              description: Any type
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - slug
      - title
      - versions
      - blocks
      - createdAt
      - updatedAt
      description: A guide
      title: GuideResource
    type_spaces_EventToken:
      type: object
      properties:
        accountId:
          $ref: '#/components/schemas/type_commons_AccountId'
          description: The ID of the Account.
        subscribeKey:
          type: string
          description: The id of the event bus to subscribe to
        ttl:
          type: integer
          description: Time to live in minutes
        token:
          type: string
          description: This should be your API key.
      description: Properties used to allow users to connect to the event bus
      title: EventToken
    type_spaces_EventTokenResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_spaces_EventToken'
      required:
      - data
      title: EventTokenResponse
  securitySchemes:
    default:
      type: http
      scheme: bearer