Authorizations
Headers
Body
application/json
Response
Example:
Example:
Example:
Example:
Available options:
schedule, webhook Example:
Example:
Example:
Example:
Example:
import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
const trigger = await client.triggers.create({
config: {},
name: 'x',
type: 'schedule',
workflowVersionId: 'x',
});
console.log(trigger.id);{
"id": "trg_abc123def456",
"tenantId": "tenant_123",
"subTenantId": "sub_tenant_456",
"workflowVersionId": "wfv_abc123def456",
"name": "User Registration Webhook",
"type": "webhook",
"config": {},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}Creates a new trigger for a workflow version. Requires secret key authentication.
import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
const trigger = await client.triggers.create({
config: {},
name: 'x',
type: 'schedule',
workflowVersionId: 'x',
});
console.log(trigger.id);{
"id": "trg_abc123def456",
"tenantId": "tenant_123",
"subTenantId": "sub_tenant_456",
"workflowVersionId": "wfv_abc123def456",
"name": "User Registration Webhook",
"type": "webhook",
"config": {},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}schedule, webhook Was this page helpful?