Design LINE Imagemap (Rich Message)
line_design_imagemapDesign a validated LINE Imagemap message and return JSON for sending. Requires pre-hosted images at a public HTTPS base URL.
Instructions
Build a validated Imagemap message (LINE OA Manager calls it a "Rich Message") and return it as JSON to hand to line_send_message via message.message_json. DESIGN ONLY — never calls the LINE API.
Image hosting (critical): LINE has NO imagemap-image upload API — you must pre-host the image at a public HTTPS base_url, and LINE fetches sized variants ${base_url}/1040, /700, /460, /300, /240 (host all, or serve the right size per suffix). Canvas width is always forced to 1040; you give base_height and all area coordinates in px on that 1040-wide canvas. areas must fit inside 1040 × base_height. Optional video area supported.
Returns { message, usage_hint }.
Example: "Rich Message ครึ่งบน-ครึ่งล่าง กดไปคนละลิงก์" → { base_url:"https://cdn.example.com/promo", alt_text:"โปรเดือนนี้", base_height:1040, areas:[{bounds:{x:0,y:0,width:1040,height:520},action:{type:"uri",uri:"https://shop.example.com/a"}},{bounds:{x:0,y:520,width:1040,height:520},action:{type:"uri",uri:"https://shop.example.com/b"}}] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| areas | Yes | At least 1 tappable area. Bounds are px on the 1040-wide base; must stay in bounds. | |
| video | No | Optional inline video that plays over part of the image. | |
| alt_text | Yes | Fallback text shown when the image can't render (≤400 chars). | |
| base_url | Yes | HTTPS base URL of the pre-hosted image set. LINE requests /1040 /700 /460 /300 /240 from it. No upload API — you must host the images yourself. | |
| base_height | Yes | Image height in px WHEN the width is 1040 (width is always forced to 1040). |