v1

latestOpenAPI 3.1.02026-07-14159142161.9 KB
emailService

Update Letter CRM Entities

Updates the CRM entities associated with a letter.

patch/email/v1/letters/{letterId}

Path parameters

letterIdinteger required
Example:22

The ID of the leter

Request body

Example request

{
  "crm_entities": {
    "leads": [
      {
        "table_id": 3,
        "title": "Lead title"
      }
    ],
    "deals": [
      {
        "table_id": 3,
        "title": "Deal title"
      }
    ],
    "companies": [
      {
        "table_id": 3,
        "title": "Deal title"
      }
    ],
    "contatcs": [
      {
        "table_id": 3,
        "title": "Contact title"
      }
    ]
  }
}

Response

OK

idinteger
email_idinteger
signature_idinteger
subjectstring
bodystring
body_htmlstring
dateinteger
is_readboolean
statusstring
crm_entitiesLetterCrmEntities

Example response

{
  "destination_folder_id": null,
  "subject": "Pitch deck",
  "body": "Pitch deck description",
  "body_html": "<div dir=\"ltr\">Pitch deck description</div>\r\n",
  "parent_message_id": "imap_parent_message_id",
  "main_message_id": "imap_main_message_id",
  "is_read": true,
  "contacts": [
    {
      "email": "to@gmail.com",
      "name": "To",
      "contact_type": "to"
    },
    {
      "email": "from@gmail.com",
      "name": "From",
      "contact_type": "from"
    },
    {
      "email": "cc@gmail.com",
      "name": "CC",
      "contact_type": "cc"
    }
  ],
  "crm_entities": {
    "leads": [
      {
        "table_id": 3,
        "title": "Lead title"
      }
    ],
    "deals": [
      {
        "table_id": 3,
        "title": "Deal title"
      }
    ],
    "companies": [
      {
        "table_id": 3,
        "title": "Deal title"
      }
    ],
    "contatcs": [
      {
        "table_id": 3,
        "title": "Contact title"
      }
    ]
  }
}