v1

latestOpenAPI 3.0.02026-07-1411717.0 KB

Create a workflow

post/

Request body

template'failover'

The template that the Dispatch API will execute. For the initial version of the API the only available value will be failover

Example request

{
  "template": "failover",
  "workflow": [
    {
      "failover": {
        "condition_status": "delivered",
        "expiry_time": 600
      },
      "from": {
        "id": "0123456789012345",
        "number": "447700900000",
        "type": "sms"
      },
      "message": {
        "content": {
          "audio": {
            "url": "https://example.com/audio.mp3"
          },
          "file": {
            "caption": "Additional text to accompany the image.",
            "url": "https://example.com/file.zip"
          },
          "image": {
            "caption": "Additional text to accompany the image.",
            "url": "https://example.com/image.jpg"
          },
          "template": {
            "name": "whatsapp:hsm:technology:vonage:verify",
            "parameters": [
              {
                "default": "1234"
              }
            ]
          },
          "text": "Vonage Verification code: 64873. Valid for 10 minutes.",
          "type": "text",
          "video": {
            "url": "https://example.com/video.mp4"
          }
        },
        "messenger": {
          "category": "message_tag",
          "tag": "ticket_update"
        },
        "viber_service_msg": {
          "category": "transaction",
          "ttl": 600
        },
        "whatsapp": {
          "locale": "en-GB",
          "policy": "deterministic"
        }
      },
      "to": {
        "id": "0123456789012345",
        "number": "447700900000",
        "type": "sms"
      }
    }
  ]
}

Response

Accepted

dispatch_uuidstring required

The parent ID for workflow request.

Example response

{
  "dispatch_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
All 1 operations