{"openapi":"3.1.0","info":{"title":"CERRIVO Connect API","description":"API Enterprise para integrar conversaciones de webchat y WhatsApp con aislamiento por empresa, idempotencia y webhooks firmados.","version":"1.0.0"},"paths":{"/connect/v1/project":{"get":{"tags":["CERRIVO Connect"],"summary":"Connect Project","operationId":"connect_project_connect_v1_project_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Connect Project Connect V1 Project Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/channels":{"get":{"tags":["CERRIVO Connect"],"summary":"Connect Channels","operationId":"connect_channels_connect_v1_channels_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Connect Channels Connect V1 Channels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/channel-sessions":{"post":{"tags":["CERRIVO Connect"],"summary":"Create Channel Session","description":"Create a one-time hosted setup link without exposing provider credentials.","operationId":"create_channel_session_connect_v1_channel_sessions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelSessionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Channel Session Connect V1 Channel Sessions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/channel-sessions/{session_id}":{"get":{"tags":["CERRIVO Connect"],"summary":"Get Channel Session","operationId":"get_channel_session_connect_v1_channel_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Channel Session Connect V1 Channel Sessions  Session Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["CERRIVO Connect"],"summary":"Cancel Channel Session","operationId":"cancel_channel_session_connect_v1_channel_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/conversations":{"get":{"tags":["CERRIVO Connect"],"summary":"Connect Conversations","operationId":"connect_conversations_connect_v1_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Connect Conversations Connect V1 Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/conversations/{conversation_id}/messages":{"get":{"tags":["CERRIVO Connect"],"summary":"Connect Messages","operationId":"connect_messages_connect_v1_conversations__conversation_id__messages_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Connect Messages Connect V1 Conversations  Conversation Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["CERRIVO Connect"],"summary":"Create Connect Message","operationId":"create_connect_message_connect_v1_conversations__conversation_id__messages_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectMessageIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Connect Message Connect V1 Conversations  Conversation Id  Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/usage":{"get":{"tags":["CERRIVO Connect"],"summary":"Connect Usage","operationId":"connect_usage_connect_v1_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Connect Usage Connect V1 Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/webhook-endpoints":{"get":{"tags":["CERRIVO Connect"],"summary":"List Webhook Endpoints","operationId":"list_webhook_endpoints_connect_v1_webhook_endpoints_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Webhook Endpoints Connect V1 Webhook Endpoints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]},"post":{"tags":["CERRIVO Connect"],"summary":"Create Webhook Endpoint","operationId":"create_webhook_endpoint_connect_v1_webhook_endpoints_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Webhook Endpoint Connect V1 Webhook Endpoints Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/webhook-endpoints/{endpoint_id}":{"delete":{"tags":["CERRIVO Connect"],"summary":"Disable Webhook Endpoint","operationId":"disable_webhook_endpoint_connect_v1_webhook_endpoints__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/webhook-endpoints/{endpoint_id}/rotate-secret":{"post":{"tags":["CERRIVO Connect"],"summary":"Rotate Webhook Secret","operationId":"rotate_webhook_secret_connect_v1_webhook_endpoints__endpoint_id__rotate_secret_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rotate Webhook Secret Connect V1 Webhook Endpoints  Endpoint Id  Rotate Secret Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/webhook-endpoints/{endpoint_id}/test":{"post":{"tags":["CERRIVO Connect"],"summary":"Test Webhook Endpoint","operationId":"test_webhook_endpoint_connect_v1_webhook_endpoints__endpoint_id__test_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Webhook Endpoint Connect V1 Webhook Endpoints  Endpoint Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/webhook-deliveries":{"get":{"tags":["CERRIVO Connect"],"summary":"List Webhook Deliveries","operationId":"list_webhook_deliveries_connect_v1_webhook_deliveries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Webhook Deliveries Connect V1 Webhook Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}},"/connect/v1/webhook-deliveries/{delivery_id}/replay":{"post":{"tags":["CERRIVO Connect"],"summary":"Replay Webhook Delivery","operationId":"replay_webhook_delivery_connect_v1_webhook_deliveries__delivery_id__replay_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Replay Webhook Delivery Connect V1 Webhook Deliveries  Delivery Id  Replay Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"ChannelSessionIn":{"properties":{"channel":{"type":"string","const":"whatsapp","title":"Channel","default":"whatsapp"},"expires_in_minutes":{"type":"integer","maximum":60.0,"minimum":10.0,"title":"Expires In Minutes","default":30}},"type":"object","title":"ChannelSessionIn"},"ConnectMessageIn":{"properties":{"type":{"type":"string","enum":["text","template"],"title":"Type","default":"text"},"body":{"type":"string","maxLength":4096,"minLength":1,"title":"Body"},"template_name":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Template Name"},"template_language":{"type":"string","maxLength":10,"minLength":2,"title":"Template Language","default":"es"}},"type":"object","required":["body"],"title":"ConnectMessageIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"},"WebhookEndpointIn":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":12,"title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","maxItems":12,"minItems":1,"title":"Event Types"}},"type":"object","required":["url","event_types"],"title":"WebhookEndpointIn"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"servers":[{"url":"https://app.cerrivo.com"}]}