By using this website, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Accept All
API Documentation

Emails

The Emails API allows you to manage email communications within the Meridian CRM system.

Authentication

All requests must include a Bearer token in the HTTP header:

Authorization: Bearer ACCESS_TOKEN

Endpoints

List Emails

Description: Retrieve a list of emails from the user's organization.

Endpoint: GET api/public/v1/emails/

Optional Query Parameters:

  • search (string): Filter by email subject or content
  • ordering (string): Order results by specific fields (e.g., date, created for descending)
  • thread (UUID): Filter by email thread
  • company (UUID): Filter by associated company
  • person (UUID): Filter by associated person

Response Example:

[
  {
    "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "subject": "Meeting Follow-up",
    "content": "<p>Thank you for the productive meeting today...</p>",
    "date": "2025-04-30T14:22:18.123456Z",
    "thread": {
      "id": "9c0d1e2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
      "subject": "Meeting Follow-up"
    },
    "participants": [
      {
        "id": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b",
        "email": "jane.smith@acme-corp.com",
        "name": "Jane Smith",
        "type": "to",
        "person": {
          "id": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
          "first_name": "Jane",
          "last_name": "Smith"
        }
      },
      {
        "id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
        "email": "john.doe@example.com",
        "name": "John Doe",
        "type": "from",
        "user": {
          "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
          "first_name": "John",
          "last_name": "Doe"
        }
      }
    ]
  }
]

Get Email Details

Description: Retrieve details for a specific email.

Endpoint: GET api/public/v1/emails/{id}/

Response Example:

{
  "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "subject": "Meeting Follow-up",
  "content": "<p>Thank you for the productive meeting today...</p>",
  "date": "2025-04-30T14:22:18.123456Z",
  "thread": {
    "id": "9c0d1e2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
    "subject": "Meeting Follow-up"
  },
  "participants": [
    {
      "id": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b",
      "email": "jane.smith@acme-corp.com",
      "name": "Jane Smith",
      "type": "to",
      "person": {
        "id": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
        "first_name": "Jane",
        "last_name": "Smith"
      }
    },
    {
      "id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
      "email": "john.doe@example.com",
      "name": "John Doe",
      "type": "from",
      "user": {
        "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
        "first_name": "John",
        "last_name": "Doe"
      }
    }
  ],
  "attachments": [
    {
      "id": "3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d",
      "filename": "proposal.pdf",
      "size": 1024000,
      "content_type": "application/pdf"
    }
  ],
  "companies": [
    {
      "id": "bfcd725e-88da-41cd-8d9c-6aed5dda1a4a",
      "title": "Acme Corp"
    }
  ],
  "deals": [
    {
      "id": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
      "title": "Enterprise Software License"
    }
  ],
  "created": "2025-04-30T14:22:18.574699Z",
  "modified": "2025-04-30T14:22:18.574709Z",
  "organization": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d"
}

List Email Threads

Description: Retrieve a list of email threads.

Endpoint: GET api/public/v1/emails/threads/

Optional Query Parameters:

  • search (string): Filter by thread subject
  • ordering (string): Order results by specific fields (e.g., latest_date, created for descending)

Request Example:

[
  {
    "id": "9c0d1e2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
    "subject": "Meeting Follow-up",
    "created": "2025-04-30T14:22:18.574699Z",
    "modified": "2025-04-30T14:22:18.574709Z",
    "organization": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
    "user": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "earliest_email": {
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "date": "2025-04-30T14:22:18.123456Z"
    },
    "latest_email": {
      "id": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b",
      "date": "2025-04-30T15:45:30.123456Z"
    },
    "email_count": 3
  }
]

Get Thread Details

Description: Retrieve details for a specific email thread.

Endpoint: GET api/public/v1/emails/threads/{id}/

Request Example:

{
  "id": "9c0d1e2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
  "subject": "Meeting Follow-up",
  "created": "2025-04-30T14:22:18.574699Z",
  "modified": "2025-04-30T14:22:18.574709Z",
  "organization": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
  "user": {
    "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "first_name": "John",
    "last_name": "Doe"
  },
  "emails": [
    {
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "subject": "Meeting Follow-up",
      "content": "<p>Thank you for the productive meeting today...</p>",
      "date": "2025-04-30T14:22:18.123456Z",
      "participants": [
        {
          "email": "jane.smith@acme-corp.com",
          "name": "Jane Smith",
          "type": "to"
        },
        {
          "email": "john.doe@example.com",
          "name": "John Doe",
          "type": "from"
        }
      ]
    },
    {
      "id": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b",
      "subject": "Re: Meeting Follow-up",
      "content": "<p>Thank you for the summary...</p>",
      "date": "2025-04-30T15:45:30.123456Z",
      "participants": [
        {
          "email": "john.doe@example.com",
          "name": "John Doe",
          "type": "to"
        },
        {
          "email": "jane.smith@acme-corp.com",
          "name": "Jane Smith",
          "type": "from"
        }
      ]
    }
  ],
  "companies": [
    {
      "id": "bfcd725e-88da-41cd-8d9c-6aed5dda1a4a",
      "title": "Acme Corp"
    }
  ],
  "people": [
    {
      "id": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
      "first_name": "Jane",
      "last_name": "Smith",
      "email": "jane.smith@acme-corp.com"
    }
  ]
}

