> ## 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 integration functions config

> Return the configuration for all integration functions.

<Info>
  Requires an API key with the `environment:integrations:list_functions` scope. [Learn more about API key scopes](/reference/backend/http-api/api-keys#scopes).
</Info>

The `/scripts/config` endpoint returns the configuration for all integration functions. There are two variants of this endpoint:

1. `/scripts/config?format=nango` - Returns the standard configuration format
2. `/scripts/config?format=openai` - Returns the configuration in OpenAI's function calling format

## OpenAI Function Format

The `/scripts/config?format=openai` endpoint transforms the script configurations into OpenAI's function calling format. This format is particularly useful when working with OpenAI's API to enable function calling capabilities.

### Parameter Descriptions

The endpoint automatically parses parameter descriptions from the script's description field. If a script's description contains a markdown list of parameters, these descriptions will be used for the corresponding parameters in the OpenAI function format.

For example, in your script file, you can define a script like this:

```typescript google-calendar/actions/move-event.ts theme={null}
export default createAction({
  description: `Move an event to a different time or calendar with the following parameters:
            - eventId: The ID of the event to move
            - start: New start time in ISO format (e.g., "2024-03-28T14:00:00")
            - end: New end time in ISO format (e.g., "2024-03-28T15:00:00")
            - calendar: Optional new calendar ID to move the event to`,
  version: '1.0.0',
  endpoints: [{ method: 'GET', path: '/example/github/issues', group: 'Issues' }],
  frequency: 'every hour',
  autoStart: false,
  scopes: ['https://www.googleapis.com/auth/calendar'],
  input: z.object({
    eventId: z.string(),
    start: z.string(),
    end: z.string(),
    calendar: z.string().optional()
  })
});
```

The endpoint will generate a function definition like this:

```json theme={null}
{
    "data": [
        {
            "name": "move-event",
            "description": "Move an event to a different time or calendar with the following parameters:\n- eventId: The ID of the event to move\n- start: New start time in ISO format (e.g., \"2024-03-28T14:00:00\")\n- end: New end time in ISO format (e.g., \"2024-03-28T15:00:00\")\n- calendar: Optional new calendar ID to move the event to",
            "parameters": {
                "type": "object",
                "properties": {
                    "eventId": {
                        "type": "string",
                        "description": "The ID of the event to move"
                    },
                    "start": {
                        "type": "string",
                        "description": "New start time in ISO format (e.g., \"2024-03-28T14:00:00\")"
                    },
                    "end": {
                        "type": "string",
                        "description": "New end time in ISO format (e.g., \"2024-03-28T15:00:00\")"
                    },
                    "calendar": {
                        "type": "string",
                        "description": "Optional new calendar ID to move the event to"
                    }
                },
                "required": ["eventId", "start", "end"]
            }
        }
    ]
}
```

### Array Fields

The endpoint properly handles array fields in the configuration. For example, if a field is defined as:

```typescript google-calendar/actions/create-event.ts theme={null}
export default createAction({
  description: `Create a new calendar event with the following parameters:
          - summary: The title of the event
          - attendees: List of email addresses of event attendees`,
  version: '1.0.0',
  endpoints: [{ method: 'POST', path: '/example/google-calendar/events', group: 'Events' }],
  input: z.object({
    summary: z.string(),
    attendees: z.array(z.string()).optional()
  })
});
```

It will be transformed into:

```json theme={null}
{
    "data": [
        {
            "name": "create-event",
            "description": "Create a new calendar event with the following parameters:\n- summary: The title of the event\n- attendees: List of email addresses of event attendees",
            "parameters": {
                "type": "object",
                "properties": {
                    "summary": {
                        "type": "string",
                        "description": "The title of the event"
                    },
                    "attendees": {
                        "type": "array",
                        "description": "List of email addresses of event attendees",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": ["summary"]
            }
        }
    ]
}
```


## OpenAPI

````yaml GET /scripts/config
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:
  /scripts/config:
    get:
      summary: Get scripts configuration
      description: Return the configuration for all integration functions.
      parameters:
        - name: format
          in: query
          required: false
          schema:
            type: string
            enum:
              - nango
              - openai
          description: The output type of the script configuration
      responses:
        '200':
          description: Successfully returned integration functions config
          content:
            application/json:
              schema:
                type: object
                properties:
                  providerConfigKey:
                    type: string
                  syncs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                          example: github-issues
                        enabled:
                          type: boolean
                        type:
                          type: string
                          example: sync
                        json_schema:
                          type: object
                        runs:
                          type: string
                          example: every 30 minutes
                        track_deletes:
                          type: boolean
                        auto_start:
                          type: boolean
                        last_deployed:
                          type: string
                          example: '2024-02-01T09:09:03.502Z'
                        is_public:
                          type: boolean
                        pre_built:
                          type: boolean
                        version:
                          type: string
                          example: 0.0.3
                        attributes:
                          type: object
                        input:
                          type: object
                        returns:
                          type: array
                          items:
                            type: string
                            example: GithubIssue
                        description:
                          type: string
                          example: >
                            Fetches the Github issues from all a user's
                            repositories.

                            Details: doesn't track deletes, metadata is not
                            required.
                        scopes:
                          type: array
                          items:
                            type: string
                            example: public_repo
                        endpoints:
                          type: array
                          items:
                            type: object
                        webhookSubscriptions:
                          type: array
                          items:
                            type: string
                        models:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              fields:
                                type: array
                            required:
                              - name
                  actions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                          example: github-issues
                        type:
                          type: string
                          example: action
                        last_deployed:
                          type: string
                          example: '2024-02-28T20:16:38.052Z'
                        is_public:
                          type: boolean
                          example: false
                        pre_built:
                          type: boolean
                          example: false
                        version:
                          type: string
                          example: '4'
                        attributes:
                          type: object
                        input:
                          type: object
                        returns:
                          type: object
                        description:
                          type: string
                          example: >
                            Fetches the Github issues from all a user's
                            repositories.

                            Details: doesn't track deletes, metadata is not
                            required.
                        scopes:
                          type: array
                          items:
                            type: string
                            example: public_repo
                        endpoints:
                          type: array
                          items:
                            type: object
                        models:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              fields:
                                type: array
                            required:
                              - name
                  on-events:
                    type: array
                    items:
                      type: string
                  provider:
                    type: string
                    example: github
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
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'
  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: The secret key from your Nango environment.

````