Skip to content
Docs
Qubitara Connect

Quickstart

Updated Version 3QC-2

Make your first API request in about five minutes. By the end you will have listed your contacts and created one.

Before you start#

  • A Qubitara Connect account with an organization.

  • A role that can manage API keys. Owners, Admins and Developers can.

  • A terminal, or Node.js 18 or Python 3.9 if you prefer a language example.

Step 1. Create an API key#

  1. Open Developer → API Keys in the console and choose to create a key.

  2. Name it, for example "Quickstart".

  3. Tick the scopes contacts.view and contacts.create.

  4. Copy the key. It is shown once.

Step 2. Set two variables#

QUBITARA_BASE_URL is the address of your Qubitara Connect deployment followed by /api/v1. QUBITARA_API_KEY is the key you just copied.

text
export QUBITARA_BASE_URL="https://YOUR-HOST/api/v1"
export QUBITARA_API_KEY="qc_live_..."

Step 3. Make your first request#

List your contacts. Every request carries the key as a bearer token.

text
curl "$QUBITARA_BASE_URL/contacts?limit=1" \
  -H "Authorization: Bearer $QUBITARA_API_KEY"
text
const response = await fetch(`${process.env.QUBITARA_BASE_URL}/contacts?limit=1`, {
  headers: { Authorization: `Bearer ${process.env.QUBITARA_API_KEY}` },
});
console.log(await response.json());
text
import os, requests

response = requests.get(
    os.environ["QUBITARA_BASE_URL"] + "/contacts",
    params={"limit": 1},
    headers={"Authorization": "Bearer " + os.environ["QUBITARA_API_KEY"]},
)
print(response.json())

On a new organization the response is an empty list:

text
{
  "success": true,
  "message": "Success",
  "data": [],
  "meta": { "page": 1, "limit": 1, "total": 0, "pages": 1, "hasNext": false, "hasPrev": false }
}

If you get a 401, check the key. If you get a 403 with "Missing permission", the key lacks a scope.

Step 4. Create a contact#

A contact needs at least one of firstName, lastName, displayName, email or phone.

text
curl -X POST "$QUBITARA_BASE_URL/contacts" \
  -H "Authorization: Bearer $QUBITARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"firstName": "Asha", "lastName": "Rao", "email": "[email protected]", "phone": "+919800000000"}'

The response has success: true, the message "Contact created." and the new contact in data, including its id. The contact has more fields than the ones you sent, such as tags, lifecycleStage and createdAt.

Step 5. Check that it worked#

Open Contacts and CRM in the console. The new contact is in the list. Or repeat the request in step 3 and see it in data.

Next steps#

  • Authentication and API keys

  • API reference

  • Webhooks, so your system hears about changes without asking