POST api/2.0/crm/history This function requires authentication

Description

Creates the event with the parameters specified in the request

Parameters
Name Description Type Example
contactId
sent in body
Contact ID
optional
number 1234
entityType
sent in body
Related entity type
optional
string some text
entityId
sent in body
Related entity ID
optional
number 1234
content
sent in body
Contents string some text
categoryId
sent in body
Category ID number 1234
created
sent in body
Event creation date
optional
Date and Time Roundtrip format: 2008-04-10T06-30-00.000Z
fileId
sent in body
List of IDs of the files associated with the event
optional
Collection of numbers
collection
1234
notifyUserList
sent in body
User field list
optional
Collection of guids
collection
9924256A-739C-462b-AF15-E652A3B1B6EB
Remark

You should obligatorily set the value for 'contactId' if 'entityId' is not set or the value for parameters 'entityId' and 'entityType' if 'contactId' is not set.

Returns

Created event

Example Response

application/json

{
  "status": 0,
  "response": {
    "createBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "created": "2018-10-16T15:50:56.4407058Z",
    "content": "Agreed to meet at lunch and discuss the client commercial offer",
    "category": {
      "imagePath": "path to image",
      "title": "Lunch",
      "description": "",
      "color": "",
      "sortOrder": 10,
      "id": 30
    },
    "contact": {
      "smallFotoUrl": "url to foto",
      "displayName": "Tadjeddine Bachir",
      "isCompany": false,
      "isPrivate": false,
      "isShared": false,
      "shareType": 0,
      "currency": null,
      "canEdit": false,
      "canDelete": false,
      "id": 0
    },
    "entity": {
      "entityType": "opportunity",
      "entityId": 123445,
      "entityTitle": "Household appliances internet shop"
    },
    "canEdit": true,
    "files": [
      {
        "folderId": 12334,
        "version": 3,
        "versionGroup": 1,
        "contentLength": "12345",
        "fileStatus": 2,
        "viewUrl": "http:\/\/www.onlyoffice.com\/viewfile?fileid=2221",
        "fileType": 7,
        "fileExst": ".txt",
        "comment": null,
        "id": 1004346480,
        "title": "Some titile.txt",
        "access": 1,
        "shared": false,
        "rootFolderType": 2,
        "updatedBy": {
          "id": "00000000-0000-0000-0000-000000000000",
          "displayName": "Mike Zanyatski",
          "title": "Manager",
          "avatarSmall": "url to small avatar",
          "profileUrl": ""
        },
        "created": "2018-10-16T15:50:56.4407058Z",
        "createdBy": {
          "id": "00000000-0000-0000-0000-000000000000",
          "displayName": "Mike Zanyatski",
          "title": "Manager",
          "avatarSmall": "url to small avatar",
          "profileUrl": ""
        },
        "updated": "2018-10-16T15:50:56.4407058Z",
        "providerItem": false
      }
    ],
    "id": 0
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <createBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createBy>
    <created>2018-10-16T15:50:56.4407058Z</created>
    <content>Agreed to meet at lunch and discuss the client commercial offer</content>
    <category>
      <imagePath>path to image</imagePath>
      <title>Lunch</title>
      <description></description>
      <color></color>
      <sortOrder>10</sortOrder>
      <id>30</id>
    </category>
    <contact>
      <smallFotoUrl>url to foto</smallFotoUrl>
      <displayName>Tadjeddine Bachir</displayName>
      <isCompany>false</isCompany>
      <isPrivate>false</isPrivate>
      <isShared>false</isShared>
      <shareType>0</shareType>
      <currency />
      <canEdit>false</canEdit>
      <canDelete>false</canDelete>
      <id>0</id>
    </contact>
    <entity>
      <entityType>opportunity</entityType>
      <entityId>123445</entityId>
      <entityTitle>Household appliances internet shop</entityTitle>
    </entity>
    <canEdit>true</canEdit>
    <files>
      <folderId>12334</folderId>
      <version>3</version>
      <versionGroup>1</versionGroup>
      <contentLength>12345</contentLength>
      <fileStatus>2</fileStatus>
      <viewUrl>http://www.onlyoffice.com/viewfile?fileid=2221</viewUrl>
      <fileType>7</fileType>
      <fileExst>.txt</fileExst>
      <comment />
      <id>1004346480</id>
      <title>Some titile.txt</title>
      <access>1</access>
      <shared>false</shared>
      <rootFolderType>2</rootFolderType>
      <updatedBy>
        <id>00000000-0000-0000-0000-000000000000</id>
        <displayName>Mike Zanyatski</displayName>
        <title>Manager</title>
        <avatarSmall>url to small avatar</avatarSmall>
        <profileUrl></profileUrl>
      </updatedBy>
      <created>2018-10-16T15:50:56.4407058Z</created>
      <createdBy>
        <id>00000000-0000-0000-0000-000000000000</id>
        <displayName>Mike Zanyatski</displayName>
        <title>Manager</title>
        <avatarSmall>url to small avatar</avatarSmall>
        <profileUrl></profileUrl>
      </createdBy>
      <updated>2018-10-16T15:50:56.4407058Z</updated>
      <providerItem>false</providerItem>
    </files>
    <id>0</id>
  </response>
</result>