APIReferenceDirectory
List custom fields
The custom fields defined in the workspace — the keys that custom_attributes of contacts
and conversations can carry. The whole list comes at once.
Authorization
personalToken AuthorizationBearer <token>
Your personal access token from Profile → Access Token in Lalexi. It acts with exactly your role: what you may see and do in the workspace, and nothing more. Everything done with it is recorded as done by you.
In: header
Query Parameters
applies_to?string
Only the fields of contacts, of conversations or of companies.
Value in
"contact" | "conversation" | "company"Header Parameters
X-Workspace-Id?integer
The workspace to work in (an id from GET /me). Optional when you belong to a single
workspace; required otherwise (400 workspace_required).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://app.lalexi.com/v1/custom-fields" \ -H "X-Workspace-Id: 7"{
"data": [
{
"id": 0,
"key": "string",
"name": "string",
"description": "string",
"type": "text",
"applies_to": "contact",
"values": [
"string"
]
}
],
"next_cursor": "string"
}{
"error": {
"code": "workspace_required",
"message": "You belong to several workspaces: pass the X-Workspace-Id header."
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid."
}
}{
"error": {
"code": "forbidden",
"message": "You are not allowed to do this."
}
}{
"error": {
"code": "not_found",
"message": "Resource not found."
}
}{
"error": {
"code": "validation_failed",
"message": "The request is invalid.",
"details": {
"email": [
"is invalid"
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the number of seconds in Retry-After."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side."
}
}