Lunar Send

Rest API endpoints for emails

Sending email

Description:

Creates a new contact and stores it in the CRM system.

Request Headers:

x-api-key: <your-api-key>

Request Method:

POST

Fields:

firstName

String

Required

First name of contact

email

String

Required

Email of contact

company

String

Company that contact works at

phone

integer

Phone number of contact

Request Example

{
   "firstName": "John",
   "lastName": "Doe",
   "email": "johndoe@example.com",
   "phone": "+1234567890",
   "company": "Example Inc.",
   "jobTitle": "Sales Manager",
   "notes": "Interested in product demo"
}
           
                       

Returns:

Status : 200

id

String

Id of the newly created contact

Response Example

{
   "id": "12345678901234567890"
}
           
                       
Fetching email analytics

Description:

Querrys your contact list and returns matching contacts

Request Headers:

x-api-key: <your-api-key>

Request Method:

GET

Fields:

searchby

String

Required

Parameters to search by. Search must be a valid contact field.

search

String

Required

Term to search by

Request Example

{
   "searchby": "company",
   "search": "Example Inc."
}
           
                       

Returns:

Status : 200

id

String

Id of the newly created contact

Response Example

{
   "id": "12345678901234567890"
}
           
                       
Scheduling Emails

Description:

Edit the fields of a contact

Request Headers:

x-api-key: <your-api-key>

Request Method:

POST

Fields:

contact_id

String

Required

Id of contact to update

update_fields

Object

Required

Object that contains the properties to update on the contact
these properties are:
name, email, phone

Request Example

{
   "contactID": "12345678901234567890",
   "updateFields": {
      "email": "example@example.com",
      "phone": 1234567890
   }
}
           
                       

Returns:

Status : 200

id

String

Id of the newly created contact

Response Example

{
   "id": "12345678901234567890"
}
                       
Deleting Contact

Description:

Deletes a contact from the CRM system

Request Headers:

x-api-key: <your-api-key>

Request Method:

DELETE

Fields:

contact_id

String

Required

Id of contact deal to delete

Request Example

{
   "contact_id": "12345678901234567890"
}
          
                      

Returns:

Status : 200

Response Body

"Document deleted successfully"

Response Example

Document deleted successfully