eva crm Public API
Leads

Field reference

GET /v1/leads/fields — every field POST accepts, with limits and valid values, generated from the validator itself.

GET List fields

GET/v1/leads/fields

Describes every field create a lead accepts, keyed by the exact property name you send: type and limits for scalars, and the valid values for option fields. It is generated from the same definitions the validator uses, so it cannot disagree with what the API accepts. No parameters.

Fetch it once when your integration starts, and again when a POST comes back 422, rather than hard-coding values. Cached for five minutes (Cache-Control: private, max-age=300). For a large organisation the full response runs to a few hundred KB, most of it campaigns.

Responses
200
`fields` keyed by property name, and `requirements`, the cross-field rules.
Example request
curl https://api.evacrm.co.uk/v1/leads/fields \
  -H "Authorization: Bearer sk_..."
Example response · 200
{
  "fields": {
    "reference":  { "type": "string", "required": true, "maxLength": 200 },
    "email":      { "type": "string", "maxLength": 255, "format": "email" },
    "yearBuilt":  { "type": "integer", "min": 1000, "max": 2200 },
    "expectedCloseDate": { "type": "date" },
    "marketingEmail":    { "type": "boolean" },
    "advancedData":      { "type": "object" },
    "leadType": {
      "type": "option",
      "options": [
        { "id": "3340ec93-2b79-4134-a2be-b5c890dd3f25", "name": "Repairs" },
        { "id": "0ef1e6df-6dcd-4e61-b8e4-6218257bcc0d", "name": "Conservatories" }
      ]
    },
    "leadProductTypes": { "type": "option", "multiple": true, "maxItems": 50, "options": [ "…" ] },
    "marketing": {
      "type": "option",
      "options": [ { "id": "115f1cc5-…", "name": "Website" } ]
    },
    "subSourceCampaign": {
      "type": "option",
      "dependsOn": "marketing",
      "options": [ { "id": "339b463f-…", "name": "2021/05 May", "marketing": "115f1cc5-…" } ]
    },
    "assignedTo": {
      "type": "option",
      "options": [ { "id": "cd9356b7-…", "name": "Tuan Dinh", "email": "tuan@example.com" } ]
    },
    "name": { "type": "string", "maxLength": 200, "deprecated": true, "replacedBy": ["firstName", "lastName"] }
  },
  "requirements": [
    "reference",
    "one of: firstName, lastName, companyName",
    "one of: email, phoneNumber, mobile"
  ]
}

Reading it

typeExtra keysSend
stringmaxLength, required, format (email)A string
integermin, maxA number, or a numeric string
booleanSee booleans
dateISO 8601
objectAny JSON object
optionoptions, multiple + maxItems, dependsOnAn option's id or name; an array of them when multiple
  • options are the values valid for your organisation. title, country, leadType and the other CRM-wide lists are the same for everyone; marketing, subSourceCampaign and assignedTo are yours, active ones only.
  • subSourceCampaign options carry the id of their marketing source, so a form can filter campaigns once a source is picked. dependsOn says which field that is.
  • leadProductTypes shares its list with mainInterest; that is how the CRM models it.
  • deprecated fields are the old webhook's names. They still work; new integrations should use replacedBy.
  • requirements are the cross-field rules a single field cannot express.

GET Get a field

GET/v1/leads/fields/{field}

One field, in the same shape, with field added.

Path parameters
fieldstringRequired

The property name as you send it, such as subSourceCampaign or assignedTo.

Responses
200
The field's description.
404
Not a field the API accepts, with a hint.
Example request
curl https://api.evacrm.co.uk/v1/leads/fields/subSourceCampaign \
  -H "Authorization: Bearer sk_..."
Example response · 200
{ "field": "subSourceCampaign", "type": "option", "dependsOn": "marketing", "options": [ "…" ] }

On this page