Quiq is a customer messaging platform that allows businesses to connect with their customers through SMS, messaging apps, web chat, and social media for support and engagement.

Welcome to the Quiq documentation for Dashbot! Integrating Dashbot into your Quiq application is quick and easy.

Obtain Quiq API Key

To securely interact with Quiq's API, follow these updated steps to authenticate and obtain an API key:

Access the Quiq Developer Portal: Log in to the Quiq platform and navigate to the Developer section.

Review API Key Permissions: Understand the permissions associated with API keys to ensure appropriate access levels for your tasks.

Generate API Key:

  • In the API section of the Developer Portal, locate the API keys management area.
  • Click on “Create API Key” and follow the prompts. Specify the scopes necessary for your operations (e.g., read or write access).
  • Securely store the generated API key, as it will only be displayed once for security reasons.

Use API Key for Authentication: In your API requests, use the obtained API key in the HTTP Authorization header as a bearer token.

For more detailed instructions, refer to the Quiq Developer Portal's Introduction section.

This enhanced guide provides a clearer path to obtaining and managing API keys with appropriate permissions for accessing Quiq’s platform, ensuring secure and effective use of their APIs.

GET Message Data from Quiq

Here's how to use Quiq's API to retrieve conversation data:

Set up the API request:

  • Endpoint: GET https://api.goquiq.com/api/v1/messaging/conversations/{conversationId}
  • Replace {conversationId} with the actual ID of the conversation you want to retrieve.

Include headers for authentication:

headers = {
    'Authorization': 'Bearer your_api_key'
}

Send the GET request:

import requests

url = "https://api.goquiq.com/api/v1/messaging/conversations/{conversationId}"
response = requests.get(url, headers=headers)
conversation_data = response.json()
print(conversation_data)

A successful response might look like this (simplified for clarity)

{
  "id": "12345",
  "participants": [
    {"id": "user_1", "role": "customer"},
    {"id": "agent_1", "role": "agent"}
  ],
  "messages": [
    {
      "id": "msg_1",
      "text": "Hello, how can I help you today?",
      "timestamp": "2020-01-01T12:00:00Z",
      "senderId": "agent_1"
    }
  ]
}

POST responses to Dashbot

When you receive a message or support ticket post the data to the following endpoint:

https://tracker.dashbot.io/track?platform=universal&v=10.1.1-rest&type=incoming&apiKey=API_KEY_HERE

Make sure to set the ‘Content-Type’ header to ‘application/json’ and to replace API_KEY_HERE with your api key.

You must send the data with the following fields:

  • text – string – (required)
  • userId – string – (required) – should be the SAME userId for both incoming and outgoing messages this is NOT the bot’s user ID

To review all optional fields see our API reference.

The data to POST should pass the following data:

{
  "text": "Hi, bot",
  "userId": "+14155551234",
  "platformJson": {
    "whateverJson": "any JSON specific to your platform can be stored here"
  }
}

Sample cURL

curl -X POST -H "Content-Type: application/json"
     -d '{"text":"Hi, bot","userId":"+14155551234","platformJson":{"whateverJson":"any JSON specific to your platform can be stored here"}}'
     'https://tracker.dashbot.io/track?platform=sms&v=11.1.0-rest&type=incoming&apiKey=API_KEY'

Notice, you must replace the placeholder API_KEY_HERE above with your api key.