Create Email

Description: Create a new email.

Endpoint: POST api/public/v1/emails/

Request Example:

{
  "subject": "New Proposal",
  "content": "<p>Please find attached our new proposal...</p>",
  "thread": "9c0d1e2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
  "participants": [
    {
      "email": "jane.smith@acme-corp.com",
      "name": "Jane Smith",
      "type": "to",
      "person": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f"
    },
    {
      "email": "john.doe@example.com",
      "name": "John Doe",
      "type": "from",
      "user": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
    }
  ]
}

Response: Returns the created email object with HTTP 201 status code.

Update Email

Description: Update an existing email.

Endpoint: PUT api/public/v1/emails/{id}/

Request Example:

{
  "subject": "Updated Proposal",
  "content": "<p>Please find attached our new proposal...</p>"
}

Response: Returns the updated email object.

Delete Email

Description: Delete an email.

Endpoint: DELETE api/public/v1/emails/{id}/

Response: Returns HTTP 204 No Content on success.

Metadata Endpoints

Email Metadata

Description: Retrieve metadata for email fields.

Endpoint: GET api/public/v1/emails/metadata/

Request Example:

{
  "fields": [
    {
      "label": "Subject",
      "name": "subject",
      "type": "string",
      "createable": true,
      "updateable": true,
      "required": true
    },
    {
      "label": "Content",
      "name": "content",
      "type": "html",
      "createable": true,
      "updateable": true,
      "required": true
    },
    {
      "label": "Date",
      "name": "date",
      "type": "datetime",
      "createable": true,
      "updateable": false,
      "required": false
    },
    {
      "label": "Thread",
      "name": "thread",
      "type": "reference",
      "reference_to": "thread",
      "createable": true,
      "updateable": false,
      "required": false
    },
    {
      "label": "Created",
      "name": "created",
      "type": "datetime",
      "createable": false,
      "updateable": false,
      "required": false
    },
    {
      "label": "Modified",
      "name": "modified",
      "type": "datetime",
      "createable": false,
      "updateable": false,
      "required": false
    }
  ]
}

Email Thread Metadata

Description: Retrieve metadata for email thread fields.

Endpoint: GET api/public/v1/emails/threads/metadata/

Request Example:

{
  "fields": [
    {
      "label": "Subject",
      "name": "subject",
      "type": "string",
      "createable": true,
      "updateable": true,
      "required": true
    },
    {
      "label": "User",
      "name": "user",
      "type": "reference",
      "reference_to": "user",
      "createable": true,
      "updateable": false,
      "required": true
    },
    {
      "label": "Created",
      "name": "created",
      "type": "datetime",
      "createable": false,
      "updateable": false,
      "required": false
    },
    {
      "label": "Modified",
      "name": "modified",
      "type": "datetime",
      "createable": false,
      "updateable": false,
      "required": false
    }
  ]
}

Email Participant Metadata

Description: Retrieve metadata for email participant fields.

Endpoint: GET api/public/v1/emails/participants/metadata/

Request Example:

{
  "fields": [
    {
      "label": "Email",
      "name": "email",
      "type": "email",
      "createable": true,
      "updateable": true,
      "required": true
    },
    {
      "label": "Name",
      "name": "name",
      "type": "string",
      "createable": true,
      "updateable": true,
      "required": false
    },
    {
      "label": "Type",
      "name": "type",
      "type": "picklist",
      "createable": true,
      "updateable": true,
      "required": true,
      "select_options": [
        {"label": "From", "value": "from"},
        {"label": "To", "value": "to"},
        {"label": "CC", "value": "cc"},
        {"label": "BCC", "value": "bcc"}
      ]
    },
    {
      "label": "Person",
      "name": "person",
      "type": "reference",
      "reference_to": "person",
      "createable": true,
      "updateable": true,
      "required": false
    },
    {
      "label": "User",
      "name": "user",
      "type": "reference",
      "reference_to": "user",
      "createable": true,
      "updateable": true,
      "required": false
    }
  ]
}

Error Responses

  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 500 Internal Server Error: Server-side error

Data Models

Email

Field
Type
Description
id
UUID
Unique identifier
subject
String
Email subject
content
String
Email content (HTML)
date
DateTime
Email date and time
thread
UUID
Reference to email thread
organization
UUID
Reference to organization
created
DateTime
Creation timestamp
modified
DateTime
Last modification timestamp

Thread

Field
Type
Description
id
UUID
Unique identifier
subject
String
Thread subject
organization
UUID
Reference to organization
user
UUID
Reference to user who created the thread
created
DateTime
Creation timestamp
modified
DateTime
Last modification timestamp

Participant

Field
Type
Description
id
UUID
Unique identifier
email
String
Email address
name
String
Participant name
type
String
Participant type (from/to/cc/bcc)
person
UUID
Reference to person (optional)
user
UUID
Reference to user (optional)
email
UUID
Reference to email
Submit
By clicking "Submit", you agree to our Terms of Service and Privacy Policy.
Logo footer
Thank you for your interest

You can download the PDF using the button below.

Oops! Something went wrong while submitting the form.