JAI CRM
Home Documentation API Making requests

Making requests

Conventions, listing, filtering, paging and what comes back.

Every endpoint speaks JSON over HTTPS and follows the same conventions, so learning one list teaches you all of them.

The base

https://app.jaicrm.ai/api

Listing

Every collection supports the same query parameters.

  • page and pageSize — paging, defaulting to 1 and 30.
  • sort and dir — a field key and asc or desc.
  • q — free text across the fields worth searching.
  • filters — a JSON condition group, url-encoded.
curl 'https://app.jaicrm.ai/api/crm/leads?page=1&pageSize=50&sort=createdAt&dir=desc' 
  -H 'Authorization: Bearer YOUR_KEY'

A list comes back with its rows and what it took to page them:

{
  "data": [ { "id": "…", "name": "Ravi Mehta", … } ],
  "page": 1,
  "pageSize": 50,
  "total": 128,
  "totalPages": 3
}

Creating

curl -X POST https://app.jaicrm.ai/api/crm/leads 
  -H 'Authorization: Bearer YOUR_KEY' 
  -H 'Content-Type: application/json' 
  -d '{
    "name": "Ravi Mehta",
    "email": "ravi@example.in",
    "phone": "9820000000",
    "source": "Website"
  }'

The created record comes back in full, including the id you will need to reference it later.

Updating and deleting

A PATCH changes only the fields you send — anything you leave out is untouched. A DELETE on anything destructive requires ?confirm=true, which exists so a mistaken request cannot remove data by accident.

curl -X PATCH https://app.jaicrm.ai/api/crm/leads/LEAD_ID 
  -H 'Authorization: Bearer YOUR_KEY' 
  -H 'Content-Type: application/json' 
  -d '{ "stage": "Qualified" }'

Dates and money

  • Dates are ISO 8601. A date with no time is treated as that day.
  • Money is a decimal number, not a string, and never carries a currency symbol.
  • The currency is a field on the record.

Custom fields go in custom. Anything added in Settings → Fields & rules is read and written under that object, keyed by the field’s own key, rather than at the top level.

Something missing or wrong here? Tell us — a question that needed asking usually means a page that needed writing.