# Save routine

> Saves a routine, a workout to do again.

`WRITE save_routine`

Your assistant uses it when you ask for a routine or a programme. A set without figures follows what you did last time.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| `title` | string | Required. What the routine is called, such as Push day; the workouts done with it take the same name. Up to 200 characters. |
| `exercises` | array | Required. The exercises in the order they are done. 1 to 100 items. |
| `id` | string | Only to replace one of the person's routines, as list_routines returned it; leave out for a new one. Up to 100 characters. |
| `note` | string or null | Guidance to train by, shown whenever the routine is started. Up to 10,000 characters. |
| `supersets` | array | Names and rests for supersets; one an exercise points at without listing it here is made with neither. Up to 50 items. |

### Exercises

| Input | Type | Description |
| --- | --- | --- |
| `exercise` | string | Required. An exercise id exactly as list_exercises or save_exercise returned it. Up to 100 characters. |
| `sets` | array | Required. One per set, in order. A set without figures follows what the person did last time; give figures only for targets the routine should keep. 1 to 100 items. |
| `restSeconds` | integer | Rest after each set, 0 for none; left out, the app rests 90 seconds. From 0 to 3,600. |
| `note` | string | A line about this exercise, such as a cue or how it felt. Up to 2,000 characters. |
| `superset` | string | The id of the superset this exercise is done in turns with; list its exercises one after another. Up to 100 characters. |
| `alternatives` | array | Up to five exercise ids the person could do instead, such as when a machine is taken, best first; get_exercise_relations suggests them for a place. 1 to 5 items. |

## What your assistant is told

The tool's own instructions, word for word, as every assistant receives them.

> Save a routine, a workout to do again, when the person asks for one or for a programme, one routine for each kind of training day; a suggestion alone is not a request. Find every exercise with list_exercises first. Leave a set's figures out so it follows what the person did last time, and give figures only for targets the routine should keep. A routine has no day: to put a session on a day, plan it with create_workout. With id this replaces the whole routine, so read it with list_routines and pass everything it should keep. Confirm only after success.
