SeeRM Docs

Lead API

Create custom endpoints to send or receive lead data to and from SeeRM.

Overview

SeeRM provides open APIs for leads so you can create custom endpoints for three main purposes:

  1. Incoming Leads - Create new leads automatically
  2. Incoming Lead Updates - Update existing leads
  3. Outgoing Leads - Retrieve lead information from SeeRM for external systems

Only Admins can create, modify, or update APIs.
API management is done in Admin → API.

All lead APIs use the same endpoint structure:

https://example.seerm.se/api/lead/1752825914353

The ID at the end is the API configuration you created in SeeRM.


Incoming Leads API

When creating an Incoming Leads API, you define:

  • A name for the API
  • Which source should be set on created leads
  • Which type should be set on created leads
  • Optional authentication using a secret value for Bearer authorization

You can also configure whether to:

  • Allow lead creation if the customer exists - Creates the lead on the existing customer
  • Block lead creation if the customer exists - Returns a 409 error

You can choose how the customer should be validated:

  • Email and phonenumber (default)
  • Email only
  • Phonenumber only

Fields

  • A list of available fields is shown when setting up the API
  • Fields marked with a red * are mandatory
  • You can rename fields to match the external system

Example

The exact field names depend on your mapping, but a typical payload can look like this:

{
  "name": "Heat Pump - Anna Svensson",
  "customer_name": "Anna Svensson",
  "email": "[email protected]",
  "phonenumber": "46701234567",
  "street": "Storgatan 12",
  "zipcode": "11122",
  "city": "Stockholm",
  "info": "Interested in installation before summer."
}

Incoming Lead Update API

When creating an Incoming Lead Update API, you define:

  • A name for the API
  • Scope for sources or types that this API is allowed to update (leave empty to allow all)
  • Which lead fields the API is allowed to update
  • Optional authentication using a secret value for Bearer authorization

This API only updates the fields that are included in the request.

Fields

  • A list of available fields is shown in the setup
  • You can rename fields to match the external system

Example

All fields are optional for updates. Include only the values you want to change.

{
  "name": "Heat Pump - Anna Svensson",
  "priority": "High",
  "status": "Contacted",
  "info": "Customer asked for an updated quote.",
  "closeDate": "2026-04-15"
}

Outgoing Leads API

The Outgoing Leads API allows you to send lead data out of SeeRM to external systems.

When creating it, you define:

  • A name for the API
  • Authentication, which is mandatory, using a secret value for Bearer authorization
  • Which sources and types are available through the API (leave empty to allow all)
  • Which values should be visible in the response

Endpoint Usage

You can use the endpoint in two ways:

  1. Fetch a specific lead
    https://example.seerm.se/api/lead/1752825914353?name=<leadname>
  2. Fetch multiple leads
    https://example.seerm.se/api/lead/1752825914353

Notes for multiple leads:

Maximum return is 100 leads. If you get exactly 100, there may be more. Adjust filters or scope accordingly.

You can use optional query parameters for filtering and sorting:

fromDate - Start date (recommended format: YYYY-MM-DD, for example 2026-03-01)

toDate - End date (same format as fromDate)

sortField - Field used for sorting

sortOrder - asc or desc

All parameters can be combined as needed.

Example

The JSON payload depends on which values you choose to make visible when creating the API. Fields that are not enabled are omitted from the response.

  • Single lead: the response is wrapped in lead: { ... }
  • Multiple leads: the response is wrapped in leads: [ ... ]

Below is an example response when common lead fields are enabled:

{
  "lead": {
    "name": "Heat Pump - Anna Svensson",
    "status": "Qualified",
    "source": "Website",
    "type": "Installation",
    "priority": "High",
    "value": 15000,
    "closeDate": "2026-04-15",
    "info": "Customer wants installation before summer.",
    "customer": {
      "name": "Anna Svensson",
      "email": "[email protected]",
      "number": "46701234567"
    },
    "address": {
      "street": "Storgatan 12",
      "zipcode": "11122",
      "city": "Stockholm",
      "country": "SE"
    }
  }
}

On this page

Ask AI