Get all the emails the client is a participant of.

GET /api/v1/client/{client_uuid}/emails

Headers

  • X-PLANNR-ACCOUNT-UUID string

Path parameters

  • client_uuid string Required

Query parameters

  • filter[incoming] boolean

    Filter by incoming or outgoing messages.

  • filter[uuid] string

    Filter by a comma separated list of message UUIDs.

  • include string

    Comma separated list of relationships to include in the response. Valid relationships are [firm, mailbox, participants, attachments].

  • sort string

    Field to sort by. Valid fields are [created_at, updated_at, message_created_at]. Negative sign to denote DESC. Defaults to '-message_created_at'.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data array[object]
      Hide data attributes Show data attributes object
      • uuid string
      • created_at string
      • updated_at string
      • message_created_at string
      • mailbox object
        Hide mailbox attributes Show mailbox attributes object
        • uuid string
        • created_at string
        • updated_at string
        • created_by object
          Hide created_by attributes Show created_by attributes object
          • uuid object
            Hide uuid attributes Show uuid attributes object
            • example string
            • description string
            • collection boolean
          • created_at object
            Hide created_at attributes Show created_at attributes object
            • example string
            • description string
            • collection boolean
          • updated_at object
            Hide updated_at attributes Show updated_at attributes object
            • example string
            • description string
            • collection boolean
          • type object
            Hide type attributes Show type attributes object
            • example string
            • description string
            • collection boolean
          • role object
            Hide role attributes Show role attributes object
            • example string
            • description string
            • collection boolean
          • first_name object
            Hide first_name attributes Show first_name attributes object
            • example string
            • description string
            • collection boolean
          • last_name object
            Hide last_name attributes Show last_name attributes object
            • example string
            • description string
            • collection boolean
          • name object
            Hide name attributes Show name attributes object
            • example string
            • description string
            • collection boolean
          • email object
            Hide email attributes Show email attributes object
            • example string
            • description string
            • collection boolean
          • firm object
            Hide firm attributes Show firm attributes object
            • example string
            • description string
            • collection boolean
          • primary_phone_number object
            Hide primary_phone_number attributes Show primary_phone_number attributes object
            • example string
            • description string
            • collection boolean
          • primary_email object
            Hide primary_email attributes Show primary_email attributes object
            • example string
            • description string
            • collection boolean
          • current_time_entry object
            Hide current_time_entry attributes Show current_time_entry attributes object
            • example string
            • description string
            • collection boolean
          • assigned_adviser object
            Hide assigned_adviser attributes Show assigned_adviser attributes object
            • example string
            • description string
            • collection boolean
          • assigned_administrator object
            Hide assigned_administrator attributes Show assigned_administrator attributes object
            • example string
            • description string
            • collection boolean
          • assigned_paraplanner object
            Hide assigned_paraplanner attributes Show assigned_paraplanner attributes object
            • example string
            • description string
            • collection boolean
          • introduced_by object
            Hide introduced_by attributes Show introduced_by attributes object
            • example string
            • description string
            • collection boolean
          • groups object
            Hide groups attributes Show groups attributes object
            • example string
            • description string
            • collection boolean
          • tags object
            Hide tags attributes Show tags attributes object
            • example string
            • description string
            • collection boolean
          • owners object
            Hide owners attributes Show owners attributes object
            • example string
            • description string
            • collection boolean
          • first_contact_date object
            Hide first_contact_date attributes Show first_contact_date attributes object
            • example string
            • description string
            • collection boolean
          • next_review_date object
            Hide next_review_date attributes Show next_review_date attributes object
            • example string
            • description string
            • collection boolean
          • previous_review_date object
            Hide previous_review_date attributes Show previous_review_date attributes object
            • example string
            • description string
            • collection boolean
          • anniversary_review_date object
            Hide anniversary_review_date attributes Show anniversary_review_date attributes object
            • example string
            • description string
            • collection boolean
          • with_login object
            Hide with_login attributes Show with_login attributes object
            • example boolean
            • description string
            • collection boolean
          • has_joint_account object
            Hide has_joint_account attributes Show has_joint_account attributes object
            • example boolean
            • description string
            • collection boolean
          • can_be_deleted object
            Hide can_be_deleted attributes Show can_be_deleted attributes object
            • example string
            • description string
            • collection boolean
          • joint_account_circle object
            Hide joint_account_circle attributes Show joint_account_circle attributes object
            • example string
            • description string
            • collection boolean
          • ownership_percentage object
            Hide ownership_percentage attributes Show ownership_percentage attributes object
            • example integer
            • description string
            • collection boolean
          • inactive_at object
            Hide inactive_at attributes Show inactive_at attributes object
            • example string
            • description string
            • collection boolean
          • custom_fields object
            Hide custom_fields attributes Show custom_fields attributes object
            • example string
            • description string
            • collection boolean
          • external_references object
            Hide external_references attributes Show external_references attributes object
            • example string
            • description string
            • collection boolean
        • type string
        • email string
        • name string
        • state string
        • enabled boolean
        • message_count integer
      • firm object
        Hide firm attributes Show firm attributes object
        • uuid string
        • created_at string
        • updated_at string
        • name string
        • slug string
        • address_1 string
        • address_2 string
        • town_city string
        • county string
        • postcode string
        • country string
        • regulatory_text string
        • logo_icon string
        • brand_colours object
          Hide brand_colours attributes Show brand_colours attributes object
          • sidebar_background string
          • sidebar_accent string
          • sidebar_text string
          • sidebar_hover string
          • sidebar_active string
          • sidebar_title_background string
          • sidebar_title_primary string
          • sidebar_title_secondary string
          • sidebar_title_secondary_hover string
          • email_background string
          • email_logo_background_panel string
          • email_sub_text string
          • email_button_background string
          • email_button_text string
          • portal_sidebar_button_background string
          • portal_sidebar_button_hover string
          • portal_sidebar_button_active string
          • portal_brand_title string
          • portal_brand_sub_title string
          • portal_sidebar_title string
          • portal_sidebar_text string
          • portal_sidebar_text_hover string
          • portal_sidebar_text_active string
          • portal_sidebar_icon string
          • portal_sidebar_icon_hover string
          • portal_sidebar_icon_active string
          • portal_background string
          • portal_sidebar_account_title string
          • portal_account_email string
          • portal_sidebar_divider string
          • portal_dashboard_bg_one string
          • portal_dashboard_bg_two string
        • is_subscribed boolean
        • addon_subscriptions string
        • keep_deleted_files_for integer
        • tax number
        • month_end integer
        • statement_frequency string
        • billing object
          Hide billing attributes Show billing attributes object
          • invoice_address_1 string
          • invoice_address_2 string
          • invoice_town_city string
          • invoice_county string
          • invoice_postcode string
          • invoice_country string
          • invoice_email string
        • task_board_template string
        • ip_whitelist array[string]
        • welcome_paragraph_html string
        • email_welcome_paragraph_html string
        • show_fact_find_illustrations boolean
      • ancestors array[object]
        Hide ancestors attributes Show ancestors attributes object
        • uuid string
        • created_at string
        • updated_at string
        • message_created_at string
        • mailbox string
        • firm string
        • ancestors string
        • descendants string
        • thread_count string
        • participants string
        • attachments string
        • subject string
        • incoming boolean
        • text string
        • html string
      • descendants array[object]
        Hide descendants attributes Show descendants attributes object
        • uuid string
        • created_at string
        • updated_at string
        • message_created_at string
        • mailbox string
        • firm string
        • ancestors string
        • descendants string
        • thread_count string
        • participants string
        • attachments string
        • subject string
        • incoming boolean
        • text string
        • html string
      • thread_count object
        Hide thread_count attributes Show thread_count attributes object
        • uuid string
        • created_at string
        • updated_at string
        • message_created_at string
        • mailbox string
        • firm string
        • ancestors string
        • descendants string
        • thread_count string
        • participants string
        • attachments string
        • subject string
        • incoming boolean
        • text string
        • html string
      • participants array[object]
        Hide participants attributes Show participants attributes object
        • uuid string
        • created_at string
        • updated_at string
        • mailbox_message string
        • firm string
        • mailbox string
        • type string
        • name string
        • email string
      • attachments array[object]
        Hide attachments attributes Show attachments attributes object
        • uuid string
        • created_at string
        • updated_at string
        • firm string
        • name string
        • type string
        • size integer
        • download_url string
        • extension string
        • status string
      • subject string
      • incoming boolean
      • text string
      • html string
