Dynamic Environments API

Retrieve and update environment (project) configuration.

OpenAPI Specification

dynamic-labs-environments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Dynamic Allowlists Environments API
  description: Representative OpenAPI description of the Dynamic environment-scoped REST API for web3 authentication and embedded wallets. Admin endpoints authenticate with an environment-scoped bearer API token (dyn_ prefixed); SDK endpoints authenticate with a user JWT obtained via the client SDK. This document is a faithful, non-exhaustive representation of publicly documented surfaces at https://docs.dynamic.xyz/api-reference. Consult the live API reference for the complete schema catalog.
  termsOfService: https://www.dynamic.xyz/terms
  contact:
    name: Dynamic Support
    url: https://www.dynamic.xyz/contact
  version: v0
servers:
- url: https://app.dynamicauth.com/api/v0
  description: Production
- url: https://app.dynamic.xyz/api/v0
  description: Production (alternate host)
security:
- bearerAuth: []
tags:
- name: Environments
  description: Retrieve and update environment (project) configuration.
paths:
  /environments/{environmentId}:
    get:
      operationId: getEnvironment
      tags:
      - Environments
      summary: Get an environment by ID.
      description: Returns the configuration and settings for the specified environment (project).
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateEnvironment
      tags:
      - Environments
      summary: Update an environment.
      description: Updates settings for the specified environment.
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    EnvironmentId:
      name: environmentId
      in: path
      required: true
      description: The ID of the Dynamic environment (project).
      schema:
        type: string
        format: uuid
  responses:
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Environment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        live:
          type: boolean
          description: Whether this is a live (true) or sandbox (false) environment.
        projectSettings:
          type: object
          additionalProperties: true
    EnvironmentUpdate:
      type: object
      properties:
        name:
          type: string
        projectSettings:
          type: object
          additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
          - message
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: dyn_token
      description: 'Environment-scoped API token with a dyn_ prefix for admin endpoints, or a user JWT from the client SDK for SDK endpoints. Sent as Authorization: Bearer <token>.'