Skip to content
Developer

CrmMessage

CRM8 EndpointsCRM / CrmMessage

Add a new CustomerMessage for a company

POST/api/crm/messages/{companyId}

Path parameters

companyIdrequiredstring

Responses

200Add a new CustomerMessage for a companyCustomerMessage

Show fields (9)
  • idinteger

    Primary key of the customer message. Internal ID.

  • usernamestring

    User name of the author.

  • displaynamestring

    Name shown for the author.

  • userpositionstring

    Position of the author shown with the message.

  • profile_picture_urlstring

    URL of the profile picture of the author.

  • textstring

    Text of the message.

  • attachmentsarray<Attachment10>

    Attachments of the message.

    Show fields (25)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/crm/messages/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "username": "lena.hartmann@example.org",
  "profile_picture_url": "https://vynst.de",
  "text": "Text",
  "displayname": "string",
  "userposition": "string",
  "attachments": [
    {
      "id": 42,
      "ocr_from_name": "Beispiel",
      "ocr_from_email": "lena.hartmann@example.org",
      "ocr_from_phone": "+49 511 123456",
      "ocr_to_name": "Beispiel",
      "ocr_to_email": "lena.hartmann@example.org",
      "ocr_to_phone": "+49 511 123456",
      "filename": "string",
      "filesize": "string",
      "mimetype": "string"
    }
  ],
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00"
}

This method will get a single CustomerMessage Object with the given id

GET/api/crm/messages/{id}

Path parameters

idrequiredstring

Responses

200Returns a single CustomerMessageCustomerMessage

Show fields (9)
  • idinteger

    Primary key of the customer message. Internal ID.

  • usernamestring

    User name of the author.

  • displaynamestring

    Name shown for the author.

  • userpositionstring

    Position of the author shown with the message.

  • profile_picture_urlstring

    URL of the profile picture of the author.

  • textstring

    Text of the message.

  • attachmentsarray<Attachment10>

    Attachments of the message.

    Show fields (25)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/crm/messages/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "username": "lena.hartmann@example.org",
  "profile_picture_url": "https://vynst.de",
  "text": "Text",
  "displayname": "string",
  "userposition": "string",
  "attachments": [
    {
      "id": 42,
      "ocr_from_name": "Beispiel",
      "ocr_from_email": "lena.hartmann@example.org",
      "ocr_from_phone": "+49 511 123456",
      "ocr_to_name": "Beispiel",
      "ocr_to_email": "lena.hartmann@example.org",
      "ocr_to_phone": "+49 511 123456",
      "filename": "string",
      "filesize": "string",
      "mimetype": "string"
    }
  ],
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00"
}

This method will update a CustomerMessage Object

PUT/api/crm/messages/{id}

Path parameters

idrequiredstring

Responses

200Update a CustomerMessageCustomerMessage

Show fields (9)
  • idinteger

    Primary key of the customer message. Internal ID.

  • usernamestring

    User name of the author.

  • displaynamestring

    Name shown for the author.

  • userpositionstring

    Position of the author shown with the message.

  • profile_picture_urlstring

    URL of the profile picture of the author.

  • textstring

    Text of the message.

  • attachmentsarray<Attachment10>

    Attachments of the message.

    Show fields (25)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request PUT \
  --url https://your-instance.iw-erp.de/api/crm/messages/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "username": "lena.hartmann@example.org",
  "profile_picture_url": "https://vynst.de",
  "text": "Text",
  "displayname": "string",
  "userposition": "string",
  "attachments": [
    {
      "id": 42,
      "ocr_from_name": "Beispiel",
      "ocr_from_email": "lena.hartmann@example.org",
      "ocr_from_phone": "+49 511 123456",
      "ocr_to_name": "Beispiel",
      "ocr_to_email": "lena.hartmann@example.org",
      "ocr_to_phone": "+49 511 123456",
      "filename": "string",
      "filesize": "string",
      "mimetype": "string"
    }
  ],
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00"
}

This method will update a CustomerMessage Object

PATCH/api/crm/messages/{id}

Path parameters

idrequiredstring

Responses

200Update a CustomerMessageCustomerMessage

Show fields (9)
  • idinteger

    Primary key of the customer message. Internal ID.

  • usernamestring

    User name of the author.

  • displaynamestring

    Name shown for the author.

  • userpositionstring

    Position of the author shown with the message.

  • profile_picture_urlstring

    URL of the profile picture of the author.

  • textstring

    Text of the message.

  • attachmentsarray<Attachment10>

    Attachments of the message.

    Show fields (25)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request PATCH \
  --url https://your-instance.iw-erp.de/api/crm/messages/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "username": "lena.hartmann@example.org",
  "profile_picture_url": "https://vynst.de",
  "text": "Text",
  "displayname": "string",
  "userposition": "string",
  "attachments": [
    {
      "id": 42,
      "ocr_from_name": "Beispiel",
      "ocr_from_email": "lena.hartmann@example.org",
      "ocr_from_phone": "+49 511 123456",
      "ocr_to_name": "Beispiel",
      "ocr_to_email": "lena.hartmann@example.org",
      "ocr_to_phone": "+49 511 123456",
      "filename": "string",
      "filesize": "string",
      "mimetype": "string"
    }
  ],
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00"
}

This method will get all CustomerMessage Objects

GET/api/crm/messages/{companyId}/{timestamp}/new

