Promote a automation

POST/api/v1/automations/{automation}/experiments/{node}/promote
Requires anorganization API keywith the scopeautomations:write

Parameters

NameInTypeDescription
automationrequiredpathstringThe automation identifier.
noderequiredpathstringThe node identifier.

Request body

  • variantstringrequired

Request

POST/api/v1/automations/{automation}/experiments/{node}/promote
curl -X POST 'https://app.mailyte.com/api/v1/automations/01JBT8XQ2M9WYC3K4F6R7S8T9V/experiments/01JBT8XQ2M9WYC3K4F6R7S8T9V/promote' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "variant": "<string>"
  }'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject
    • idstring
    • namestring
    • statestringdraft | live | paused | archived
    • entry_rulestringonce | every_time | cooldown

      Whether a contact may enter more than once.

    • settingsobject
      • exit_eventsarray<string>

        Event names that end a run early, checked before every step.

      • exitsobject

        The full exit rules: events (with optional property filters), whether unsubscribing exits, and segments whose entry exits.

        • eventsarray<object>
        • on_unsubscribeboolean
        • on_replyboolean

          Leave the journey when the contact replies to any of its emails (auto-replies ignored).

        • segments_enteredarray<string>
      • streamstringmarketing | transactional
      • cooldown_hoursinteger
    • graphobject

      The editable draft: {nodes[{id,type,config}], edges[{from,to,branch?}]}. Publishing snapshots it into a version.

    • validationobject
      • okboolean
      • errorsobject

        Problems keyed by node id (nodes.<id>.<field>) or graph/settings.

    • live_versionobject
      • idstring
      • numberinteger
      • published_atstring
    • paused_bystringuser | breaker
    • countsobject
      • in_flightinteger

        Runs that have not finished.

      • completedinteger
      • exitedinteger
      • failedinteger
      • emails_sentinteger

        Emails this automation has actually sent, across every version. Only counted on the list; 0 elsewhere.

    • published_atstring
    • paused_atstring
    • archived_atstring
    • created_atstring
    • updated_atstring

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait.

Every status, with what causes it and what to do, is on the error reference.