API Documentation

Authentication

Authenticate Request

Authenticates a request using a provided access token.

  • URL: /authenticate
  • Method: GET
  • Headers:
    • api_key (string, required) – The API Key for authentication.

Response:

  • 200 OK – Successful authentication.
				
					{
    "status": "success",
    "firm": 123,
    "firm_name": "Example Firm"
}

				
			
  • 401 Unauthorized – Invalid access token or unauthorized request.
 
				
					{
    "status": "error",
    "error": "Unauthorized",
    "firm": null
}
				
			

Campaigns

Get Email Campaigns

Retrieves a list of email campaigns.

  • URL: /campaign_meta_data
  • Method: GET
  • Parameters:
    • api_key (string, required) – The API key for authentication.

Response:

  • 200 OK – Successful request.
				
					[
    {
        "id": 123,
        "name": "Campaign 1"
    },
    {
        "id": 124,
        "name": "Campaign 2"
    },
    ...
]
				
			

Contact Lists

Get Contact Lists

Retrieves a list of contact lists.

  • URL: /contact_list_meta_data
  • Method: GET
  • Parameters:
    • api_key (string, required) – The API key for authentication.

Response:

  • 200 OK – Successful request.
				
					[
    {
        "id": 123,
        "name": "Contact List 1"
    },
    {
        "id": 124,
        "name": "Contact List 2"
    },
    ...
]
				
			

Contact Management

Add Contact to List

Adds a contact to a specified contact list.

  • URL: /handle_add_to_list
  • Method: POST
  • Parameters:
    • api_key (string, required) – The API key for authentication.

Request Body:

				
					{
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "contact_list": "List 1"
}
				
			

Response:

  • 201 Created – Contact successfully added to the list.
				
					{
    "id": 123,
    "name": "List 1"
}
				
			
  • 401 Unauthorized – Invalid API key.
 
				
					{
    "error": "Wrong Api Key"
}
				
			
  • 422 Unprocessable Entity – Unable to find the specified contact list.
 
				
					{
    "error": "Unable to find list"
}
				
			

Create Contact

Creates a new contact.

  • URL: /handle_contact_create
  • Method: POST
  • Parameters:
    • api_key (string, required) – The API key for authentication.

Request Body:

				
					{
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com"
}
				
			

Response:

  • 201 Created – Contact successfully created.
				
					{
    "id": 123,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com"
}
				
			
  • 401 Unauthorized – Invalid API key.
				
					{
    "error": "Wrong Api Key"
}
				
			
  • 422 Unprocessable Entity – Error occurred during contact creation.
				
					{
    "error": "Unprocessable Entitiy"
}