Entity Types
List entity types and view their field definitions.
Entity Types API
Read-only endpoints to list your custom entity types and their field definitions. Requires an API token with entity_types.view ability.
List Entity Types
GET /api/v1/entity-types — Permission: entity_types.view
Returns only active entity types, sorted by position.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | No | Results per page, 1–100 (default: 25) |
Example Request
curl -X GET "https://your-domain.com/api/v1/entity-types" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"const response = await fetch("https://your-domain.com/api/v1/entity-types", {
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
});
const data = await response.json();$ch = curl_init('https://your-domain.com/api/v1/entity-types');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);import requests
response = requests.get(
"https://your-domain.com/api/v1/entity-types",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
)
data = response.json()Example Response
{
"data": [
{
"id": 1,
"name": "Projects",
"slug": "projects",
"name_singular": "Project",
"name_plural": "Projects",
"icon": "folder",
"color": "blue",
"description": "Client projects and engagements",
"is_active": true,
"fields": [
{
"id": 10,
"name": "Project Name",
"key": "project_name",
"type": "text",
"is_required": true,
"is_primary": true,
"position": 1
},
{
"id": 11,
"name": "Status",
"key": "status",
"type": "select",
"is_required": false,
"is_primary": false,
"position": 2
}
],
"record_count": 24,
"created_at": "2025-01-10T08:00:00.000000Z",
"updated_at": "2025-02-05T12:00:00.000000Z"
}
],
"meta": { "current_page": 1, "last_page": 1, "per_page": 25, "total": 1 },
"links": { "first": "...", "last": "...", "prev": null, "next": null }
}
Get Entity Type
GET /api/v1/entity-types/{slug} — Permission: entity_types.view
Retrieve a single entity type by its slug, including all field definitions.
Example Request
curl -X GET "https://your-domain.com/api/v1/entity-types/projects" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"const response = await fetch("https://your-domain.com/api/v1/entity-types/projects", {
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
});
const data = await response.json();$ch = curl_init('https://your-domain.com/api/v1/entity-types/projects');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);import requests
response = requests.get(
"https://your-domain.com/api/v1/entity-types/projects",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
)
data = response.json()Returns the same shape as a single item in the list response.
Was this article helpful?