How the API Works
Dalil AI exposes two interfaces:
Interface | Path | Purpose |
|---|---|---|
REST API |
| All CRUD operations |
GraphQL |
| Full-text search (returns IDs only) |
Base URL: https://app.usedalil.ai
Authentication: Every request requires Authorization: Bearer YOUR_API_KEY. Get your key from Settings → API Keys in your workspace.
Search pattern: Full-text search goes through GraphQL, which returns record IDs. You then fetch full records via REST:
Authentication
All Dalil AI API requests must be authenticated with a Bearer token. This token identifies your workspace and authorizes access to its data.
Getting Your API Key
Log in to your Dalil AI workspace at app.usedalil.ai
Navigate to Settings → API Keys
Generate a new API key
Copy and store it securely — it will not be shown again
Sending the Auth Header
Include these two headers in every request:
Example
Tip: For GET requests with complex filter parameters, use
curl -Gwith--data-urlencodeto avoid URL encoding issues:
Base URL
REST endpoints:
/rest/{resource}GraphQL endpoint:
/graphql
Error Responses
Status Code | Meaning | Common Cause |
|---|---|---|
| Unauthorized | Missing or invalid API key |
| Forbidden | Key does not have permission for this resource |
| Not Found | Record ID does not exist |
| Too Many Requests | Rate limit exceeded — back off and retry |
| Internal Server Error | Unexpected server-side failure |
When you receive a 401, check that:
The
Authorizationheader is present and spelled correctlyThe value starts with
Bearer(with a space)The API key has not been revoked in workspace settings