---
title: "События провайдеров"
description: "Типы событий провайдеров и подписки Context4: создание подписок и управление ими через публичный API."
group: "Техническая документация"
order: 36
---

## Адреса этого стенда

- Документация: https://context4.me/docs.md
- Индекс для агента: https://context4.me/docs/agent-index.json
- Консоль и подключения: https://console.context4.me/integrations
- MCP: https://context4.me/mcp
- HTTP API: https://context4.me/v1
- Composio base URL: https://context4.me/compat/context4/v1
- OpenAPI: https://context4.me/docs/openapi.json
- Каталог HTTP/MCP: https://context4.me/docs/api-index.json
- Маршруты Composio: https://context4.me/docs/compat-routes.json
- Коннекторы: https://context4.me/docs/connectors.json


# События провайдеров

Сгенерировано из публичного OpenAPI Context4. Авторизация: `Authorization: Bearer` с API-ключом. Общие правила — [API](https://context4.me/docs/api.md). Полный контракт — [OpenAPI JSON](https://context4.me/docs/openapi.json). В JSON ниже `$ref` указывает на именованную схему из раздела «Схемы».

## listProviderEventTypes

`GET /v1/provider-event-types`

URL этого стенда: `https://context4.me/v1/provider-event-types`. Параметры в фигурных скобках заменяются фактическими ID из API.

List supported provider notification types and fields

Полномочие: `events:read`.

Дополнительных параметров в контракте нет.

### Ответы и ошибки

| HTTP | Значение | Формат и схема |
| --- | --- | --- |
| 200 | Provider event catalog | `application/json` &#123;"type":"object","properties":&#123;"data":&#123;"type":"array","items":&#123;"type":"object","properties":&#123;"connector_id":&#123;"type":"string"&#125;,"entity":&#123;"type":"string"&#125;,"event_types":&#123;"type":"array","items":&#123;"type":"string"&#125;&#125;,"fields":&#123;"type":"array","items":&#123;"type":"string"&#125;&#125;,"field_types":&#123;"type":"object","additionalProperties":&#123;"type":"string","enum":["string","number","boolean"]&#125;&#125;,"hydration_available":&#123;"type":"boolean"&#125;&#125;,"required":["connector_id","entity","event_types","fields","field_types","hydration_available"],"additionalProperties":false&#125;&#125;&#125;,"required":["data"],"additionalProperties":false&#125; |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |

Заголовки успешного ответа:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## subscribeProviderEvents

`POST /v1/provider-event-subscriptions`

URL этого стенда: `https://context4.me/v1/provider-event-subscriptions`. Параметры в фигурных скобках заменяются фактическими ID из API.

Subscribe to provider events without entity storage

Полномочие: `events:write`.

Дополнительных параметров в контракте нет.

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

Обязательно. 

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "example": "9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "minItems": 1,
            "maxItems": 32
          }
        },
        "required": [
          "connection_id",
          "event_types"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Ответы и ошибки

| HTTP | Значение | Формат и схема |
| --- | --- | --- |
| 200 | Configured event subscription | `application/json` &#123;"type":"object","properties":&#123;"id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"connection_id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"source_id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"connector_id":&#123;"type":"string"&#125;,"event_types":&#123;"type":"array","items":&#123;"type":"string"&#125;&#125;,"status":&#123;"type":"string"&#125;,"version":&#123;"type":"integer","exclusiveMinimum":0&#125;,"enabled_at":&#123;"type":"string","format":"date-time"&#125;,"payload_retention_seconds":&#123;"type":"integer","exclusiveMinimum":0&#125;&#125;,"required":["id","connection_id","source_id","connector_id","event_types","status","version","enabled_at","payload_retention_seconds"],"additionalProperties":false&#125; |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |

Заголовки успешного ответа:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## getProviderEventSubscription

`GET /v1/provider-event-subscriptions`

URL этого стенда: `https://context4.me/v1/provider-event-subscriptions`. Параметры в фигурных скобках заменяются фактическими ID из API.

Read the connection event subscription

Полномочие: `events:read`.

### Параметры

| Имя | Где | Обязателен | Тип и ограничения |
| --- | --- | --- | --- |
| `connection_id` | query | да | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Ответы и ошибки

| HTTP | Значение | Формат и схема |
| --- | --- | --- |
| 200 | Subscription or null | `application/json` &#123;"type":["object","null"],"properties":&#123;"id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"connection_id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"source_id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"connector_id":&#123;"type":"string"&#125;,"event_types":&#123;"type":"array","items":&#123;"type":"string"&#125;&#125;,"status":&#123;"type":"string"&#125;,"version":&#123;"type":"integer","exclusiveMinimum":0&#125;,"enabled_at":&#123;"type":"string","format":"date-time"&#125;,"payload_retention_seconds":&#123;"type":"integer","exclusiveMinimum":0&#125;&#125;,"required":["id","connection_id","source_id","connector_id","event_types","status","version","enabled_at","payload_retention_seconds"],"additionalProperties":false&#125; |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |

Заголовки успешного ответа:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## disableProviderEventSubscription

`DELETE /v1/provider-event-subscriptions/{subscriptionId}`

URL этого стенда: `https://context4.me/v1/provider-event-subscriptions/{subscriptionId}`. Параметры в фигурных скобках заменяются фактическими ID из API.

Disable a provider event subscription

Полномочие: `events:write`.

### Параметры

| Имя | Где | Обязателен | Тип и ограничения |
| --- | --- | --- | --- |
| `subscriptionId` | path | да | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Ответы и ошибки

| HTTP | Значение | Формат и схема |
| --- | --- | --- |
| 200 | Disabled subscription | `application/json` &#123;"type":"object","properties":&#123;"id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"connection_id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"source_id":&#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;,"connector_id":&#123;"type":"string"&#125;,"event_types":&#123;"type":"array","items":&#123;"type":"string"&#125;&#125;,"status":&#123;"type":"string"&#125;,"version":&#123;"type":"integer","exclusiveMinimum":0&#125;,"enabled_at":&#123;"type":"string","format":"date-time"&#125;,"payload_retention_seconds":&#123;"type":"integer","exclusiveMinimum":0&#125;&#125;,"required":["id","connection_id","source_id","connector_id","event_types","status","version","enabled_at","payload_retention_seconds"],"additionalProperties":false&#125; |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://context4.me/docs/api-schemas-1.md#problem) |

Заголовки успешного ответа:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

