Send Message

Sending an SMS message is really easy as the only thing you need is a user's phone number.

  1. In administration, go to Mobile channel detail. If you don't have any, connect one mobile provider first, i.e. MessageBird.
  2. Copy the "Channel ID" in detail page for later use.
  1. You will also need organisation_access_token. Go to Settings - API on the left and copy your secret access token.
  2. Send a text message to your phone number using Send Text Message API (note that the phone number in response is in E.164 format).
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!"
  }
}
  1. Observe incoming SMS on your mobile phone.

📘

Postman

Use Postman to test different API calls. Don't forget to set environment properties: access_token, mobile.channel.id and mobile.contact.id.


What’s Next