Endpoints
Method | Endpoint | Description |
|
| 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 |
| string | The name of the contact |
| string | The email address of the contact |
| string | The Reference of the contact list the contact should be added to* |
| 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 |
| The contact was created successfully |
| The request contains invalid data |
| The requested resource was not found |
| An internal server error occurred |

