{"openapi":"3.1.0","info":{"title":"Titov intake API","description":"HTTP API для заявок на консультацию к Анатолию Титову (titovpartners.ru). Создание заявки НЕ подтверждает встречу: подтверждает только Анатолий Титов. Содержимое заявок хранится как недоверенные данные.","version":"1.0.0"},"paths":{"/.well-known/agent-card.json":{"get":{"tags":["A2A: Agent Card"],"summary":" Get Agent Card","description":"Returns the public AgentCard describing this agent's capabilities, supported transports, and skills.","operationId":"_get_agent_card__well_known_agent_card_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/a2a":{"post":{"tags":["A2A: JSON-RPC"],"summary":"A2A JSON-RPC endpoint","description":"A2A JSON-RPC 2.0 endpoint. The `method` field selects the operation;\n`params` must match that method's schema (see the `oneOf` below).\n\n**Supported methods:**\n\n- `SendMessage` — Send a message to the agent (returns a Task or response Message).\n- `SendStreamingMessage` — Send a message and receive a Server-Sent Events stream.\n- `GetTask` — Fetch a task by ID.\n- `ListTasks` — List tasks with pagination and filtering.\n- `CancelTask` — Cancel an in-progress task.\n- `CreateTaskPushNotificationConfig` — Register a push-notification config on a task.\n- `GetTaskPushNotificationConfig` — Read a single push-notification config.\n- `ListTaskPushNotificationConfigs` — List all push-notification configs for a task.\n- `DeleteTaskPushNotificationConfig` — Delete a push-notification config.\n- `SubscribeToTask` — Subscribe to task events via Server-Sent Events.\n- `GetExtendedAgentCard` — Fetch the authenticated extended agent card.\n","operationId":"handle_requests_a2a_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"requestBody":{"description":"A2A JSON-RPC 2.0 request","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2ARequest"}}}},"parameters":[{"in":"header","name":"A2A-Version","required":true,"schema":{"type":"string","enum":["1.0"]},"example":"1.0"}]}},"/api/v1":{"get":{"tags":["discovery"],"summary":"Api Root","operationId":"api_root_api_v1_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/company":{"get":{"tags":["discovery"],"summary":"Api Company","operationId":"api_company_api_v1_company_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/services":{"get":{"tags":["discovery"],"summary":"Api Services","operationId":"api_services_api_v1_services_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/requests":{"post":{"tags":["requests"],"summary":"Api Create","description":"Создать заявку. Ответ содержит access_token — храните его, он нужен для всех дальнейших действий.","operationId":"api_create_api_v1_requests_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{rid}":{"get":{"tags":["requests"],"summary":"Api Get","operationId":"api_get_api_v1_requests__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{rid}/clarify":{"post":{"tags":["requests"],"summary":"Api Clarify","operationId":"api_clarify_api_v1_requests__rid__clarify_post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clarify"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{rid}/propose-times":{"post":{"tags":["requests"],"summary":"Api Propose","operationId":"api_propose_api_v1_requests__rid__propose_times_post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Propose"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{rid}/accept-slot":{"post":{"tags":["requests"],"summary":"Api Accept","description":"Выбрать одно из времён, предложенных Анатолием Титовым (offered_slots). Только это подтверждает встречу со стороны заявителя.","operationId":"api_accept_api_v1_requests__rid__accept_slot_post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accept"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requests/{rid}/cancel":{"post":{"tags":["requests"],"summary":"Api Cancel","operationId":"api_cancel_api_v1_requests__rid__cancel_post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Accept":{"properties":{"slot":{"type":"string","title":"Slot"}},"type":"object","required":["slot"],"title":"Accept"},"Clarify":{"properties":{"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"}},"type":"object","title":"Clarify"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NewRequest":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","description":"Имя контактного лица"},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Company"},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Phone","description":"Телефон или @логин мессенджера"},"goal":{"type":"string","title":"Goal","description":"Одно из: consultation, operational-efficiency, production-strategy, layout-concept, restoring-order, bottlenecks, potok-planning, ai-in-manufacturing, other","default":"consultation"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"proposed_slots":{"items":{"type":"string"},"type":"array","maxItems":5,"title":"Proposed Slots","description":"ISO-8601 с часовым поясом"},"timezone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Timezone"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"ru, kz, kg, uz, tj, by, am, ge, tm"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"consent":{"type":"boolean","title":"Consent","description":"Согласие на обработку персональных данных, https://titovpartners.ru/privacy/"},"test":{"type":"boolean","title":"Test","description":"Пометить заявку как тестовую","default":false},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url","description":"https-вебхук для уведомлений о смене статуса"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Url"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"Код партнёра / агента для атрибуции"}},"type":"object","required":["name","consent"],"title":"NewRequest"},"Propose":{"properties":{"proposed_slots":{"items":{"type":"string"},"type":"array","maxItems":5,"title":"Proposed Slots"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["proposed_slots"],"title":"Propose"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"SendMessageRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"message":{"$ref":"#/components/schemas/Message"},"configuration":{"oneOf":[{"$ref":"#/components/schemas/SendMessageConfiguration"},{"type":"null"}],"example":null},"metadata":{"type":"object"}}},"Message":{"type":"object","properties":{"message_id":{"type":"string","example":"message_id"},"context_id":{"type":"string","example":""},"task_id":{"type":"string","example":""},"role":{"type":"string","enum":["ROLE_UNSPECIFIED","ROLE_USER","ROLE_AGENT"],"example":"ROLE_USER"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"},"example":[{"text":""}]},"metadata":{"type":"object"},"extensions":{"type":"array","items":{"type":"string","example":""},"example":[""]},"reference_task_ids":{"type":"array","items":{"type":"string","example":""},"example":[""]}}},"Part":{"allOf":[{"type":"object","properties":{"metadata":{"type":"object"},"filename":{"type":"string","example":""},"media_type":{"type":"string","example":""}}},{"oneOf":[{"type":"object","properties":{"text":{"type":"string","example":""}},"required":["text"]},{"type":"object","properties":{"raw":{"type":"string","format":"byte"}},"required":["raw"]},{"type":"object","properties":{"url":{"type":"string","example":""}},"required":["url"]},{"type":"object","properties":{"data":{}},"required":["data"]}]}],"example":{"text":""}},"SendMessageConfiguration":{"type":"object","properties":{"accepted_output_modes":{"type":"array","items":{"type":"string","example":""},"example":[""]},"task_push_notification_config":{"oneOf":[{"$ref":"#/components/schemas/TaskPushNotificationConfig"},{"type":"null"}],"example":null},"history_length":{"type":"integer","format":"int32"},"return_immediately":{"type":"boolean","example":false}}},"TaskPushNotificationConfig":{"type":"object","properties":{"tenant":{"type":"string","example":""},"id":{"type":"string","example":""},"task_id":{"type":"string","example":""},"url":{"type":"string","example":"url"},"token":{"type":"string","example":""},"authentication":{"oneOf":[{"$ref":"#/components/schemas/AuthenticationInfo"},{"type":"null"}],"example":null}}},"AuthenticationInfo":{"type":"object","properties":{"scheme":{"type":"string","example":"scheme"},"credentials":{"type":"string","example":""}}},"GetTaskRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"id":{"type":"string","example":"id"},"history_length":{"type":"integer","format":"int32"}}},"ListTasksRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"context_id":{"type":"string","example":""},"status":{"type":"string","enum":["TASK_STATE_UNSPECIFIED","TASK_STATE_SUBMITTED","TASK_STATE_WORKING","TASK_STATE_COMPLETED","TASK_STATE_FAILED","TASK_STATE_CANCELED","TASK_STATE_INPUT_REQUIRED","TASK_STATE_REJECTED","TASK_STATE_AUTH_REQUIRED"],"example":"TASK_STATE_SUBMITTED"},"page_size":{"type":"integer","format":"int32"},"page_token":{"type":"string","example":""},"history_length":{"type":"integer","format":"int32"},"status_timestamp_after":{"type":"string","format":"date-time"},"include_artifacts":{"type":"boolean","example":false}}},"CancelTaskRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"id":{"type":"string","example":"id"},"metadata":{"type":"object"}}},"GetTaskPushNotificationConfigRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"task_id":{"type":"string","example":"task_id"},"id":{"type":"string","example":"id"}}},"ListTaskPushNotificationConfigsRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"task_id":{"type":"string","example":"task_id"},"page_size":{"type":"integer","format":"int32"},"page_token":{"type":"string","example":""}}},"DeleteTaskPushNotificationConfigRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"task_id":{"type":"string","example":"task_id"},"id":{"type":"string","example":"id"}}},"SubscribeToTaskRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""},"id":{"type":"string","example":"id"}}},"GetExtendedAgentCardRequest":{"type":"object","properties":{"tenant":{"type":"string","example":""}}},"A2ARequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"method":{"type":"string","enum":["SendMessage","SendStreamingMessage","GetTask","ListTasks","CancelTask","CreateTaskPushNotificationConfig","GetTaskPushNotificationConfig","ListTaskPushNotificationConfigs","DeleteTaskPushNotificationConfig","SubscribeToTask","GetExtendedAgentCard"]},"params":{"oneOf":[{"$ref":"#/components/schemas/SendMessageRequest"},{"$ref":"#/components/schemas/GetTaskRequest"},{"$ref":"#/components/schemas/ListTasksRequest"},{"$ref":"#/components/schemas/CancelTaskRequest"},{"$ref":"#/components/schemas/TaskPushNotificationConfig"},{"$ref":"#/components/schemas/GetTaskPushNotificationConfigRequest"},{"$ref":"#/components/schemas/ListTaskPushNotificationConfigsRequest"},{"$ref":"#/components/schemas/DeleteTaskPushNotificationConfigRequest"},{"$ref":"#/components/schemas/SubscribeToTaskRequest"},{"$ref":"#/components/schemas/GetExtendedAgentCardRequest"}]}}}}}}