ConvoqDocumentation Version 1.0.0

Use the workspace · For your customers

API, webhooks and the chat widget

Connect other systems to a workspace.

Workspaces whose plan includes the API feature find everything on this page under Settings → Developers in their workspace.

#API keys

Open Settings → API keys and press New API key.

  1. Name. Where the key is used, for example "Shop backend".
  2. Permissions. Tick only what the other system needs.
  3. Expires. Never, or after a number of days.
  4. Press Create key. The key is shown only this once; copy it and keep it safe.

Send the key with every request:

Authorization: Bearer convoq_sk_...

#Sending a message

curl -X POST https://your-domain.com/api/public/v1/messages \
  -H "Authorization: Bearer convoq_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"channelId":"<channel id>","to":"+12025550147","text":"Your order has shipped."}'

The full reference is built into the app under Settings → Developers → API reference. The OpenAPI document is at https://your-domain.com/api/public/v1/openapi.json.

#Trying the API in Postman

The postman folder of the package holds a ready collection with every request of the API, a description and example answers for each, and an environment file.

  1. In Postman press Import and choose both files: convoq-api.postman_collection.json and convoq-api.postman_environment.json. Choose the Convoq API environment at the top right.

  2. In the environment set base_url to https://your-domain.com/api/public/v1 with your own domain, api_key to a key from Settings → API keys, and phone to a number that may receive a test message.

  3. Send the requests from top to bottom, or press Run on the collection. Each request checks its answer, and the ids that later requests need (channel, message, conversation, contact) are saved by themselves.

A full run sends a real message to phone, replies in that conversation and marks it resolved, and creates and then deletes one test contact. Use a workspace and a number meant for testing.

#Webhooks

A webhook is a signed HTTP call that Convoq makes to your own system when something happens: a new message, a delivery update, a conversation that was created, assigned or rated, a contact that was added or changed, or a form answer. Failed calls are tried again, and every call is listed in a delivery log.

Open Settings → Webhooks and press Add webhook.

  1. Endpoint URL. A public https address on your server.
  2. All events sends every event, including ones added in later versions. Or tick single events below.
  3. Press Add webhook.

The webhook's details show its signing secret, a Send test event button and the recent deliveries, each of which can be sent again.

#The website chat widget

The website chat is added to any site with the script tag shown after connecting the Website chat channel:

<script src="https://your-domain.com/widget.js" data-widget="<widget key>" async></script>

#Automations started by another system

An automation with the trigger "Another system calls a webhook" has its own secret address. A shop, a form tool or Zapier sends a JSON request to it, and the automation writes to the person in to from the chosen WhatsApp number. Every field of the request can be used in the steps as {{webhook.field}}.

curl -X POST https://your-domain.com/api/v1/hooks/<secret> \
  -H "Content-Type: application/json" \
  -d '{"to":"+12025550147","name":"Karim","order":{"id":"A-17"}}'

#Google Sheets in automations

The step "Google Sheets" adds a row, finds a row or updates a row. Each workspace connects its own Google service account under Settings → Integrations:

  1. In Google Cloud Console, enable the Google Sheets API for a project.

  2. Create a service account and download its JSON key.

  3. Paste the key under Settings → Integrations.

  4. Share the spreadsheet with the service account's email address as an editor.

The platform owner has nothing to set up for this.

Convoq documentation, version 1.0.0. Screens show demo data.