Send Message

Prerequisities

  • RBM channel (if you don't have any, create one in the administration)

📘

Channel Mode

If the channel is in New or Registration in progress state, switch it to Test mode to be able to make a Send Message request

Send a Message

Send a text message using Send Text Message API:

curl -X POST \
  https://api.amio.io/v1/messages \
  -H 'authorization: Bearer {{organization_access_token}}' \
  -H 'content-type: application/json' \
  -d '{
        "channel": {
          "id": "{{channel_id}}"
        },
        "contact": {
          "phone_number": "{{phone_number}}"
        },
        "content": {
          "type": "text",
          "payload": "Hello world!"
        }
      }'

You will need to replace the placeholders {{organization_access_token}}, {{channel_id}} and {{phone_number}}.

  • organization_access_token - Go to Settings - API and copy your secret access token.
  • phone_number - Phone number with an international prefix.
  • channel_id - Find Channel ID in the detail page.
736

📘

Postman

Use Postman to test all different message types. Don't forget to set environment properties: access_token, rbm.channel.id and rbm.contact.id.

Verifying Results & Phone Number

If you want to see the message on your device, your phone number must satisfy the prerequisites and also one of the following conditions:

  • Agent State of your RBM channel is at least Registered and your phone number has to be a registered Test Device
  • Agent State of your RBM channel is Launched

What’s Next