{"openapi":"3.1.2","info":{"title":"Meta Flow Hub Public API","description":"Server-to-server messaging API for workspace integrations.","version":"0.1.0"},"components":{"securitySchemes":{"WorkspaceApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Workspace API key."}},"schemas":{}},"tags":[{"name":"Health","description":"Service availability."},{"name":"Messages","description":"Send messages and inspect delivery status."},{"name":"Message Templates","description":"Discover and preview reusable message templates."}],"paths":{"/health":{"get":{"summary":"Get external API health","tags":["Health"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["status","service"],"properties":{"status":{"const":"ok","type":"string"},"service":{"const":"meta-flow-hub-api-external","type":"string"}}}},"additionalProperties":false}}}}},"operationId":"getHealth"}},"/v1/messages":{"post":{"security":[{"WorkspaceApiKey":[]}],"summary":"Queue a message for delivery","description":"Requires the messages:send scope. The request contract documents WhatsApp and Instagram text, template, image, and document shapes. Only channel=whatsapp with content.type=template is currently supported for delivery; other shapes are rejected.","tags":["Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"description":"WhatsApp template message. Currently supported for delivery.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"template","templateId":"00000000-0000-4000-8000-000000000001","variables":{"first_name":"Ada"}}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","templateId","variables"],"properties":{"type":{"description":"Reusable approved message template.","examples":["template"],"const":"template","type":"string"},"templateId":{"description":"Approved message template ID.","format":"uuid","examples":["00000000-0000-4000-8000-000000000001"],"type":"string"},"variables":{"description":"Named values for the selected template.","examples":[{"first_name":"Ada"}],"maxProperties":50,"type":"object","patternProperties":{"^(.*)$":{"maxLength":4000,"type":"string"}}}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp text message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"text","text":"Hello from Meta Flow Hub"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","text"],"properties":{"type":{"description":"Plain text message.","examples":["text"],"const":"text","type":"string"},"text":{"description":"Message body.","minLength":1,"maxLength":4000,"examples":["Hello from Meta Flow Hub"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp image message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"image","url":"https://cdn.example.com/hero.png","caption":"Welcome"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","url"],"properties":{"type":{"description":"Image message.","examples":["image"],"const":"image","type":"string"},"url":{"description":"HTTPS URL of the image.","format":"uri","examples":["https://cdn.example.com/hero.png"],"type":"string"},"caption":{"description":"Optional image caption.","maxLength":1024,"examples":["Welcome"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp document message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"document","url":"https://cdn.example.com/guide.pdf","filename":"guide.pdf","caption":"Read this guide"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","url","filename"],"properties":{"type":{"description":"Document message.","examples":["document"],"const":"document","type":"string"},"url":{"description":"HTTPS URL of the document.","format":"uri","examples":["https://cdn.example.com/guide.pdf"],"type":"string"},"filename":{"description":"Filename shown to the recipient.","minLength":1,"maxLength":255,"examples":["guide.pdf"],"type":"string"},"caption":{"description":"Optional document caption.","maxLength":1024,"examples":["Read this guide"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram template message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"template","templateId":"00000000-0000-4000-8000-000000000001","variables":{"first_name":"Ada"}}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","templateId","variables"],"properties":{"type":{"description":"Reusable approved message template.","examples":["template"],"const":"template","type":"string"},"templateId":{"description":"Approved message template ID.","format":"uuid","examples":["00000000-0000-4000-8000-000000000001"],"type":"string"},"variables":{"description":"Named values for the selected template.","examples":[{"first_name":"Ada"}],"maxProperties":50,"type":"object","patternProperties":{"^(.*)$":{"maxLength":4000,"type":"string"}}}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram text message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"text","text":"Hello from Meta Flow Hub"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","text"],"properties":{"type":{"description":"Plain text message.","examples":["text"],"const":"text","type":"string"},"text":{"description":"Message body.","minLength":1,"maxLength":4000,"examples":["Hello from Meta Flow Hub"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram image message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"image","url":"https://cdn.example.com/hero.png","caption":"Welcome"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","url"],"properties":{"type":{"description":"Image message.","examples":["image"],"const":"image","type":"string"},"url":{"description":"HTTPS URL of the image.","format":"uri","examples":["https://cdn.example.com/hero.png"],"type":"string"},"caption":{"description":"Optional image caption.","maxLength":1024,"examples":["Welcome"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram document message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"document","url":"https://cdn.example.com/guide.pdf","filename":"guide.pdf","caption":"Read this guide"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","url","filename"],"properties":{"type":{"description":"Document message.","examples":["document"],"const":"document","type":"string"},"url":{"description":"HTTPS URL of the document.","format":"uri","examples":["https://cdn.example.com/guide.pdf"],"type":"string"},"filename":{"description":"Filename shown to the recipient.","minLength":1,"maxLength":255,"examples":["guide.pdf"],"type":"string"},"caption":{"description":"Optional document caption.","maxLength":1024,"examples":["Read this guide"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}}]}},"application/x-www-form-urlencoded":{"schema":{"anyOf":[{"description":"WhatsApp template message. Currently supported for delivery.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"template","templateId":"00000000-0000-4000-8000-000000000001","variables":{"first_name":"Ada"}}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","templateId","variables"],"properties":{"type":{"description":"Reusable approved message template.","examples":["template"],"const":"template","type":"string"},"templateId":{"description":"Approved message template ID.","format":"uuid","examples":["00000000-0000-4000-8000-000000000001"],"type":"string"},"variables":{"description":"Named values for the selected template.","examples":[{"first_name":"Ada"}],"maxProperties":50,"type":"object","patternProperties":{"^(.*)$":{"maxLength":4000,"type":"string"}}}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp text message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"text","text":"Hello from Meta Flow Hub"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","text"],"properties":{"type":{"description":"Plain text message.","examples":["text"],"const":"text","type":"string"},"text":{"description":"Message body.","minLength":1,"maxLength":4000,"examples":["Hello from Meta Flow Hub"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp image message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"image","url":"https://cdn.example.com/hero.png","caption":"Welcome"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","url"],"properties":{"type":{"description":"Image message.","examples":["image"],"const":"image","type":"string"},"url":{"description":"HTTPS URL of the image.","format":"uri","examples":["https://cdn.example.com/hero.png"],"type":"string"},"caption":{"description":"Optional image caption.","maxLength":1024,"examples":["Welcome"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp document message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"document","url":"https://cdn.example.com/guide.pdf","filename":"guide.pdf","caption":"Read this guide"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","url","filename"],"properties":{"type":{"description":"Document message.","examples":["document"],"const":"document","type":"string"},"url":{"description":"HTTPS URL of the document.","format":"uri","examples":["https://cdn.example.com/guide.pdf"],"type":"string"},"filename":{"description":"Filename shown to the recipient.","minLength":1,"maxLength":255,"examples":["guide.pdf"],"type":"string"},"caption":{"description":"Optional document caption.","maxLength":1024,"examples":["Read this guide"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram template message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"template","templateId":"00000000-0000-4000-8000-000000000001","variables":{"first_name":"Ada"}}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","templateId","variables"],"properties":{"type":{"description":"Reusable approved message template.","examples":["template"],"const":"template","type":"string"},"templateId":{"description":"Approved message template ID.","format":"uuid","examples":["00000000-0000-4000-8000-000000000001"],"type":"string"},"variables":{"description":"Named values for the selected template.","examples":[{"first_name":"Ada"}],"maxProperties":50,"type":"object","patternProperties":{"^(.*)$":{"maxLength":4000,"type":"string"}}}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram text message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"text","text":"Hello from Meta Flow Hub"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","text"],"properties":{"type":{"description":"Plain text message.","examples":["text"],"const":"text","type":"string"},"text":{"description":"Message body.","minLength":1,"maxLength":4000,"examples":["Hello from Meta Flow Hub"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram image message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"image","url":"https://cdn.example.com/hero.png","caption":"Welcome"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","url"],"properties":{"type":{"description":"Image message.","examples":["image"],"const":"image","type":"string"},"url":{"description":"HTTPS URL of the image.","format":"uri","examples":["https://cdn.example.com/hero.png"],"type":"string"},"caption":{"description":"Optional image caption.","maxLength":1024,"examples":["Welcome"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram document message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"document","url":"https://cdn.example.com/guide.pdf","filename":"guide.pdf","caption":"Read this guide"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","url","filename"],"properties":{"type":{"description":"Document message.","examples":["document"],"const":"document","type":"string"},"url":{"description":"HTTPS URL of the document.","format":"uri","examples":["https://cdn.example.com/guide.pdf"],"type":"string"},"filename":{"description":"Filename shown to the recipient.","minLength":1,"maxLength":255,"examples":["guide.pdf"],"type":"string"},"caption":{"description":"Optional document caption.","maxLength":1024,"examples":["Read this guide"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}}]}},"multipart/form-data":{"schema":{"anyOf":[{"description":"WhatsApp template message. Currently supported for delivery.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"template","templateId":"00000000-0000-4000-8000-000000000001","variables":{"first_name":"Ada"}}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","templateId","variables"],"properties":{"type":{"description":"Reusable approved message template.","examples":["template"],"const":"template","type":"string"},"templateId":{"description":"Approved message template ID.","format":"uuid","examples":["00000000-0000-4000-8000-000000000001"],"type":"string"},"variables":{"description":"Named values for the selected template.","examples":[{"first_name":"Ada"}],"maxProperties":50,"type":"object","patternProperties":{"^(.*)$":{"maxLength":4000,"type":"string"}}}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp text message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"text","text":"Hello from Meta Flow Hub"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","text"],"properties":{"type":{"description":"Plain text message.","examples":["text"],"const":"text","type":"string"},"text":{"description":"Message body.","minLength":1,"maxLength":4000,"examples":["Hello from Meta Flow Hub"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp image message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"image","url":"https://cdn.example.com/hero.png","caption":"Welcome"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","url"],"properties":{"type":{"description":"Image message.","examples":["image"],"const":"image","type":"string"},"url":{"description":"HTTPS URL of the image.","format":"uri","examples":["https://cdn.example.com/hero.png"],"type":"string"},"caption":{"description":"Optional image caption.","maxLength":1024,"examples":["Welcome"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"WhatsApp document message. Documented for a future release; currently rejected.","examples":[{"channel":"whatsapp","to":"+6281234567890","content":{"type":"document","url":"https://cdn.example.com/guide.pdf","filename":"guide.pdf","caption":"Read this guide"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["whatsapp"],"const":"whatsapp","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["+6281234567890"],"type":"string"},"content":{"type":"object","required":["type","url","filename"],"properties":{"type":{"description":"Document message.","examples":["document"],"const":"document","type":"string"},"url":{"description":"HTTPS URL of the document.","format":"uri","examples":["https://cdn.example.com/guide.pdf"],"type":"string"},"filename":{"description":"Filename shown to the recipient.","minLength":1,"maxLength":255,"examples":["guide.pdf"],"type":"string"},"caption":{"description":"Optional document caption.","maxLength":1024,"examples":["Read this guide"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram template message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"template","templateId":"00000000-0000-4000-8000-000000000001","variables":{"first_name":"Ada"}}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","templateId","variables"],"properties":{"type":{"description":"Reusable approved message template.","examples":["template"],"const":"template","type":"string"},"templateId":{"description":"Approved message template ID.","format":"uuid","examples":["00000000-0000-4000-8000-000000000001"],"type":"string"},"variables":{"description":"Named values for the selected template.","examples":[{"first_name":"Ada"}],"maxProperties":50,"type":"object","patternProperties":{"^(.*)$":{"maxLength":4000,"type":"string"}}}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram text message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"text","text":"Hello from Meta Flow Hub"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","text"],"properties":{"type":{"description":"Plain text message.","examples":["text"],"const":"text","type":"string"},"text":{"description":"Message body.","minLength":1,"maxLength":4000,"examples":["Hello from Meta Flow Hub"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram image message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"image","url":"https://cdn.example.com/hero.png","caption":"Welcome"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","url"],"properties":{"type":{"description":"Image message.","examples":["image"],"const":"image","type":"string"},"url":{"description":"HTTPS URL of the image.","format":"uri","examples":["https://cdn.example.com/hero.png"],"type":"string"},"caption":{"description":"Optional image caption.","maxLength":1024,"examples":["Welcome"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}},{"description":"Instagram document message. Documented for a future release; currently rejected.","examples":[{"channel":"instagram","to":"instagram-user-123","content":{"type":"document","url":"https://cdn.example.com/guide.pdf","filename":"guide.pdf","caption":"Read this guide"}}],"type":"object","required":["channel","to","content"],"properties":{"channel":{"description":"Message channel.","examples":["instagram"],"const":"instagram","type":"string"},"to":{"description":"Recipient identifier for the selected channel.","minLength":1,"examples":["instagram-user-123"],"type":"string"},"content":{"type":"object","required":["type","url","filename"],"properties":{"type":{"description":"Document message.","examples":["document"],"const":"document","type":"string"},"url":{"description":"HTTPS URL of the document.","format":"uri","examples":["https://cdn.example.com/guide.pdf"],"type":"string"},"filename":{"description":"Filename shown to the recipient.","minLength":1,"maxLength":255,"examples":["guide.pdf"],"type":"string"},"caption":{"description":"Optional document caption.","maxLength":1024,"examples":["Read this guide"],"type":"string"}}},"contactName":{"maxLength":200,"type":"string"},"tagIds":{"maxItems":100,"type":"array","items":{"format":"uuid","type":"string"}},"trackingTags":{"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"description":"Trimmed tracking tag, 1-256 characters.","type":"string"}}}}]}}}},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","required":["dispatchId","status","statusUrl"],"properties":{"dispatchId":{"format":"uuid","type":"string"},"status":{"type":"string","enum":["queued","processing","sent","delivered","failed","canceled","unknown"]},"statusUrl":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"429":{"description":"Response for status 429","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"502":{"description":"Response for status 502","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1Messages"}},"/v1/messages/tracking-tags":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Discover message tracking tags","description":"Requires the messages:read scope. Dates are inclusive and interpreted in Asia/Jakarta (WIB).","tags":["Messages"],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"page","in":"query","required":false,"schema":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]}},{"name":"prefix","in":"query","required":false,"schema":{"maxLength":256,"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items","pagination"],"properties":{"items":{"type":"array","items":{"type":"object","required":["trackingTag","dispatchCount"],"properties":{"trackingTag":{"type":"string"},"dispatchCount":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"pagination":{"type":"object","required":["page","limit","totalItems","totalPages"],"properties":{"page":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"limit":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]},"totalItems":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"totalPages":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesTracking-tags"}},"/v1/messages/tracking-report/summary":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Summarize message tracking tags","description":"Requires the messages:read scope. Matching dispatches are SENT or DELIVERED and dates are inclusive WIB dates.","tags":["Messages"],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"page","in":"query","required":false,"schema":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]}},{"name":"trackingTags","in":"query","required":true,"schema":{"minItems":1,"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"type":"string"}}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["period","rupiahPerCredit","items"],"properties":{"period":{"type":"object","required":["startDate","endDate","timezone"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timezone":{"const":"Asia/Jakarta","type":"string"}}},"rupiahPerCredit":{"minimum":0,"type":"number"},"items":{"type":"array","items":{"type":"object","required":["trackingTag","dispatchCount","credits","amountRupiah","templates"],"properties":{"trackingTag":{"type":"string"},"dispatchCount":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"credits":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"amountRupiah":{"minimum":0,"type":"number"},"templates":{"type":"array","items":{"type":"object","required":["templateId","templateName","dispatchCount","credits","amountRupiah"],"properties":{"templateId":{"format":"uuid","type":"string"},"templateName":{"type":"string"},"dispatchCount":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"credits":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"amountRupiah":{"minimum":0,"type":"number"}}}}}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesTracking-reportSummary"}},"/v1/messages/tracking-report/dispatches":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"List message tracking dispatches","description":"Requires messages:read. Use repeated trackingTags with ANY/ALL, or explicit scope=WORKSPACE without trackingTags/match to include all workspace dispatches, including untagged sends. Dates and SENT/DELIVERED status rules are unchanged.","tags":["Messages"],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"page","in":"query","required":false,"schema":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]}},{"name":"trackingTags","in":"query","required":false,"schema":{"minItems":1,"maxItems":20,"type":"array","items":{"minLength":1,"maxLength":256,"type":"string"}}},{"name":"scope","in":"query","required":false,"schema":{"const":"WORKSPACE","type":"string"}},{"name":"match","in":"query","required":false,"schema":{"type":"string","enum":["ANY","ALL"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["period","rupiahPerCredit","items","pagination"],"properties":{"period":{"type":"object","required":["startDate","endDate","timezone"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timezone":{"const":"Asia/Jakarta","type":"string"}}},"rupiahPerCredit":{"minimum":0,"type":"number"},"items":{"type":"array","items":{"type":"object","required":["dispatchId","recipientPhone","templateId","templateName","source","apiClient","status","trackingTags","creditCost","amountRupiah","createdAt","sentAt","deliveredAt"],"properties":{"dispatchId":{"format":"uuid","type":"string"},"recipientPhone":{"type":"string"},"templateId":{"format":"uuid","type":"string"},"templateName":{"type":"string"},"source":{"type":"string","enum":["EXTERNAL_API","BROADCAST","INBOX"]},"apiClient":{"nullable":true,"type":["object","null"],"required":["id","name"],"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"}}},"status":{"type":"string","enum":["SENT","DELIVERED"]},"trackingTags":{"type":"array","items":{"type":"string"}},"creditCost":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"amountRupiah":{"minimum":0,"type":"number"},"createdAt":{"format":"date-time","type":"string"},"sentAt":{"nullable":true,"format":"date-time","type":["string","null"]},"deliveredAt":{"nullable":true,"format":"date-time","type":["string","null"]}}}},"pagination":{"type":"object","required":["page","limit","totalItems","totalPages"],"properties":{"page":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"limit":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]},"totalItems":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"totalPages":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesTracking-reportDispatches"}},"/v1/messages/tracking-report/summary-by-category":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Summarize clinic tracking tags by template category","description":"Requires the messages:read scope. The trackingTagPrefix selects opaque tags such as clinic: and dates are inclusive WIB dates.","tags":["Messages"],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"page","in":"query","required":false,"schema":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]}},{"name":"trackingTagPrefix","in":"query","required":true,"schema":{"minLength":1,"maxLength":256,"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["period","trackingTagPrefix","rupiahPerCredit","items","pagination"],"properties":{"period":{"type":"object","required":["startDate","endDate","timezone"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timezone":{"const":"Asia/Jakarta","type":"string"}}},"trackingTagPrefix":{"type":"string"},"rupiahPerCredit":{"minimum":0,"type":"number"},"items":{"type":"array","items":{"type":"object","required":["trackingTag","dispatchCount","credits","amountRupiah","categories"],"properties":{"trackingTag":{"type":"string"},"dispatchCount":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"credits":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"amountRupiah":{"minimum":0,"type":"number"},"categories":{"type":"array","items":{"type":"object","required":["templateCategory","dispatchCount","credits","amountRupiah"],"properties":{"templateCategory":{"nullable":true,"type":["string","null"],"enum":["MARKETING","UTILITY","AUTHENTICATION"]},"dispatchCount":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"credits":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"amountRupiah":{"minimum":0,"type":"number"}}}}}}},"pagination":{"type":"object","required":["page","limit","totalItems","totalPages"],"properties":{"page":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"limit":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]},"totalItems":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"totalPages":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesTracking-reportSummary-by-category"}},"/v1/messages/tracking-report/dispatches-by-category":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"List clinic tracking dispatches by template category","description":"Requires the messages:read scope. One row is returned for each matching tracking tag on a dispatch.","tags":["Messages"],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"page","in":"query","required":false,"schema":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]}},{"name":"trackingTagPrefix","in":"query","required":true,"schema":{"minLength":1,"maxLength":256,"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["period","trackingTagPrefix","rupiahPerCredit","items","pagination"],"properties":{"period":{"type":"object","required":["startDate","endDate","timezone"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timezone":{"const":"Asia/Jakarta","type":"string"}}},"trackingTagPrefix":{"type":"string"},"rupiahPerCredit":{"minimum":0,"type":"number"},"items":{"type":"array","items":{"type":"object","required":["dispatchId","recipientPhone","trackingTag","templateId","templateName","templateCategory","status","creditCost","amountRupiah","createdAt","sentAt","deliveredAt"],"properties":{"dispatchId":{"format":"uuid","type":"string"},"recipientPhone":{"type":"string"},"trackingTag":{"type":"string"},"templateId":{"format":"uuid","type":"string"},"templateName":{"type":"string"},"templateCategory":{"nullable":true,"type":["string","null"],"enum":["MARKETING","UTILITY","AUTHENTICATION"]},"status":{"type":"string","enum":["SENT","DELIVERED"]},"creditCost":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"amountRupiah":{"minimum":0,"type":"number"},"createdAt":{"format":"date-time","type":"string"},"sentAt":{"nullable":true,"format":"date-time","type":["string","null"]},"deliveredAt":{"nullable":true,"format":"date-time","type":["string","null"]}}}},"pagination":{"type":"object","required":["page","limit","totalItems","totalPages"],"properties":{"page":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"limit":{"minimum":1,"maximum":100000,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"type":"integer"}]},"totalItems":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"totalPages":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesTracking-reportDispatches-by-category"}},"/v1/messages/{dispatchId}":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Read one message status","description":"Requires the messages:read scope.","tags":["Messages"],"parameters":[{"name":"dispatchId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["dispatchId","status"],"properties":{"dispatchId":{"format":"uuid","type":"string"},"status":{"type":"string","enum":["queued","processing","sent","delivered","failed","canceled","unknown"]}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesByDispatchId"}},"/v1/messages/delivery-status":{"post":{"security":[{"WorkspaceApiKey":[]}],"summary":"List delivery status events by phone","description":"Requires the messages:read scope. Dates are inclusive and interpreted in Asia/Jakarta (WIB).","tags":["Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phones","startDate","endDate"],"properties":{"phones":{"minItems":1,"maxItems":500,"type":"array","items":{"minLength":1,"maxLength":20,"type":"string"}},"startDate":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"endDate":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["phones","startDate","endDate"],"properties":{"phones":{"minItems":1,"maxItems":500,"type":"array","items":{"minLength":1,"maxLength":20,"type":"string"}},"startDate":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"endDate":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["phones","startDate","endDate"],"properties":{"phones":{"minItems":1,"maxItems":500,"type":"array","items":{"minLength":1,"maxLength":20,"type":"string"}},"startDate":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"endDate":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["phone","events"],"properties":{"phone":{"type":"string"},"events":{"type":"array","items":{"type":"object","required":["dispatchId","status","occurredAt","failureCode"],"properties":{"dispatchId":{"format":"uuid","type":"string"},"status":{"type":"string","enum":["ACCEPTED","DELIVERED","REJECTED"]},"occurredAt":{"format":"date-time","type":"string"},"failureCode":{"nullable":true,"type":["string","null"]}}}}}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1MessagesDelivery-status"}},"/v1/messages/send-check":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Check whether a message was sent","description":"Requires the messages:read scope. The date is interpreted as a complete Asia/Jakarta calendar day.","tags":["Messages"],"parameters":[{"name":"phone","in":"query","required":true,"schema":{"minLength":1,"maxLength":20,"type":"string"}},{"name":"templateId","in":"query","required":true,"schema":{"format":"uuid","type":"string"}},{"name":"date","in":"query","required":false,"schema":{"maxLength":10,"pattern":"^(?:\\d{4}-\\d{2}-\\d{2})?$","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["sent","dispatchId","submittedAt"],"properties":{"sent":{"type":"boolean"},"dispatchId":{"nullable":true,"format":"uuid","type":["string","null"]},"submittedAt":{"nullable":true,"format":"date-time","type":["string","null"]}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesSend-check"}},"/v1/messages/reply-cost-report/summary":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Summarize Oriskin legacy reply costs by clinic","description":"Requires messages:read and the configured Oriskin workspace. Inclusive WIB dates; Rp750 per eligible legacy WhatsApp text reply from 1 October 2026. Other projects return zero. This read-only report does not change credit balances.","tags":["Messages"],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"name":"project","in":"query","required":true,"schema":{"pattern":"^project:[a-z0-9][a-z0-9-]{0,119}$","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["project","period","source","effectiveFrom","rupiahPerReply","items","totals","generationId","sync"],"properties":{"project":{"type":"string"},"period":{"type":"object","required":["startDate","endDate","timezone"],"properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"timezone":{"const":"Asia/Jakarta","type":"string"}}},"source":{"const":"ORISKIN_OMNI","type":"string"},"effectiveFrom":{"const":"2026-10-01T00:00:00+07:00","type":"string"},"rupiahPerReply":{"const":750,"type":"number"},"items":{"type":"array","items":{"type":"object","required":["trackingTag","replyCount","amountRupiah"],"properties":{"trackingTag":{"type":"string"},"replyCount":{"minimum":0,"maximum":9007199254740991,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":9007199254740991,"type":"integer"}]},"amountRupiah":{"minimum":0,"maximum":9007199254740991,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":9007199254740991,"type":"integer"}]}}}},"totals":{"type":"object","required":["replyCount","amountRupiah","unassignedReplyCount"],"properties":{"replyCount":{"minimum":0,"maximum":9007199254740991,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":9007199254740991,"type":"integer"}]},"amountRupiah":{"minimum":0,"maximum":9007199254740991,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":9007199254740991,"type":"integer"}]},"unassignedReplyCount":{"minimum":0,"maximum":9007199254740991,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":9007199254740991,"type":"integer"}]}}},"generationId":{"nullable":true,"format":"uuid","type":["string","null"]},"sync":{"type":"object","required":["status","lastSuccessfulSyncAt","sourceObservedThrough","lastFullReconciliationAt","coverageStart"],"properties":{"status":{"type":"string","enum":["CURRENT","STALE","RECONCILING"]},"lastSuccessfulSyncAt":{"nullable":true,"format":"date-time","type":["string","null"]},"sourceObservedThrough":{"nullable":true,"format":"date-time","type":["string","null"]},"lastFullReconciliationAt":{"nullable":true,"format":"date-time","type":["string","null"]},"coverageStart":{"format":"date-time","type":"string"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"503":{"description":"Response for status 503","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1MessagesReply-cost-reportSummary"}},"/v1/message-templates":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"List message templates","description":"Requires the templates:read scope.","tags":["Message Templates"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","displayName","status","versions"],"properties":{"id":{"format":"uuid","type":"string"},"displayName":{"type":"string"},"status":{"minLength":1,"maxLength":32,"type":"string"},"versions":{"type":"array","items":{"type":"object","required":["id","version","status","variableDefinitions","customerPreview","creditCostPerSend","createdAt","readyAt","disabledAt"],"properties":{"id":{"format":"uuid","type":"string"},"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"status":{"minLength":1,"maxLength":32,"type":"string"},"variableDefinitions":{"type":"array","items":{"type":"object","required":["name","type","required"],"properties":{"name":{"minLength":1,"maxLength":64,"type":"string"},"type":{"type":"string","enum":["text","image_url","video_url","document_url"]},"required":{"const":true,"type":"boolean"}}}},"customerPreview":{"type":"string"},"creditCostPerSend":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"createdAt":{"type":"string"},"readyAt":{"nullable":true,"type":["string","null"]},"disabledAt":{"nullable":true,"type":["string","null"]}}}}}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1Message-templates"}},"/v1/message-templates/{templateId}":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Get one message template","description":"Requires the templates:read scope.","tags":["Message Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["id","displayName","status","versions"],"properties":{"id":{"format":"uuid","type":"string"},"displayName":{"type":"string"},"status":{"minLength":1,"maxLength":32,"type":"string"},"versions":{"type":"array","items":{"type":"object","required":["id","version","status","variableDefinitions","customerPreview","creditCostPerSend","createdAt","readyAt","disabledAt"],"properties":{"id":{"format":"uuid","type":"string"},"version":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"status":{"minLength":1,"maxLength":32,"type":"string"},"variableDefinitions":{"type":"array","items":{"type":"object","required":["name","type","required"],"properties":{"name":{"minLength":1,"maxLength":64,"type":"string"},"type":{"type":"string","enum":["text","image_url","video_url","document_url"]},"required":{"const":true,"type":"boolean"}}}},"customerPreview":{"type":"string"},"creditCostPerSend":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"createdAt":{"type":"string"},"readyAt":{"nullable":true,"type":["string","null"]},"disabledAt":{"nullable":true,"type":["string","null"]}}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1Message-templatesByTemplateId"}},"/v1/message-templates/{templateVersionId}/preview":{"post":{"security":[{"WorkspaceApiKey":[]}],"summary":"Preview a message template","description":"Requires the templates:read scope.","tags":["Message Templates"],"parameters":[{"name":"templateVersionId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["variables"],"properties":{"variables":{"maxItems":50,"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"minLength":1,"maxLength":64,"type":"string"},"value":{"minLength":1,"maxLength":1000,"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["variables"],"properties":{"variables":{"maxItems":50,"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"minLength":1,"maxLength":64,"type":"string"},"value":{"minLength":1,"maxLength":1000,"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["variables"],"properties":{"variables":{"maxItems":50,"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"minLength":1,"maxLength":64,"type":"string"},"value":{"minLength":1,"maxLength":1000,"type":"string"}}}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["templateVersionId","preview"],"properties":{"templateVersionId":{"format":"uuid","type":"string"},"preview":{"type":"string"}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"postV1Message-templatesByTemplateVersionIdPreview"}},"/v1/conversations":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"List conversations","tags":["Conversations"],"parameters":[{"name":"phone","in":"query","required":false,"schema":{"minLength":1,"maxLength":32,"type":"string"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","enum":["WHATSAPP","INSTAGRAM"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["OPEN","RESOLVED"]}},{"name":"cursor","in":"query","required":false,"schema":{"minLength":1,"maxLength":512,"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100,"default":25,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":25,"type":"integer"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","status","contact","endpoint","lastMessage","lastInboundAt","lastOutboundAt","lastMessageAt","serviceWindowExpiresAt"],"properties":{"id":{"format":"uuid","type":"string"},"status":{"type":"string","enum":["OPEN","RESOLVED"]},"contact":{"type":"object","required":["id","displayName","externalReference"],"properties":{"id":{"format":"uuid","type":"string"},"displayName":{"nullable":true,"type":["string","null"]},"externalReference":{"nullable":true,"type":["string","null"]}}},"endpoint":{"type":"object","required":["id","channel","address","displayAddress"],"properties":{"id":{"format":"uuid","type":"string"},"channel":{"type":"string"},"address":{"type":"string"},"displayAddress":{"type":"string"}}},"lastMessage":{"nullable":true,"type":["object","null"],"required":["id","direction","status","occurredAt"],"properties":{"id":{"format":"uuid","type":"string"},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]},"status":{"type":"string","enum":["QUEUED","PROCESSING","RECEIVED","SENT","DELIVERED","READ","FAILED","UNKNOWN"]},"occurredAt":{"format":"date-time","type":"string"}}},"lastInboundAt":{"nullable":true,"format":"date-time","type":["string","null"]},"lastOutboundAt":{"nullable":true,"format":"date-time","type":["string","null"]},"lastMessageAt":{"nullable":true,"format":"date-time","type":["string","null"]},"serviceWindowExpiresAt":{"format":"date-time","type":"string"}}}},"nextCursor":{"nullable":true,"type":["string","null"]}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1Conversations"}},"/v1/conversations/{conversationId}":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"Get a conversation","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["id","status","contact","endpoint","serviceWindowExpiresAt","createdAt","resolvedAt","lastMessageAt","lastInboundAt","lastOutboundAt"],"properties":{"id":{"format":"uuid","type":"string"},"status":{"type":"string","enum":["OPEN","RESOLVED"]},"contact":{"type":"object","required":["id","displayName","externalReference"],"properties":{"id":{"format":"uuid","type":"string"},"displayName":{"nullable":true,"type":["string","null"]},"externalReference":{"nullable":true,"type":["string","null"]}}},"endpoint":{"type":"object","required":["id","channel","address","displayAddress"],"properties":{"id":{"format":"uuid","type":"string"},"channel":{"type":"string"},"address":{"type":"string"},"displayAddress":{"type":"string"}}},"serviceWindowExpiresAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"resolvedAt":{"nullable":true,"format":"date-time","type":["string","null"]},"lastMessageAt":{"nullable":true,"format":"date-time","type":["string","null"]},"lastInboundAt":{"nullable":true,"format":"date-time","type":["string","null"]},"lastOutboundAt":{"nullable":true,"format":"date-time","type":["string","null"]}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1ConversationsByConversationId"}},"/v1/conversations/{conversationId}/messages":{"get":{"security":[{"WorkspaceApiKey":[]}],"summary":"List conversation messages","tags":["Conversations"],"parameters":[{"name":"conversationId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"minLength":1,"maxLength":512,"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":100,"default":25,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":25,"type":"integer"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","conversationId","direction","source","dispatchId","channel","status","occurredAt","statusChangedAt","failureCode","content"],"properties":{"id":{"format":"uuid","type":"string"},"conversationId":{"format":"uuid","type":"string"},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]},"source":{"type":"string","enum":["PROVIDER","INBOX","API","BROADCAST"]},"dispatchId":{"nullable":true,"format":"uuid","type":["string","null"]},"channel":{"type":"string","enum":["WHATSAPP","INSTAGRAM"]},"status":{"type":"string","enum":["QUEUED","PROCESSING","RECEIVED","SENT","DELIVERED","READ","FAILED","UNKNOWN"]},"occurredAt":{"format":"date-time","type":"string"},"statusChangedAt":{"format":"date-time","type":"string"},"failureCode":{"nullable":true,"type":["string","null"]},"content":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"TEXT","type":"string"},"text":{"type":"string"}}},{"type":"object","required":["type","caption","attachment"],"properties":{"type":{"const":"MEDIA","type":"string"},"caption":{"nullable":true,"type":["string","null"]},"attachment":{"type":"object","required":["id","type","filename","mimeType","byteSize","sha256","status","url"],"properties":{"id":{"format":"uuid","type":"string"},"type":{"type":"string"},"filename":{"nullable":true,"type":["string","null"]},"mimeType":{"nullable":true,"type":["string","null"]},"byteSize":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"sha256":{"nullable":true,"type":["string","null"]},"status":{"type":"string"},"url":{"nullable":true,"format":"uri","type":["string","null"]}}}}},{"type":"object","required":["type","template","variables","renderedText","assets"],"properties":{"type":{"const":"TEMPLATE","type":"string"},"template":{"type":"object","required":["id","versionId","name","version"],"properties":{"id":{"type":"string"},"versionId":{"type":"string"},"name":{"type":"string"},"version":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}},"variables":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"renderedText":{"type":"string"},"assets":{"type":"array","items":{"type":"object","required":["id","type","filename","mimeType","byteSize","sha256","status","url"],"properties":{"id":{"format":"uuid","type":"string"},"type":{"type":"string"},"filename":{"nullable":true,"type":["string","null"]},"mimeType":{"nullable":true,"type":["string","null"]},"byteSize":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"sha256":{"nullable":true,"type":["string","null"]},"status":{"type":"string"},"url":{"nullable":true,"format":"uri","type":["string","null"]}}}}}}]},"trackingTags":{"type":"array","items":{"type":"string"}}}}},"nextCursor":{"nullable":true,"type":["string","null"]}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}},"422":{"description":"Response for status 422","content":{"application/json":{"schema":{"type":"object","required":["success","error","message"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getV1ConversationsByConversationIdMessages"}},"/v1/message-attachments/{attachmentId}/content":{"get":{"summary":"Read a private message attachment","tags":["Messages"],"parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}},{"name":"token","in":"query","required":false,"schema":{"type":"string"}},{"name":"download","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"text/plain":{"schema":{"type":"string"}}}},"206":{"description":"Response for status 206","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Response for status 404","content":{"text/plain":{"schema":{"type":"string"}}}},"416":{"description":"Response for status 416","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Response for status 429","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"getV1Message-attachmentsByAttachmentIdContent"},"head":{"summary":"Inspect a private message attachment","tags":["Messages"],"parameters":[{"name":"attachmentId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}},{"name":"token","in":"query","required":false,"schema":{"type":"string"}},{"name":"download","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"text/plain":{"schema":{"type":"string"}}}},"206":{"description":"Response for status 206","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Response for status 404","content":{"text/plain":{"schema":{"type":"string"}}}},"416":{"description":"Response for status 416","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Response for status 429","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"headV1Message-attachmentsByAttachmentIdContent"}},"/v1/template-assets/{assetId}/content":{"get":{"summary":"Read a template asset","tags":["Templates"],"parameters":[{"name":"assetId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}},{"name":"download","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"text/plain":{"schema":{"type":"string"}}}},"206":{"description":"Response for status 206","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Response for status 404","content":{"text/plain":{"schema":{"type":"string"}}}},"416":{"description":"Response for status 416","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Response for status 429","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"getV1Template-assetsByAssetIdContent"},"head":{"summary":"Inspect a template asset","tags":["Templates"],"parameters":[{"name":"assetId","in":"path","required":true,"schema":{"format":"uuid","type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}},{"name":"download","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"text/plain":{"schema":{"type":"string"}}}},"206":{"description":"Response for status 206","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Response for status 404","content":{"text/plain":{"schema":{"type":"string"}}}},"416":{"description":"Response for status 416","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Response for status 429","content":{"text/plain":{"schema":{"type":"string"}}}}},"operationId":"headV1Template-assetsByAssetIdContent"}}}}