Skip to main content
While the HoopAI Platform API can be called directly with any HTTP client, these tools make development faster.

Official resources

OpenAPI specifications

Every API module includes a downloadable OpenAPI 3.0 spec. Use it to auto-generate client libraries, types, or test stubs.

API playground

The API Reference includes an interactive playground where you can make live API calls directly from the docs.

Using OpenAPI specs

Each API section has an openapi.json file. You can use these with popular code generation tools:
Generate TypeScript types from the spec:
npx openapi-typescript https://services.leadconnectorhq.com/contacts/openapi.json -o ./types/contacts.ts

HTTP client examples

JavaScript / TypeScript

// Simple wrapper for HoopAI API calls
const HOOPAI_BASE = 'https://services.leadconnectorhq.com';

async function hoopai(endpoint, { method = 'GET', body, token, locationId } = {}) {
  const url = new URL(endpoint, HOOPAI_BASE);
  if (locationId) url.searchParams.set('locationId', locationId);

  const response = await fetch(url, {
    method,
    headers: {
      'Authorization': `Bearer ${token}`,
      'Version': '2021-07-28',
      ...(body && { 'Content-Type': 'application/json' })
    },
    ...(body && { body: JSON.stringify(body) })
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(`${response.status}: ${error.message}`);
  }

  return response.json();
}

// Usage
const contacts = await hoopai('/contacts/', {
  token: 'YOUR_TOKEN',
  locationId: 'YOUR_LOCATION_ID'
});

Python

import requests

class HoopAI:
    BASE_URL = 'https://services.leadconnectorhq.com'

    def __init__(self, token, location_id):
        self.session = requests.Session()
        self.session.headers.update({
            'Authorization': f'Bearer {token}',
            'Version': '2021-07-28',
            'Content-Type': 'application/json'
        })
        self.location_id = location_id

    def get(self, endpoint, **params):
        params['locationId'] = self.location_id
        resp = self.session.get(f'{self.BASE_URL}{endpoint}', params=params)
        resp.raise_for_status()
        return resp.json()

    def post(self, endpoint, data):
        data['locationId'] = self.location_id
        resp = self.session.post(f'{self.BASE_URL}{endpoint}', json=data)
        resp.raise_for_status()
        return resp.json()

# Usage
api = HoopAI('YOUR_TOKEN', 'YOUR_LOCATION_ID')
contacts = api.get('/contacts/', limit=20)

Testing with Postman

1

Import the OpenAPI spec

In Postman, click Import and paste the URL for any HoopAI OpenAPI spec (e.g., the Contacts API).
2

Set up environment variables

Create a Postman environment with:
  • base_url = https://services.leadconnectorhq.com
  • access_token = your Bearer token
  • location_id = your account ID
3

Configure authorization

Set the collection authorization to Bearer Token using {{access_token}}.

Integrations and middleware

ToolHow to use with HoopAI
ZapierUse the HoopAI Zapier integration for no-code connections
Make (Integromat)Use the Make integration for visual workflow automation
n8nConnect via the HTTP Request node using OAuth 2.0 credentials
Custom webhooksUse inbound webhooks to receive data from external systems

Next steps

Last modified on March 5, 2026