POST api/2.0/mail/contact/add This function requires authentication

Description

Creates a mail contact with the parameters specified in the request.

Parameters
Name Description Type Example
name
sent in body
Contact name string some text
description
sent in body
Contact description string some text
emails
sent in body
List of contact emails Collection of strings some text
phoneNumbers
sent in body
List of contact phone numbers Collection of strings some text
Example
POST api/2.0/mail/contact/add
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "name": "some text",
  "description": "some text",
  "emails": [
    "some text"
  ],
  "phoneNumbers": [
    "some text"
  ]
}
Returns

Information about created contact

Example Response

application/json

{
  "status": 0,
  "response": {
    "id": 1234,
    "name": "name",
    "description": "description",
    "emails": [
      {
        "id": 1234,
        "value": "value",
        "isPrimary": true
      }
    ],
    "phones": [
      {
        "id": 1234,
        "value": "value",
        "isPrimary": true
      }
    ],
    "type": 1234,
    "smallFotoUrl": "smallFotoUrl",
    "mediumFotoUrl": "mediumFotoUrl"
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>1234</id>
    <name>name</name>
    <description>description</description>
    <emails>
      <id>1234</id>
      <value>value</value>
      <isPrimary>True</isPrimary>
    </emails>
    <phones>
      <id>1234</id>
      <value>value</value>
      <isPrimary>True</isPrimary>
    </phones>
    <type>1234</type>
    <smallFotoUrl>smallFotoUrl</smallFotoUrl>
    <mediumFotoUrl>mediumFotoUrl</mediumFotoUrl>
  </response>
</result>