GET
/
scripts
/
config
cURL
curl --request GET \
  --url https://api.nango.dev/scripts/config \
  --header 'Authorization: Bearer <token>'
{
  "providerConfigKey": "<string>",
  "syncs": [
    {
      "id": 123,
      "name": "github-issues",
      "enabled": true,
      "type": "sync",
      "json_schema": {},
      "sync_type": "full",
      "runs": "every 30 minutes",
      "track_deletes": true,
      "auto_start": true,
      "last_deployed": "2024-02-01T09:09:03.502Z",
      "is_public": true,
      "pre_built": true,
      "version": "0.0.3",
      "attributes": {},
      "input": {},
      "returns": [
        "GithubIssue"
      ],
      "description": "Fetches the Github issues from all a user's repositories.\nDetails: full sync, doesn't track deletes, metadata is not required.\n",
      "scopes": [
        "public_repo"
      ],
      "endpoints": [
        {}
      ],
      "webhookSubscriptions": [
        "<string>"
      ]
    }
  ],
  "actions": [
    {
      "id": 123,
      "name": "github-issues",
      "type": "action",
      "last_deployed": "2024-02-28T20:16:38.052Z",
      "is_public": false,
      "pre_built": false,
      "version": "4",
      "attributes": {},
      "input": {},
      "returns": {},
      "description": "Fetches the Github issues from all a user's repositories.\nDetails: full sync, doesn't track deletes, metadata is not required.\n",
      "scopes": [
        "public_repo"
      ],
      "endpoints": [
        {}
      ]
    }
  ],
  "on-events": [
    "<string>"
  ],
  "provider": "github"
}
The /scripts/config endpoint returns the configuration for all integration scripts. 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:
google-calendar/actions/move-event.ts
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:
{
    "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:
google-calendar/actions/create-event.ts
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:
{
    "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"]
            }
        }
    ]
}

Authorizations

Authorization
string
header
required

The secret key from your Nango environment.

Query Parameters

format
enum<string>

The output type of the script configuration

Available options:
nango,
openai

Response

200
application/json

Successfully returned integration scripts config

The response is of type object.