Skip to main content

List Custom Fields

Retrieve a paginated list of all custom fields.

Request

GET /custom-fields

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (min: 1)
per_pageinteger100Items per page (min: 1, max: 100)
searchstring-Search by name or field_key (max 255 characters)

Ordering: Results are ordered by created_at descending (newest first).

Example Request

curl -X GET "https://email.easy.tools/api/v1/custom-fields?page=1&per_page=50&search=company" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"

Response

Success Response (200 OK)

{
"data": [
{
"uuid": "field-uuid-123",
"field_key": "company",
"name": "Company",
"type": "text",
"options": null,
"created_at": "2025-01-15T10:30:00Z"
},
{
"uuid": "field-uuid-456",
"field_key": "plan",
"name": "Plan",
"type": "select",
"options": ["free", "pro", "enterprise"],
"created_at": "2025-01-14T09:00:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 2
}
}

Response Fields

FieldTypeDescription
uuidstringField's unique identifier
field_keystringUnique key for the field
namestringDisplay name
typestringField type
optionsarray|nullOptions for select fields, null for other types
created_atstringISO 8601 timestamp (UTC)

Pagination Object

FieldTypeDescription
current_pageintegerCurrent page number
per_pageintegerNumber of items per page
totalintegerTotal number of custom fields

Error Responses

Validation Error (422 Unprocessable Entity)

{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"per_page": ["The per page must not be greater than 100."]
}
}
}