Skip to main content
POST
/
api
/
public
/
organizations
/
{orgId}
/
automations
Create an automation
curl --request POST \
  --url https://charts.basedash.com/api/public/organizations/{orgId}/automations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "instructions": "<string>",
  "icon": "stopwatch",
  "color": "1",
  "active": true,
  "triggerType": "SCHEDULE",
  "frequency": "DAILY",
  "preferredHour": 9,
  "preferredDayOfWeek": 3,
  "preferredDayOfMonth": 16,
  "triggerDatabaseConnectionId": null,
  "triggerSqlQuery": "",
  "slackChannel": null,
  "emailRecipients": ""
}
'
{
  "data": {
    "id": "<string>",
    "organizationId": "<string>",
    "name": "<string>",
    "icon": "<string>",
    "color": "<string>",
    "instructions": "<string>",
    "active": true,
    "archivedAt": "2023-11-07T05:31:56Z",
    "trigger": {
      "preferredHour": 11,
      "preferredDayOfWeek": 3,
      "preferredDayOfMonth": 16,
      "databaseConnectionId": "<string>",
      "sqlQuery": "<string>"
    },
    "notifications": {
      "slackChannel": "<string>",
      "emailRecipients": "<string>"
    },
    "createdByMemberId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://basedash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication using Bearer token format: Bearer <basedash_api_key>

Path Parameters

orgId
string
required

Organization ID

Body

application/json
name
string
required

Automation name

Minimum string length: 1
instructions
string
required

Automation instructions

icon
string
default:stopwatch

Icon name

color
string
default:1

Icon color

active
boolean
default:true
triggerType
enum<string>
default:SCHEDULE

Automation trigger type

Available options:
MANUAL,
SCHEDULE,
DATA_CHANGE
frequency
enum<string>
default:DAILY

Schedule frequency

Available options:
DAILY,
WEEKDAYS,
WEEKLY,
MONTHLY,
QUARTERLY
preferredHour
integer
default:9

Preferred UTC hour

Required range: 0 <= x <= 23
preferredDayOfWeek
integer | null
Required range: 0 <= x <= 6
preferredDayOfMonth
integer | null
Required range: 1 <= x <= 31
triggerDatabaseConnectionId
string | null
triggerSqlQuery
string
default:""
slackChannel
string | null
emailRecipients
string
default:""

Response

Automation created successfully

data
object
required