Path parameters

companyIdrequiredstring
timestamprequiredstring

Responses

default

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/crm/messages/42/42/new \
  --header 'x-iw-jwt-token: <TOKEN>'

This method will get CustomerMessages from given timestamp on (limit 500) and mapped by their date

GET/api/crm/messages/{companyId}/{timestamp}/daily

Path parameters

companyIdrequiredstring
timestamprequiredstring

Responses

default

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/crm/messages/42/42/daily \
  --header 'x-iw-jwt-token: <TOKEN>'

Add an Attachment to a Message

POST/api/crm/messages/{id}/adds/attachments

Path parameters

idrequiredstring

Responses

200Add an Attachment to a CustomerMessageCustomerMessage

Show fields (9)
  • idinteger

    Primary key of the customer message. Internal ID.

  • usernamestring

    User name of the author.

  • displaynamestring

    Name shown for the author.

  • userpositionstring

    Position of the author shown with the message.

  • profile_picture_urlstring

    URL of the profile picture of the author.

  • textstring

    Text of the message.

  • attachmentsarray<Attachment10>

    Attachments of the message.

    Show fields (25)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/crm/messages/42/adds/attachments \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "username": "lena.hartmann@example.org",
  "profile_picture_url": "https://vynst.de",
  "text": "Text",
  "displayname": "string",
  "userposition": "string",
  "attachments": [
    {
      "id": 42,
      "ocr_from_name": "Beispiel",
      "ocr_from_email": "lena.hartmann@example.org",
      "ocr_from_phone": "+49 511 123456",
      "ocr_to_name": "Beispiel",
      "ocr_to_email": "lena.hartmann@example.org",
      "ocr_to_phone": "+49 511 123456",
      "filename": "string",
      "filesize": "string",
      "mimetype": "string"
    }
  ],
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00"
}

Remove an Attachment from CustomerMessage

POST/api/crm/messages/{id}/deletes/attachments

Path parameters

idrequiredstring

Responses

200Remove an Attachment from a CustomerMessageCustomerMessage

Show fields (9)
  • idinteger

    Primary key of the customer message. Internal ID.

  • usernamestring

    User name of the author.

  • displaynamestring

    Name shown for the author.

  • userpositionstring

    Position of the author shown with the message.

  • profile_picture_urlstring

    URL of the profile picture of the author.

  • textstring

    Text of the message.

  • attachmentsarray<Attachment10>

    Attachments of the message.

    Show fields (25)
    • idinteger

      Primary key of the attachment. Internal ID.

    • filenamestring

      Original file name.

    • filesizestring

      Size of the file in bytes.

    • mimetypestring

      MIME type of the file.

    • createdbyusernamestring

      Name of the user who uploaded the file, as text.

    • createdstring (date-time)

      Point in time the attachment was created.

    • googleidstring

      ID of the file in Google Drive.

    • scopestring

      Scope that controls who can see the attachment.

    • ocr_document_typestring

      Document type recognized by OCR.

    • ocr_from_namestring

      Sender name recognized by OCR.

    • ocr_from_companystring

      Sender company recognized by OCR.

    • ocr_from_addressstring

      Sender address recognized by OCR.

    • ocr_from_emailstring

      Sender e-mail address recognized by OCR.

    • ocr_from_phonestring

      Sender phone number recognized by OCR.

    • ocr_to_namestring

      Recipient name recognized by OCR.

    • ocr_to_companystring

      Recipient company recognized by OCR.

    • ocr_to_addressstring

      Recipient address recognized by OCR.

    • ocr_to_emailstring

      Recipient e-mail address recognized by OCR.

    • ocr_to_phonestring

      Recipient phone number recognized by OCR.

    • ocr_summarystring

      Summary of the document created by OCR.

    • ocr_statusstring

      OCR processing status: null=not processed, pending, processing, done, error

    • ocr_errorstring

      Reason of the last failed or incomplete OCR run, null when it went through

    • ocr_processed_atstring (date-time)

      Point in time OCR processing finished.

    • virus_checkedboolean

      1 once the virus scan has passed for this file. The scan runs in the background (AttachmentVirusScanCommand), so a freshly uploaded file starts at 0 and stays there until it was really checked. An infected file never reaches 1 - it is deleted instead. UIs use this to decide whether a file may be handed to a user, so it must stay false until proven otherwise.

    • virus_checked_atstring (date-time)

      When the virus scan passed. Null while the file is still waiting.

  • createdstring (date-time)

    Point in time the entity was created.

  • updatedstring (date-time)

    Point in time the entity was last updated.

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/crm/messages/42/deletes/attachments \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "username": "lena.hartmann@example.org",
  "profile_picture_url": "https://vynst.de",
  "text": "Text",
  "displayname": "string",
  "userposition": "string",
  "attachments": [
    {
      "id": 42,
      "ocr_from_name": "Beispiel",
      "ocr_from_email": "lena.hartmann@example.org",
      "ocr_from_phone": "+49 511 123456",
      "ocr_to_name": "Beispiel",
      "ocr_to_email": "lena.hartmann@example.org",
      "ocr_to_phone": "+49 511 123456",
      "filename": "string",
      "filesize": "string",
      "mimetype": "string"
    }
  ],
  "created": "2026-10-15T09:30:00+02:00",
  "updated": "2026-10-15T09:30:00+02:00"
}