BackendHTTP APIFunctions

Get integration functions config

Requires an API key with the environment:integrations:list_functions scope. Learn more about API key scopes.

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

This endpoint reads deployed function configuration. It does not include Tenklo catalog actions that are available out of the box. To list both deployed functions and catalog actions, use List functions.

  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"]
            }
        }
    ]
}
GET
/scripts/config

Return the configuration for all integration functions.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.

Query Parameters

format?string

The output type of the script configuration

Value in"nango""openai"

Response Body

Successfully returned integration functions config

application/json
  1. response
providerConfigKey?string
syncs?array<>
actions?array<>
on-events?array<string>
provider?string
Example Request
curl -X GET 'https://api.tenklo.dev/scripts/config'
Example Response
{  "providerConfigKey": "string",  "syncs": [    {      "id": 0,      "name": "string",      "enabled": true,      "type": "string",      "json_schema": {},      "runs": "string",      "track_deletes": true,      "auto_start": true,      "last_deployed": "string",      "is_public": true,      "pre_built": true,      "version": "string",      "attributes": {},      "input": {},      "returns": [        "string"      ],      "description": "string",      "scopes": [        "string"      ],      "endpoints": [        {}      ],      "webhookSubscriptions": [        "string"      ],      "models": [        {          "name": "string",          "fields": []        }      ]    }  ],  "actions": [    {      "id": 0,      "name": "string",      "type": "string",      "last_deployed": "string",      "is_public": true,      "pre_built": true,      "version": "string",      "attributes": {},      "input": {},      "returns": {},      "description": "string",      "scopes": [        "string"      ],      "endpoints": [        {}      ],      "models": [        {          "name": "string",          "fields": []        }      ]    }  ],  "on-events": [    "string"  ],  "provider": "string"}

On this page