rebuild_schedule
Use this ONLY when the user has explicitly asked to regenerate their entire posting schedule from scratch: DELETES every SmartSchedule timeslot the account has and generates slotsPerDay new ones on each of the 7 days, spread between 5am and 11pm in the account's timezone. This is the dashboard's "Generate new SmartSchedule" button. Free, but it cannot be undone — the times the user had are gone, including any they set by hand.
Confirm with the user before calling, and tell them their current times will be replaced. Do NOT reach for this to fix a few bad times: to spread a clustered schedule, or to change specific times, use update_timeslot, delete_timeslot and create_timeslot, which leave the rest of the schedule alone. There is no way to ask for a particular part of the day — the generator spreads slots across the whole 5am-11pm window, so it cannot satisfy "mornings only".
Evergreen (SmartLoop) slots are the one exception and survive untouched; everything list_timeslots shows is replaced. Pins already scheduled keep the times they were given and are not deleted. Two rebuilds cannot run at once: a second one while the first is still going is refused, so do not retry on a timeout without checking list_timeslots first. If a rebuild fails outright, call list_timeslots before deciding what to do: the delete and the insert are separate steps, so a failure part-way can leave the account with no posting times at all, and re-running the rebuild is what restores them. If the user did not say which Pinterest account to use and list_accounts returns more than one, ask the user which account to use before calling this — do not choose for them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | Numeric Tailwind account ID returned by list_accounts | |
| slotsPerDay | Yes | How many posting times to generate per day, 1 to 50. The total becomes this times 7. Ask the user rather than guessing; the dashboard's own default is 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rebuilt | Yes | Whether the schedule was replaced | |
| slotsPerDay | Yes | Slots generated per day | |
| timeslotCount | Yes | Total slots the schedule now holds | |
| timezoneSource | Yes | user = generated in the account's own timezone; fallback = the account has none set and America/New_York was used, which is worth telling the user |