Send an automation as a test

Sends the automation's texts to to now, one after another, skipping waits and conditions.

POST/v1/automations/{id}/test

Path Parameters

  • idstringrequired

Body Parameters

  • tostringrequired

    E.164: your own verified phone or a verified recipient Example: +14155550123.

  • fromstring

    Optional. Send this test from another of your numbers in the same mode (the automation is not changed), e.g. a verified toll-free while its own number is in review.

  • propertiesobject

    Sample event properties for merge fields

  • stepsarray of string

    Only these send_sms step ids. Default: all of them

Details

Works on drafts and active automations and does not activate them; no run starts and its stats do not change. to must be your own verified phone or a verified recipient.

Texts are tagged automation_test and are billed like any text. Honors Idempotency-Key.

Responses

  • 200JSON object

    What was sent

  • 400Error

    Invalid input

  • 401Error

    Missing, malformed, or revoked API key

  • 402Error

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 403Error

    to is not your phone or a verified recipient

  • 429Error

    Rate limit or quota exceeded

Response Fields

  • objectautomation_test
  • automation_idstring
  • tostring
  • fromstring
  • testboolean
  • propertiesobject
  • sentinteger
  • messagesarray of object
  • messages[].step_idstring
  • messages[].statussent, failed, skipped
  • messages[].message_idstring

    Nullable.

  • messages[].bodystring
  • messages[].segmentsinteger

    Nullable.

  • messages[].reasonstring
  • messages[].errorobject
  • messages[].error.codestring
  • messages[].error.messagestring

Errors

Every error has the same JSON shape, and request_id matches the X-Request-Id response header. Errors lists every code and what to do about it.

  • 400

    Invalid input

  • 401

    Missing, malformed, or revoked API key

  • 402

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 403

    to is not your phone or a verified recipient

  • 429

    Rate limit or quota exceeded