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, under Settings → Application → API, create an application and choose the workspace user it should run as. 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 directives for the app. A directive is namespace:action — the same grammar as workspace permissions — for example objects.Record:retrieve or tickets.Ticket:create. Optionally bound it with filter, exclude, or q. There is no model: or controller: prefix. See /developer/api-applications-keys for directive details.

2. Send a retrieve request

Send requests to the tenant's API origin. Prefer the Authorization header; X-Antly-Api-Key also works.

Export the token first (export ANTLY_JQL_TOKEN='jql:kp-…::…'). Do not paste a raw key into a double-quoted -H — zsh will expand $ inside it and Antly will return API_KEY_INVALID.

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 "return": { 10 "id": null, 11 "object": { "id": null, "name": null, "namespace": null }, 12 "data": null, 13 "created": null 14 } 15 }, 16 "filter": { 17 "object__namespace": "Customer" 18 } 19 }'

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.