Skip to main content

Documentation Index

Fetch the complete documentation index at: https://help.daylit.com/llms.txt

Use this file to discover all available pages before exploring further.

The Daylit AR Agent API uses token-based authentication. Every request to a protected endpoint must include a valid token in the Authorization header. Without it, the API returns a 401 Unauthorized response and does not process the request.

Obtain your token

You get a token by logging in with your Daylit username and password. Send a POST request to the login endpoint with your credentials:
POST /api/v1/auth/login/
Request body:
{
  "username": "you@yourcompany.com",
  "password": "your-password"
}
Response:
{
  "token": "abc123yourauthtoken",
  "user": { ... },
  "companies": [ ... ]
}
Store the token value from the response. You will include it in every subsequent API request.
You can also find or regenerate your token from the Daylit web app under Settings → API Access, if that feature is enabled on your instance.

Include the token in requests

Add the token to the Authorization header of every request using the Token prefix:
Authorization: Token abc123yourauthtoken
Use Token (not Bearer). The Daylit API requires the Token prefix in the Authorization header.

Code examples

curl https://your-instance.com/api/v1/companies/{company_id}/customers \
  -H "Authorization: Token abc123yourauthtoken"

Authentication failures

If your token is missing, invalid, or expired, the API returns:
{
  "detail": "Authentication credentials were not provided."
}
with an HTTP 401 Unauthorized status. Obtain a fresh token by logging in again via POST /api/v1/auth/login/ and retry your request.

Find your company ID

Every resource endpoint requires a {company_id} UUID in the path. This ID scopes all data to a specific company. You can find your company ID in either of these places:
  • Dashboard URL — After logging in, the URL in your browser contains the company UUID (for example, https://your-instance.com/app/companies/3fa85f64-5717-4562-b3fc-2c963f66afa6/dashboard).
  • Login response — The POST /api/v1/auth/login/ response includes a companies array. Each entry has an id field with the company UUID.
{
  "companies": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "company_name": "Your Company Inc."
    }
  ]
}
If you have access to multiple companies, use the appropriate company_id for each request. The company ID scopes all resource reads and writes to that company’s data.

API overview

See all available resource groups, base paths, and response conventions.

Customers API

Start making authenticated requests to list and manage customer records.