# configureIntegration

Source: <https://telegafirst.com/docs/api-op-configureintegration>
Locale: ru
releaseGitSha: ea133cd4ad87fe549ef000b139be145be9bd1717
sourceContentDigest: 14bf4a7e1fb874ed97d205004689812d897f3a814e34a4c94b6935ca216e45f6
Version: 2

# configureIntegration

`POST /api/v1/tools/integrations`

Configure tenant CRM connector

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["integrations:write"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Тело запроса

| Поле | Значение |
| - | - |
| content.application/json.schema | [IntegrationConfigure](https://telegafirst.com/docs/schema-aeed7387c3842dd98450f46eb7f807aa3543970b76fda91130e857800e1d7171) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [IntegrationView](https://telegafirst.com/docs/schema-3fccd89845e24da0b49841933894400e78f36274177adc95152e2b4216b2d4ff) |
| 201.description | "Configured non-secret connector" |
| 201.headers.X-Bot-Username.description | "Authenticated active public bot username when available" |
| 201.headers.X-Bot-Username.schema | [201.headers.X-Bot-Username.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-Client-Slug.description | "Authenticated active tenant slug when available" |
| 201.headers.X-Client-Slug.schema | [201.headers.X-Client-Slug.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-RateLimit-Limit.description | "Effective per-minute limit" |
| 201.headers.X-RateLimit-Limit.schema | [201.headers.X-RateLimit-Limit.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-RateLimit-Remaining.description | "Remaining requests, or unknown" |
| 201.headers.X-RateLimit-Remaining.schema | [201.headers.X-RateLimit-Remaining.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 201.headers.X-RateLimit-Reset.description | "Window reset epoch seconds" |
| 201.headers.X-RateLimit-Reset.schema | [201.headers.X-RateLimit-Reset.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "VALIDATION\_ERROR: invalid strict request; IDEMPOTENCY\_KEY\_REQUIRED: POST body without key" |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "INVALID\_API\_KEY: missing, conflicting, invalid, expired or revoked credential; surface JWT unsupported" |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "INSUFFICIENT\_SCOPE, PUBLISHABLE\_KEY\_NOT\_ALLOWED or NO\_ACTIVE\_BOT" |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 409.description | "CONFLICT: idempotent request is processing" |
| 413.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 413.description | "PAYLOAD\_TOO\_LARGE or ITEM\_COUNT\_EXCEEDED" |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 422.description | "IDEMPOTENCY\_KEY\_MISMATCH: same key with different request inputs" |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 429.description | "RATE\_LIMIT\_EXCEEDED or RATE\_LIMIT\_UNAVAILABLE: fail-closed resource limit" |
| 429.headers.Retry-After.description | "Retry delay in seconds when supplied by resource policy" |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-f0765dbf409c74f001806c446f2cf171d8c46b5b15779d54423dde921a4b0670) |

## Дополнительные условия

| Поле | Значение |
| - | - |
| description | "Owner-authorized strict upsert by credentials.type (bitrix24/getcourse). Credentials are encrypted with tenant AAD and never returned. Reconfiguring reactivates a deleted connector. Idempotency-Key required for POST body; actor/tenant/handler replay lasts 86400 seconds and preserves 201. Changed inputs return 422; processing returns 409. Bearer accepts tgf\_\* credentials, not surface JWT." |
| operationId | "configureIntegration" |
| summary | "Configure tenant CRM connector" |
| tags | \["integrations"] |
