---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/api360/doc/ru/ref/ExternalContactService/ExternalContactService_Create.md
  - href: ru/ref/ExternalContactService/ExternalContactService_Create.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/api360/doc/ru/llms.txt

<div class="openapi">

# Добавить контакт

<!-- markdownlint-disable-file -->

Добавляет новый общий контакт.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api360.yandex.net/directory/v1/org/{orgId}/external_contacts
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_orgId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор организации.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "firstName": "example",
  "lastName": "example",
  "middleName": "example",
  "title": "example",
  "company": "example",
  "department": "example",
  "address": "example",
  "externalId": "example",
  "emails": [
    {
      "email": "example",
      "type": "example",
      "main": true
    }
  ],
  "phones": [
    {
      "phone": "example",
      "type": "example",
      "main": true
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_emails_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [v1ExternalContactEmail](#entity-v1ExternalContactEmail)[]

Электронные адреса. В массиве должен быть хотя бы один элемент.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "email": "example",
    "type": "example",
    "main": true
  }
]
```

{% endcut %}
{.table-cell}
||
||

_firstName_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Имя.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_lastName_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Фамилия.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_address_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Почтовый адрес.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_company_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Компания.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_department_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Подразделение.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_externalId_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Произвольный внешний идентификатор.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_middleName_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Отчество.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_phones_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [v1ExternalContactPhone](#entity-v1ExternalContactPhone)[]

Телефоны.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "phone": "example",
    "type": "example",
    "main": true
  }
]
```

{% endcut %}
{.table-cell}
||
||

_title_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Должность.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### v1ExternalContactEmail {#entity-v1ExternalContactEmail}

#|
|| **Name** | **Description** ||
||

_email_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Электронный адрес.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_main_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак основного электронного адреса:
- `true` — основной (обязательно должен быть ровно у одного адреса);
- `false` — дополнительный.
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Тип электронного адреса.
Возможные значения:
- `work` — для рабочей почты;
- для личной почты пользователя оставьте поле незаполненным.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "email": "example",
  "type": "example",
  "main": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### v1ExternalContactPhone {#entity-v1ExternalContactPhone}

#|
|| **Name** | **Description** ||
||

_main_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак основного телефона:
- `true` — основной (может быть не более чем у одного телефона);
- `false` — дополнительный.
{.table-cell}
||
||

_phone_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Телефон.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Тип телефона.
Возможные значения:
- `work` — рабочий телефон;
- `mobile` — мобильный телефон;
- `ip` — IP-телефон;
- для прочих телефонных номеров оставьте поле незаполненным.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "phone": "example",
  "type": "example",
  "main": true
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Запрос успешно выполнен.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": "example"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Идентификатор общего контакта.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Некорректный запрос.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Код ошибки.
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [protobufAny](#entity-protobufAny)[]

Дополнительные сведения об ошибке.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "@type": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### protobufAny {#entity-protobufAny}

#|
|| **Name** | **Description** ||
||

_@type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_[additional]_{.json-schema-reset .json-schema-additional-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "@type": "example"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__401">

## 401 Unauthorized

Пользователь не авторизован.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Код ошибки.
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [protobufAny](#entity-protobufAny)[]

Дополнительные сведения об ошибке.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "@type": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__403">

## 403 Forbidden

У пользователя или приложения нет прав на доступ к ресурсу, запрос отклонен.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Код ошибки.
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [protobufAny](#entity-protobufAny)[]

Дополнительные сведения об ошибке.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "@type": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Запрашиваемый ресурс не найден.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Код ошибки.
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [protobufAny](#entity-protobufAny)[]

Дополнительные сведения об ошибке.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "@type": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Внутренняя ошибка сервиса. Попробуйте повторно отправить запрос через некоторое время.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": 0,
  "message": "example",
  "details": [
    {
      "@type": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Код ошибки.
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [protobufAny](#entity-protobufAny)[]

Дополнительные сведения об ошибке.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "@type": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.