POST
/
leads
Create a lead
curl --request POST \
  --url https://api.nomos.energy/leads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "plan": "pln_a5dpsx46oxi68wbph3af25c3",
  "customer": {
    "type": "person",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com"
  },
  "address": {
    "zip": "10115",
    "street": "Torstraße",
    "city": "Berlin",
    "house_number": "119"
  },
  "meter": {
    "estimated_usage": 2500,
    "type": "smart",
    "number": "1APA0195124010"
  },
  "payment_method": {
    "type": "sepa_debit",
    "sepa_debit": {
      "iban": "DE68500105178297336485",
      "account_holder": "John Doe"
    }
  },
  "previous_supplier": "mp_ctwn15y3luqsyu8umxqt730m",
  "next_possible_start": true,
  "intended_start_date": "2024-01-01",
  "change_reason": "supplier_change",
  "created_by": "john.doe@example.com",
  "metadata": {
    "utm_source": "google",
    "utm_campaign": "campaign_name",
    "user_id": "1234567890"
  }
}'
{
  "object": "lead",
  "id": "lead_a8n8ol7yd4h0wohx824f0bui",
  "subscription": "sub_a8n8ol7yd4h0wohx824f0bui",
  "subscribed_at": "2024-03-14T12:00:00Z",
  "link": "https://nomos.checkout.energy/?id=lead_a8n8ol7yd4h0wohx824f0bui",
  "created_at": "2024-03-14T12:00:00Z",
  "created_by": "john.doe@example.com",
  "last_visited_at": "2024-03-14T12:00:00Z",
  "metadata": {
    "utm_source": "google",
    "utm_campaign": "campaign_name",
    "user_id": "1234567890"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The lead to create

plan
string
required

Plan ID

Example:

"pln_a5dpsx46oxi68wbph3af25c3"

address
object
required
meter
object
required
customer
payment_method
object | null
previous_supplier
string | null

ID of the previous supplier, possible to obtain via /suppliers

Example:

"mp_ctwn15y3luqsyu8umxqt730m"

next_possible_start
boolean | null

If set to false we will request the cancellation of the previous supplier / grid operator signup to the date provided in intended_start_date. If set to true we will request the next possible date.

Example:

true

intended_start_date
string<date> | null

Intended start date of the subscription. Must be a date in the future.

Example:

"2024-01-01"

change_reason
enum<string>

Reason of changing the supplier

Available options:
supplier_change,
move_in
Example:

"supplier_change"

created_by
string | null

Email of the user who created the lead

Example:

"john.doe@example.com"

metadata
object

Metadata of the lead, can be internal data

Example:
{
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}

Response

The created lead details

object
enum<string>
required
Available options:
lead
id
string
required

Unique identifier for the lead

Example:

"lead_a8n8ol7yd4h0wohx824f0bui"

URL of the lead

Example:

"https://nomos.checkout.energy/?id=lead_a8n8ol7yd4h0wohx824f0bui"

created_at
required

Timestamp when the lead was created

Example:

"2024-03-14T12:00:00Z"

subscription
string | null

ID of the subscription, if the lead is converted to a subscription

Example:

"sub_a8n8ol7yd4h0wohx824f0bui"

subscribed_at

Timestamp when the lead was converted to a subscription

Example:

"2024-03-14T12:00:00Z"

created_by
string | null

Email of the user who created the lead

Example:

"john.doe@example.com"

last_visited_at

Timestamp when the lead was last visited

Example:

"2024-03-14T12:00:00Z"

metadata
object | null

Metadata of the lead, can be internal data

Example:
{
"utm_source": "google",
"utm_campaign": "campaign_name",
"user_id": "1234567890"
}