{"openapi":"3.1.0","info":{"title":"Vesper Relay API","description":"REST API for the WhatsApp Business Platform. Auth: `Authorization: Bearer vr_live_…` or `vr_test_…` (test mode, nothing reaches Meta). Guides: /docs.","version":"1"},"paths":{"/api/v1/numbers":{"get":{"summary":"List connected numbers","operationId":"list_numbers_api_v1_numbers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Numbers Api V1 Numbers Get"}}}}}}},"/api/v1/templates":{"get":{"summary":"List message templates","operationId":"list_templates_api_v1_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Templates Api V1 Templates Get"}}}}}},"post":{"summary":"Submit a template to Meta for review","operationId":"create_template_api_v1_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Template Api V1 Templates Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/messages":{"post":{"summary":"Send a template or free-text message","operationId":"send_message_api_v1_messages_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/MessageIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/messages/{message_id}":{"get":{"summary":"Get one message and its delivery status","operationId":"get_message_api_v1_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Message Api V1 Messages  Message Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/test/inbound":{"post":{"summary":"Test mode: simulate a customer message","operationId":"test_inbound_api_v1_test_inbound_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Test Inbound Api V1 Test Inbound Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhook/ping":{"post":{"summary":"Send a relay.ping to your webhook now","operationId":"webhook_ping_api_v1_webhook_ping_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Webhook Ping Api V1 Webhook Ping Post"}}}}}}},"/api/v1/onboarding-links":{"get":{"summary":"List onboarding links","operationId":"list_links_api_v1_onboarding_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Links Api V1 Onboarding Links Get"}}}}}},"post":{"summary":"Create a link a business uses to connect its number to your account","operationId":"create_link_api_v1_onboarding_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Link Api V1 Onboarding Links Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding-links/{link_id}":{"delete":{"summary":"Revoke an onboarding link","operationId":"revoke_link_api_v1_onboarding_links__link_id__delete","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"integer","title":"Link Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instagram/accounts":{"get":{"summary":"List connected Instagram accounts","operationId":"list_accounts_api_v1_instagram_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Accounts Api V1 Instagram Accounts Get"}}}}}}},"/api/v1/instagram/messages":{"post":{"summary":"Reply to an Instagram DM","operationId":"send_message_api_v1_instagram_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IgMessageIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Send Message Api V1 Instagram Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/instagram/accounts/{account_id}/ice-breakers":{"put":{"summary":"Set the questions shown before a customer writes","operationId":"ice_breakers_api_v1_instagram_accounts__account_id__ice_breakers_put","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IceBreakersIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ice Breakers Api V1 Instagram Accounts  Account Id  Ice Breakers Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IceBreaker":{"properties":{"question":{"type":"string","maxLength":80,"title":"Question"},"payload":{"type":"string","maxLength":1000,"title":"Payload"}},"type":"object","required":["question","payload"],"title":"IceBreaker"},"IceBreakersIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IceBreaker"},"type":"array","maxItems":4,"title":"Items","default":[]}},"type":"object","title":"IceBreakersIn"},"IgMessageIn":{"properties":{"to":{"type":"string","maxLength":40,"title":"To","description":"Instagram-scoped id of the customer: entry[].messaging[].sender.id from the webhook."},"text":{"type":"string","maxLength":1000,"title":"Text"},"quick_replies":{"items":{"$ref":"#/components/schemas/QuickReply"},"type":"array","title":"Quick Replies","default":[]},"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Id"},"human_agent":{"type":"boolean","title":"Human Agent","description":"A person answers more than 24 h after the customer's last message (up to 7 days).","default":false}},"type":"object","required":["to","text"],"title":"IgMessageIn"},"InboundIn":{"properties":{"from":{"type":"string","maxLength":40,"title":"From"},"text":{"type":"string","maxLength":4096,"title":"Text"},"default_region":{"type":"string","maxLength":2,"title":"Default Region","default":"CH"}},"type":"object","required":["from","text"],"title":"InboundIn"},"LinkIn":{"properties":{"label":{"type":"string","maxLength":80,"title":"Label","default":""},"external_ref":{"type":"string","maxLength":120,"title":"External Ref","default":""},"days":{"type":"integer","maximum":90.0,"minimum":1.0,"title":"Days","default":14}},"type":"object","title":"LinkIn"},"MessageIn":{"properties":{"to":{"type":"string","maxLength":40,"title":"To"},"template":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Template"},"language":{"type":"string","title":"Language","default":"de"},"params":{"items":{"type":"string"},"type":"array","title":"Params","default":[]},"text":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Text"},"number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Id"},"default_region":{"type":"string","maxLength":2,"title":"Default Region","default":"CH"}},"type":"object","required":["to"],"title":"MessageIn"},"QuickReply":{"properties":{"title":{"type":"string","maxLength":20,"title":"Title"},"payload":{"type":"string","maxLength":1000,"title":"Payload"}},"type":"object","required":["title","payload"],"title":"QuickReply"},"TemplateIn":{"properties":{"name":{"type":"string","maxLength":512,"title":"Name"},"language":{"type":"string","title":"Language","default":"de"},"category":{"type":"string","title":"Category","default":"UTILITY"},"body":{"type":"string","maxLength":1024,"title":"Body"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples","default":[]},"buttons":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Buttons","description":"Optional quick-reply button texts: up to 3, 1 to 25 characters each, all different.","default":[]},"number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Id"}},"type":"object","required":["name","body"],"title":"TemplateIn"},"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"}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key from Settings"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://relay.vesperai.ch"}]}