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

# Get an environment

> Retrieve an environment's configuration.

> [!NOTE]
>
> Requires an [Account API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md#account-api-keys) with the `account:environments:read` scope.

Retrieves environment's configuration.

Set `with_secrets=true` to also return `webhooks.signing_key` and `otlp_headers`. This requires the additional `account:environments:read_secret` scope.

```json Without secrets theme={null}
{
  "data": {
    "id": 123,
    "uuid": "123e4567-e89b-12d3-a456-426614174001",
    "name": "staging",
    "is_production": false,
    "callback_url": "https://api.nango.dev/oauth/callback",
    "slack_notifications": false,
    "otlp_endpoint": null,
    "webhooks": {
      "primary_url": "https://example.com/webhooks/nango",
      "secondary_url": null,
      "on_sync_completion_always": true,
      "on_auth_creation": true,
      "on_auth_refresh_error": true,
      "on_sync_error": true,
      "on_async_action_completion": true,
      "on_connection_deletion": true
    }
  }
}
```

```json With secrets theme={null}
{
  "data": {
    "id": 123,
    "uuid": "123e4567-e89b-12d3-a456-426614174001",
    "name": "staging",
    "is_production": false,
    "callback_url": "https://api.nango.dev/oauth/callback",
    "slack_notifications": false,
    "otlp_endpoint": null,
    "otlp_headers": [],
    "webhooks": {
      "primary_url": "https://example.com/webhooks/nango",
      "secondary_url": null,
      "on_sync_completion_always": true,
      "on_auth_creation": true,
      "on_auth_refresh_error": true,
      "on_sync_error": true,
      "on_async_action_completion": true,
      "on_connection_deletion": true,
      "signing_key": "5f1c0d2e-6a1b-4f3c-9d8e-7b6a5c4d3e2f"
    }
  }
}
```


## OpenAPI

````yaml GET /environments/{environmentUuid}
openapi: 3.1.0
info:
  title: Nango API
  description: Nango API specs used to authorize & sync data with external APIs.
  version: 1.0.0
servers:
  - url: https://api.nango.dev
    description: Production server
  - url: http://localhost:3003
    description: Local server
security:
  - bearerAuth: []
externalDocs:
  url: https://nango.dev/docs/reference/backend/http-api/authentication
paths:
  /environments/{environmentUuid}:
    get:
      summary: Get an environment
      description: Retrieve an environment's configuration.
      parameters:
        - name: environmentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Environment UUID.
        - name: with_secrets
          in: query
          required: false
          description: Include the webhook signing key and OpenTelemetry headers.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successfully retrieved an environment
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - uuid
                      - name
                      - is_production
                      - callback_url
                      - slack_notifications
                      - otlp_endpoint
                      - webhooks
                    properties:
                      id:
                        type: integer
                        example: 123
                      uuid:
                        type: string
                        format: uuid
                        example: 123e4567-e89b-12d3-a456-426614174000
                      name:
                        type: string
                        example: staging
                      is_production:
                        type: boolean
                      callback_url:
                        type: string
                        format: uri
                      slack_notifications:
                        type: boolean
                      otlp_endpoint:
                        type:
                          - string
                          - 'null'
                      otlp_headers:
                        description: Only included when with_secrets=true.
                        type: array
                        items:
                          type: object
                          required:
                            - name
                            - value
                          properties:
                            name:
                              type: string
                            value:
                              type: string
                      webhooks:
                        type: object
                        required:
                          - primary_url
                          - secondary_url
                          - on_sync_completion_always
                          - on_auth_creation
                          - on_auth_refresh_error
                          - on_sync_error
                          - on_async_action_completion
                          - on_connection_deletion
                        properties:
                          primary_url:
                            type:
                              - string
                              - 'null'
                          secondary_url:
                            type:
                              - string
                              - 'null'
                          on_sync_completion_always:
                            type: boolean
                          on_auth_creation:
                            type: boolean
                          on_auth_refresh_error:
                            type: boolean
                          on_sync_error:
                            type: boolean
                          on_async_action_completion:
                            type: boolean
                          on_connection_deletion:
                            type: boolean
                          signing_key:
                            description: >-
                              Current webhook signing key. Only included when
                              with_secrets=true.
                            type: string
                            example: 5f1c0d2e-6a1b-4f3c-9d8e-7b6a5c4d3e2f
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    ServerError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
  schemas:
    StdError:
      type: object
      additionalProperties: false
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
          properties:
            code:
              type: string
            message:
              type: string
            errors:
              type: array
              items:
                type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An Environment API key from your Nango environment, or an Account API
        key for account-level endpoints.

````

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