- API keys and tokens – how machine access is granted and authenticated.
- Accounts and Organizations – how access is scoped and where data lives.
- Assets and asset types – the flexible data model at the heart of Lexful.
- Filtering – advanced property-level filtering with operators.
- Paginating results – how list endpoints return results in pages.
API keys and tokens
API keys (ID and secret) are long-lived credentials you create in the Lexful dashboard. Use them to obtain short-lived Bearer tokens via the auth endpoint, and use those tokens on API calls.Accounts
Lexful APIs are scoped by account. TheX-Account-ID header identifies which account a request applies to. Within an account, you may have one or more organizations or similar entities.
Organizations
Organizations represent entities (companies, departments, teams, etc.) within your account. Every organization belongs to an account and can be classified with a type and a status, both of which are configurable via the API. Key characteristics:- Hierarchy – Organizations can have a
parent_id, allowing you to model parent-child relationships. - Types and statuses – Use organization types (e.g., “client”, “vendor”) and statuses (e.g., “active”, “onboarding”) to categorize and filter organizations. Both support system-defined and custom values.
- Asset scoping – Assets are scoped to an organization via
organization_id. When listing assets you can filter by organization.
Asset types
Asset types define the schema for a category of data in Lexful. Think of an asset type as a table definition — it declares the properties (fields) and references (relationships to other asset types) that its assets can have. Key characteristics:- System vs. custom – Some asset types are built-in (
is_system: true). You can extend system types by adding properties or references prefixed withext_. Custom asset types are fully user-defined. - Properties – Each property has a name and a type (string, number, boolean, date, richtext, and more). Properties define what data an asset of this type can hold.
- References – Named links from one asset type to another, enabling you to model relationships (e.g., a “contract” asset type referencing a “vendor” asset type).
Assets
Assets are the core data records in Lexful. Each asset belongs to an asset type and typically belongs to an organization. All asset endpoints are scoped by the asset type name in the URL path:/v1/assets/{assetTypeName}.
Key characteristics:
- CRUD – Create, read, update, and delete assets of any type. Deletes are soft-deletes (archiving); use
include_deletedto retrieve archived records. - Filtering and search – List endpoints support filtering by
organization_id,name, full-textsearch, field selection (fields), sorting, and pagination. - Reference expansion – Pass
expand=referencesorexpand=references.referenceNameto inline related data in responses instead of making separate calls. - Related assets – Link assets to each other across types using the
/v1/assets/{assetTypeName}/{assetId}/relatedendpoints. - Files – Attach files to assets and manage uploads and downloads through dedicated file endpoints.
- Revisions – Every update to an asset is tracked. Use the revisions endpoints to view an asset’s change history or retrieve a specific past version.
- Secure properties – Sensitive values can be stored encrypted and retrieved through a dedicated secure endpoint.
Filtering
When listing assets or organizations, you can go beyond simple query parameters and filter on any property using bracket notation:field[operator]=value.
Comparison operators
| Operator | Description | Example |
|---|---|---|
eq | Equals | important[eq]=true |
ne | Not equals | status[ne]=closed |
gt | Greater than | budget[gt]=10000 |
gte | Greater than or equal | created_at[gte]=2024-01-01 |
lt | Less than | budget[lt]=50000 |
lte | Less than or equal | created_at[lte]=2024-12-31 |
Range and set operators
| Operator | Description | Example |
|---|---|---|
between | Between two values (comma-separated) | budget[between]=10000,50000 |
in | Matches any value in set | contact_type[in]=Decision Maker,Influencer |
nin | Not in set | status[nin]=closed,archived |
null | Is null / is not null | deleted_at[null]=true |
Text matching operators
| Operator | Description | Example |
|---|---|---|
like | Case-sensitive pattern match | name[like]=Acme% |
ilike | Case-insensitive pattern match | name[ilike]=acme% |
contains | Substring match | first_name[contains]=john |
startswith | Starts with | name[startswith]=Project |
endswith | Ends with | email[endswith]=@example.com |
Array operators
| Operator | Description | Example |
|---|---|---|
array_contains | Array contains an exact object match | contact_methods[array_contains]={"type":"Email"} |
array_empty | Array is empty or not | contact_methods[array_empty]=false |
array_length_eq | Array length equals | milestones[array_length_eq]=3 |
array_length_gt | Array length greater than | contact_methods[array_length_gt]=0 |
array_length_gte, array_length_lt, array_length_lte, array_length_ne | Other array length comparisons | milestones[array_length_gte]=1 |
Filtering by references
Filter assets by their references using dot notation:references.referenceName=id. Pass multiple IDs as a comma-separated list.
Combining filters
Multiple filters can be combined in a single request. All filters are applied together (AND logic):Paginating results
All list endpoints in the Lexful API use offset-based pagination with a consistent interface.Request parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 100 | Number of items to return (1–1000). |
offset | number | 0 | Number of items to skip before returning results. |
Response shape
Every paginated response includes these fields alongside the results:| Field | Type | Description |
|---|---|---|
items | array | The page of results. |
total | number | Total number of items available across all pages. |
limit | number | The limit that was applied. |
offset | number | The offset that was applied. |
Iterating through pages
Incrementoffset by limit on each request until offset >= total: