Getting Started¶
1. Get a DIY Surveys account¶
To use the API you need a DIY Surveys account. You can register on the main DIY Surveys administration platform that can be found at https://diysurveys.com.
2. Create an access token¶
The DIY Surveys API supports Basic Security and HMAC Security.
An access token can consist of two parts:
| Part | Description |
|---|---|
AppId |
Appears in the authentication header. |
Key |
For an HMAC access token, the hidden key used by your client and the API to encrypt and decrypt the authentication header. |
To save time set up default metadata to use with your messaging. Great care should be taken when setting up default metadata as unexpected results can occur where there are conflicts with the individual calls to the API.
Access tokens no longer expire. Previously they were limited to 365 days for stricter security conformity, but you no longer need to renew them to keep your API access working.
You can create as many access tokens as you require for different applications.
For more information please review our security information.
3. Add a webhook¶
Webhooks are used for callbacks. You can define multiple webhooks to handle different events in the platform. You can also define custom webhooks with many of the API methods.
4. Send a message¶
You are now ready to use the message API to send an SMS.
You can use the Webhook feature in your account to review callback configuration and success/failure activity. You can also use Message History to monitor inbound and outbound messages through your account.
4.1 Send a WhatsApp message¶
Once you have understood the basics of messaging there is further reading on understanding WhatsApp templates and using them.
4.2 Receive inbound messages¶
Set up web hooks and callbacks to receive responses from any channel and support conversational behaviour.
5. Set up an organization¶
An organization is like an account, with the difference that you can share it with others in the DIY Surveys Platform. Use your own account as a test environment and an Organization as the live environment. Work with other team members to coordinate your efforts.