NAV

Introduction

Turn is a chat platform for personal, realtime support supercharged by AI

We provide an easy to use integration for MoyaApp detailed below. If you run into any issues, or have questions or feedback, please let us know by sending a message to api-support@moya.app.

Setup steps

Get a Moya token and endpoint

Please contact us at api-support@moya.app with your details to get the account set up. We will provide you with a token, and optionally a number if you don't have an existing number to use.

Turn configuration

In your Turn account, go to settings > API & Webhooks. Add a webhook endpoint to the following endpoint: https://messaging-bridge.moya.app/v1/webhook/turn/<your moya token>

Create an authentication token by going to Settings > API & Webhooks. Click on "Create a Token" to create an authentication token.

Required Parameters

Once the steps above have been completed you will have all the required parameters to complete the integration.

Applying turn configuration

Once all the parameters above are ready, email them to api-support@moya.app

Testing the integration

Once the integration is complete you can send a test message using the following curl request:

Example Request

curl -X 'POST' \
  'https://messaging-bridge.moya.app/webhook/<bot phone number>' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "message":
    {
      "type":"text",
      "from":"number to receive response",
      "text":
        {
          "body":"chatbot wake word/phrase"
        }
     }
}'

Example Response

{
  "message": "success"
}

If the integration was successful you should see a message on your turn inbox