Skip to main content

Contacts API

The Contacts API allows you to create, retrieve, update, and manage contacts in Lumant.

Endpoints

Method

Endpoint

Description

POST

/contacts/upsert

Create or update a contact

POST /contacts/upsert

Creates a new contact in Lumant.

If the endpoint uses upsert logic, an existing contact can be updated instead when the same contact is submitted again.

Request

POST /contacts Content-Type: application/json

Body

{
"name": "Peter Jensen",
"email": "[email protected]",
"contactListReference": "CONTACT_LIST_REFERENCE",
"isSubscribed": true
}

Parameters

Parameter

Type

Description

name

string

The name of the contact

email

string

The email address of the contact

contactListReference

string

The Reference of the contact list the contact should be added to*

isSubscribed

boolean

Indicates whether the contact is subscribed

*The reference can be found by navigating to the contact list, and copying from the HTML.

Example

curl \   -X POST \   "https://users.lumant.dk/api/v1/contacts/upsert" \   -H "Content-Type: application/json" \   -d '{     "name": "Peter Jensen",     "email": "[email protected]",     "contactListReference": "CONTACT_LIST_REFERENCE",     "isSubscribed": true   }'

Response

200 Ok

Status codes

Status

Description

201

The contact was created successfully

400

The request contains invalid data

404

The requested resource was not found

500

An internal server error occurred

Did this answer your question?