Show examples in:
    Create build trigger

    Body Parameters

    name  Required  string  Example: "Production"

    Name of the environment

    adapter  Required  string  Example: "netlify"

    The deploy adapter

    indexing_enabled  Required  boolean  Example: true

    Enable scraper on the site

    frontend_url  Required  string, null  Example: ""

    Public url of the site

    adapter_settings  Required  object  Example: {"trigger_url":"","site_id":"XXX","branch":"master"}

    Additional configuration for deploy

    autotrigger_on_scheduled_publications  Required  boolean  Example: true

    Deploy on scheduled publication

    webhook_token  Optional  string  Example: "xA1239ajsk123"

    Unique token of the webhook


    Returns a build_trigger resource object.


    Example Basic example
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const buildTrigger = await client.buildTriggers.create({
    name: 'Production',
    adapter: 'netlify',
    indexing_enabled: true,
    frontend_url: '',
    adapter_settings: {
    trigger_url: '',
    site_id: 'XXX',
    branch: 'master'
    autotrigger_on_scheduled_publications: true