GET /api/v1/client/{client_uuid}/emails
curl \
 --request GET 'https://api.plannrcrm.com/api/v1/client/6ff8f7f6-1eb3-3525-be4a-3932c805afed/emails' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}"
Response examples (200)
{
  "data": [
    {
      "firm": {
        "tax": 17.5,
        "logo": "https://api.plannrcrm.com/images/plannr.jpg",
        "name": "Codepotato",
        "slug": "codepotato",
        "uuid": "d0694124-7987-48bc-bb46-a548027313b7",
        "county": "Hampshire",
        "billing": {
          "invoice_email": "gareth@codepotato.co.uk",
          "invoice_county": "Hampshire",
          "invoice_country": "United Kingdom",
          "invoice_postcode": "PO7 7YH",
          "invoice_address_1": "Suite E, 5 The Briars",
          "invoice_address_2": "Waterberry Drive",
          "invoice_town_city": "Waterlooville"
        },
        "country": "United Kingdom",
        "postcode": "PO7 7YH",
        "address_1": "Suite E, 5 The Briars",
        "address_2": "Waterberry Drive",
        "logo_icon": "https://api.plannrcrm.com/images/plannr-icon.jpg",
        "month_end": 25,
        "town_city": "Waterlooville",
        "created_at": "2025-06-25T15:10:42+01:00",
        "updated_at": "2025-06-25T15:10:42+01:00",
        "ip_whitelist": [
          "192.168.0.1",
          "127.0.0.1"
        ],
        "brand_colours": {
          "sidebar_text": "#ffffff",
          "sidebar_hover": "#0A0A42",
          "email_sub_text": "#ffffff",
          "sidebar_accent": "#36367E",
          "sidebar_active": "#53DBB8",
          "email_background": "#0E0E56",
          "email_button_text": "#ffffff",
          "portal_background": "#f6f6f6",
          "portal_brand_title": "#323b4b",
          "sidebar_background": "#0E0E56",
          "portal_sidebar_icon": "#828994",
          "portal_sidebar_text": "#323b4b",
          "portal_account_email": "#828994",
          "portal_sidebar_title": "#11151d",
          "sidebar_title_primary": "#FFC634",
          "portal_brand_sub_title": "#828994",
          "portal_sidebar_divider": "#e3e5e9",
          "email_button_background": "#36367E",
          "portal_dashboard_bg_one": "#EF4583",
          "portal_dashboard_bg_two": "#FFC634",
          "sidebar_title_secondary": "#ffffff",
          "sidebar_title_background": "#36367E",
          "portal_sidebar_icon_hover": "#828994",
          "portal_sidebar_text_hover": "#323b4b",
          "portal_sidebar_icon_active": "#828994",
          "portal_sidebar_text_active": "#323b4b",
          "email_logo_background_panel": "#36367E",
          "portal_sidebar_button_hover": "#ffffff",
          "portal_sidebar_account_title": "#11151d",
          "portal_sidebar_button_active": "#ffffff",
          "sidebar_title_secondary_hover": "#ffffff",
          "portal_sidebar_button_background": "#f6f6f6"
        },
        "is_subscribed": true,
        "regulatory_text": "Regulatory text",
        "addon_subscriptions": "App\\Http\\Resources\\Addons\\AddonSubscriptionResource",
        "statement_frequency": "monthly",
        "task_board_template": "App\\Http\\Resources\\Board\\BoardResource",
        "keep_deleted_files_for": 30,
        "welcome_paragraph_html": "<h1>Welcome.</h1>",
        "email_welcome_paragraph_html": "Welcome to Plannr!",
        "show_fact_find_illustrations": true
      },
      "html": "<p>Message body here in HTML</p>",
      "text": "Message body here in plain text",
      "uuid": "6ee617cb-0c68-4806-88b9-a85d60c9f88b",
      "mailbox": {
        "name": "Test Mailbox",
        "type": "imap",
        "uuid": "f4f02166-c0d1-4d65-9bbe-d34728c9be04",
        "email": "test@example.org",
        "state": "connected",
        "enabled": true,
        "created_at": "2025-06-25T15:10:42+01:00",
        "created_by": {
          "firm": {
            "example": "App\\Http\\Resources\\FirmResource",
            "collection": false,
            "description": "Firm"
          },
          "name": {
            "example": "Gareth Thompson",
            "collection": false,
            "description": "Name"
          },
          "role": {
            "example": "client",
            "collection": false,
            "description": "Account role"
          },
          "tags": {
            "example": "App\\Http\\Resources\\TagResource",
            "collection": true,
            "description": "Tags"
          },
          "type": {
            "example": "client",
            "collection": false,
            "description": "Account type"
          },
          "uuid": {
            "example": "d69a89b6-ce17-46fb-855f-45d6caca9d1a",
            "collection": false,
            "description": "The UUID of the resource."
          },
          "email": {
            "example": "gareth@codepotato.co.uk",
            "collection": false,
            "description": "(Deprecated - Please use primary_email instead). The email of the account."
          },
          "groups": {
            "example": "App\\Http\\Resources\\GroupResource",
            "collection": true,
            "description": "Groups"
          },
          "owners": {
            "example": "App\\Http\\Resources\\AccountResource",
            "collection": true,
            "description": "Accounts that own this account"
          },
          "last_name": {
            "example": "Thompson",
            "collection": false,
            "description": "Last name"
          },
          "created_at": {
            "example": "2025-06-25T15:10:42+01:00",
            "collection": false,
            "description": "The timestamp of when the resource was created."
          },
          "first_name": {
            "example": "Gareth",
            "collection": false,
            "description": "First name"
          },
          "updated_at": {
            "example": "2025-06-25T15:10:42+01:00",
            "collection": false,
            "description": "The timestamp of when the resource was updated."
          },
          "with_login": {
            "example": true,
            "collection": false,
            "description": "Denotes whether the account has a login to Plannr"
          },
          "inactive_at": {
            "example": "2025-06-25",
            "collection": false,
            "description": "Inactive from date"
          },
          "custom_fields": {
            "example": "App\\Http\\Resources\\CustomFieldValueResource",
            "collection": true,
            "description": "Any custom fields on the model."
          },
          "introduced_by": {
            "example": "App\\Http\\Resources\\AccountResource",
            "collection": false,
            "description": "Introduced by"
          },
          "primary_email": {
            "example": "App\\Http\\Resources\\ContactDetailResource",
            "collection": false,
            "description": "Primary email"
          },
          "can_be_deleted": {
            "example": "false",
            "collection": false,
            "description": "Denotes if the account can be deleted"
          },
          "assigned_adviser": {
            "example": "App\\Http\\Resources\\AccountResource",
            "collection": false,
            "description": "Assigned adviser"
          },
          "next_review_date": {
            "example": "2025-06-25T15:10:42+01:00",
            "collection": false,
            "description": "Next review date"
          },
          "has_joint_account": {
            "example": true,
            "collection": false,
            "description": "Denotes whether this account belongs to a joint account too"
          },
          "current_time_entry": {
            "example": "App\\Http\\Resources\\TimeEntryResource",
            "collection": false,
            "description": "Current time entry"
          },
          "first_contact_date": {
            "example": "2025-06-25T15:10:42+01:00",
            "collection": false,
            "description": "First contact date"
          },
          "external_references": {
            "example": "App\\Http\\Resources\\ExternalReferenceResource",
            "collection": true,
            "description": "The external references that have been added to the client."
          },
          "assigned_paraplanner": {
            "example": "App\\Http\\Resources\\AccountResource",
            "collection": false,
            "description": "Assigned paraplanner"
          },
          "joint_account_circle": {
            "example": "App\\Http\\Resources\\CircleResource",
            "collection": false,
            "description": "This field is only present when viewing a joint account directly. This will contain the circle that we automatically created when we released circles."
          },
          "ownership_percentage": {
            "example": 100,
            "collection": false,
            "description": "Percentage ownership of the plan (This field is only present if viewing the account record via a plans relationship eg Plan -> Accounts)"
          },
          "previous_review_date": {
            "example": "2025-06-25T15:10:42+01:00",
            "collection": false,
            "description": "Previous review date"
          },
          "primary_phone_number": {
            "example": "App\\Http\\Resources\\ContactDetailResource",
            "collection": false,
            "description": "Primary phone number"
          },
          "assigned_administrator": {
            "example": "App\\Http\\Resources\\AccountResource",
            "collection": false,
            "description": "Assigned administrator"
          },
          "anniversary_review_date": {
            "example": "2025-06-25T15:10:42+01:00",
            "collection": false,
            "description": "Anniversary review date"
          }
        },
        "updated_at": "2025-06-25T15:10:42+01:00",
        "message_count": 1
      },
      "subject": "Hello World",
      "incoming": true,
      "ancestors": [
        {
          "firm": "App\\Http\\Resources\\FirmResource",
          "html": "<p>Message body here in HTML</p>",
          "text": "Message body here in plain text",
          "uuid": "ac5deac5-6d40-402b-ab85-9d3ab38aa758",
          "mailbox": "App\\Http\\Resources\\MailboxResource",
          "subject": "Hello World",
          "incoming": true,
          "ancestors": "App\\Http\\Resources\\MailboxMessageResource",
          "created_at": "2025-06-25T15:10:42+01:00",
          "updated_at": "2025-06-25T15:10:42+01:00",
          "attachments": "App\\Http\\Resources\\MailboxMessageAttachmentResource",
          "descendants": "App\\Http\\Resources\\MailboxMessageResource",
          "participants": "App\\Http\\Resources\\MailboxMessageParticipantResource",
          "thread_count": "App\\Http\\Resources\\MailboxMessageResource",
          "message_created_at": "2025-06-25T15:10:42+01:00"
        }
      ],
      "created_at": "2025-06-25T15:10:42+01:00",
      "updated_at": "2025-06-25T15:10:42+01:00",
      "attachments": [
        {
          "firm": "App\\Http\\Resources\\FirmResource",
          "name": "example.pdf",
          "size": 123456,
          "type": "application/pdf",
          "uuid": "1909c268-01a8-4533-905b-ff76052984c2",
          "status": "uploaded",
          "extension": "pdf",
          "created_at": "2025-06-25T15:10:42+01:00",
          "updated_at": "2025-06-25T15:10:42+01:00",
          "download_url": "https://example.com/download/attachment"
        }
      ],
      "descendants": [
        {
          "firm": "App\\Http\\Resources\\FirmResource",
          "html": "<p>Message body here in HTML</p>",
          "text": "Message body here in plain text",
          "uuid": "fcf5558f-f06c-426d-82c3-2e9a895fe31f",
          "mailbox": "App\\Http\\Resources\\MailboxResource",
          "subject": "Hello World",
          "incoming": true,
          "ancestors": "App\\Http\\Resources\\MailboxMessageResource",
          "created_at": "2025-06-25T15:10:42+01:00",
          "updated_at": "2025-06-25T15:10:42+01:00",
          "attachments": "App\\Http\\Resources\\MailboxMessageAttachmentResource",
          "descendants": "App\\Http\\Resources\\MailboxMessageResource",
          "participants": "App\\Http\\Resources\\MailboxMessageParticipantResource",
          "thread_count": "App\\Http\\Resources\\MailboxMessageResource",
          "message_created_at": "2025-06-25T15:10:42+01:00"
        }
      ],
      "participants": [
        {
          "firm": "App\\Http\\Resources\\FirmResource",
          "name": "John Doe",
          "type": "cc",
          "uuid": "3ae0392a-c11c-444b-9ebf-c77b742e332f",
          "email": "john.doe@example.com",
          "mailbox": "App\\Http\\Resources\\MailboxResource",
          "created_at": "2025-06-25T15:10:42+01:00",
          "updated_at": "2025-06-25T15:10:42+01:00",
          "mailbox_message": "App\\Http\\Resources\\MailboxMessageResource"
        }
      ],
      "thread_count": {
        "firm": "App\\Http\\Resources\\FirmResource",
        "html": "<p>Message body here in HTML</p>",
        "text": "Message body here in plain text",
        "uuid": "c00e1724-ed48-4fcc-8475-9d552e3de238",
        "mailbox": "App\\Http\\Resources\\MailboxResource",
        "subject": "Hello World",
        "incoming": true,
        "ancestors": "App\\Http\\Resources\\MailboxMessageResource",
        "created_at": "2025-06-25T15:10:42+01:00",
        "updated_at": "2025-06-25T15:10:42+01:00",
        "attachments": "App\\Http\\Resources\\MailboxMessageAttachmentResource",
        "descendants": "App\\Http\\Resources\\MailboxMessageResource",
        "participants": "App\\Http\\Resources\\MailboxMessageParticipantResource",
        "thread_count": "App\\Http\\Resources\\MailboxMessageResource",
        "message_created_at": "2025-06-25T15:10:42+01:00"
      },
      "message_created_at": "2025-06-25T15:10:42+01:00"
    }
  ]
}