Start Here

Quickstart: first API call

Create an API application, use its JQL token, and make a first authenticated retrieve request.

This quickstart makes one POST /jql request with an API application token. Use it when a backend service, integration worker, or private automation needs to read Antly data.

1. Create an API application

In Antly, create a system API application for the tenant. The system.App record generates an associated JqlToken when it is created. Store the token as a secret in your integration environment; tokens are bearer secrets and should not be shipped in browser code.

Then add namespace configurations for the app. A namespace configuration grants a directive such as model:objects.Record:retrieve or controller:billing.Invoice:create_payment_link, optionally bounded by filter and exclude JSON. See /developer/api-applications-keys for directive details.

2. Send a retrieve request

Send requests to the tenant's API origin:

bash
1curl -X POST "https://<tenant-domain>/jql" \ 2 -H "Authorization: Bearer $ANTLY_JQL_TOKEN" \ 3 -H "Content-Type: application/json" \ 4 -d '{ 5 "__meta__": { 6 "schema": "model", 7 "namespace": "objects.Record", 8 "intent": "retrieve", 9 "authenticationClass": "api_key", 10 "return": { 11 "id": null, 12 "object": { "id": null, "name": null, "namespace": null }, 13 "data": null, 14 "created": null 15 } 16 }, 17 "filter": { 18 "object__namespace": "Customer" 19 } 20 }'

The response body is a JQL response envelope. The returned rows are under data; message, status, pagination, and debugging details are carried beside it depending on the intent. See /reference/jql-overview and /reference/errors.

3. Create a record

Use create when the app configuration permits writes:

json
1{ 2 "__meta__": { 3 "schema": "model", 4 "namespace": "objects.Record", 5 "intent": "create", 6 "authenticationClass": "api_key", 7 "return": { 8 "id": null, 9 "data": null 10 } 11 }, 12 "object": 42, 13 "data": { 14 "name": "Acme Ltd", 15 "email": "ops@example.com" 16 } 17}

For public browser submissions, do not use api_key. Published public object forms use the public object controllers and the public authentication class; see /developer/public-access and /developer/embed-public-forms.