agentlyleads docs
Custom Fields API

List, create, update and delete custom fields

Definition IDs are fenced by workspace: an ID from another workspace returns the same 404 as one that does not exist.

GET /api/v1/custom-fields

Definitions in form order. Requires read:custom-fields.

GET /api/v1/custom-fields?entity=DEAL HTTP/1.1
Host: agentlyleads.com
Authorization: Bearer alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

entity is optional and case-insensitive. Returns { "customFields": [ ... ] }.

GET /api/v1/custom-fields/{id}

One definition. Returns { "customField": {...} }.

POST /api/v1/custom-fields

Define a field. Requires write:custom-fields.

{ "entity": "DEAL", "label": "Deal size", "type": "SELECT", "options": ["Small", "Large"], "required": false }
  • The key comes from the label. If it is taken on that record type, a number is added (deal_size_2).
  • options apply only to SELECT and MULTISELECT. Blanks and duplicates are dropped.

Returns 201 with { "customField": {...} }.

PATCH /api/v1/custom-fields/{id}

Change label, options, required or order. Only the fields you send change.

{ "options": ["Small", "Medium", "Large"] }

type, key and entity can't be changed, because values already saved on records depend on them. Delete the field and create a new one instead.

Setting required: true means any later create or update that sends custom fields for that record type must include a value, including API writes.

DELETE /api/v1/custom-fields/{id}

Deletes the definition. The field disappears from forms. Values already saved on records are not shown any more and can be dropped the next time that record's custom fields are saved.

{ "deleted": 1, "id": "cmq5cfd00alk34567890" }

On this page