amend_trip_link
Update an existing trip link when plans change—add, edit, replace, rename, or remove legs and return the updated link, so one link grows with the trip.
Instructions
Update a trip link you already built — add legs, change one leg's fields, replace them all, rename, or drop one — and get the new link back. Use this instead of building a fresh link every time the plan changes, so the person holds one link that grows. To change ONE leg (its lodging, date, note, who is on it) use update rather than resending every leg through legs. Takes a draft link (#d=) plus the changes; no network, no password, the trip is inside the link. For a KEPT trip (#k=) use add_to_kept_trip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | Legs to APPEND after the last one. | |
| legs | No | REPLACES every leg. Omit to keep them. | |
| link | Yes | The existing draft link, whole URL or just the #d= fragment. | |
| name | No | New trip name. | |
| origin | No | New starting point. | |
| remove | No | Drop leg number N (1-based). Applied after add/legs/update. | |
| update | No | Change fields on existing legs without resending the rest. Each item names a leg (1-based) and the fields to set; a field set to null is cleared. Applied after add/legs, before remove. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | ||
| link | Yes | The trip link. Give this to the person rather than opening it. | |
| changed | Yes | What this call actually altered. |