> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/mutations/meal-plan/create-meal-plan-template.md).

# Create Meal Plan Template

Use the `createMealPlanTemplate` mutation to create a meal plan template depending on your custom dietary requirements.

{% hint style="info" %}
It is required to use only the `Authorization: Token <api-token>` to execute this query.&#x20;
{% endhint %}

### Meal Plan templates types

There are 3 options to create a meal plan template:

* [`customOptions`](/graphql/query/mutations/meal-plan/create-meal-plan-template/custom-options.md): Send the parameters in the same way as if the `customMealPlan` sends. The meal plan generated is saved in this template.
* [`fromDays`](/graphql/query/mutations/meal-plan/create-meal-plan-template/from-days.md): Copy an existing meal plan which has a user assigned. Send a `profileId` and user's meal plan days required to be copied and saved in the template.
* [`fromScratch`](/graphql/query/mutations/meal-plan/create-meal-plan-template/from-scratch.md): Send a complete meal plan and define the number of days of it. All the parameters such as **days**, **recipes**, etc., have to be introduced manually. All this information is later saved as a template.

### How a meal plan template works:

* Create a meal plan template according to your requirements. You can choose any of the 3 types o meal templates mentioned above.
* [List all available meal plan templates](https://docs.suggestic.com/graphql/query/search/meal-plan-template-search) to get its id to either assign it to a user or generate a meal plan based on its id.
* [Assign](/graphql/query/mutations/meal-plan/assign-a-meal-plan-template-to-a-user.md#required-arguments) a meal plan template to a user.
* [Generate a meal plan](https://docs.suggestic.com/graphql/query/mutations/meal-plan/generate-meal-plan#generate-a-meal-plan-based-on-a-meal-plan-template) based on a meal plan template created.

### Available arguments

<table><thead><tr><th align="center">Argument Name</th><th width="231" align="center">Type</th><th width="150" align="center">Is Required?</th><th>Description</th></tr></thead><tbody><tr><td align="center"><strong>Argument Name</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Is required?</strong></td><td><strong>Description</strong></td></tr><tr><td align="center"><code>coach</code></td><td align="center">Id</td><td align="center">no</td><td>Unique Id of the Coach. Use this if the third party has access to the Coaching Portal</td></tr><tr><td align="center"><code>customOption</code></td><td align="center"><a href="https://docs.suggestic.com/graphql/objects/meal-plan/meal-plan-template#mptcustomoptionsinput-object">MPTCustomOptionsInput</a></td><td align="center">no</td><td>Object that sends the parameters as if it were using the customMealPlan</td></tr><tr><td align="center"><code>description</code></td><td align="center">String</td><td align="center">yes</td><td>Introduce the description of the meal plan template. It can be an empty string.</td></tr><tr><td align="center"><code>fromDays</code></td><td align="center"><a href="https://docs.suggestic.com/graphql/objects/meal-plan/meal-plan-template#mptfromdaysinput-object">MPTFromDaysInput</a></td><td align="center">no</td><td>Object that includes all the required fields to copy an existing meal plan.</td></tr><tr><td align="center"><code>fromScratch</code></td><td align="center"><a href="https://docs.suggestic.com/graphql/objects/meal-plan/meal-plan-template#mptfromscratchinput-object">MPTFromScratchInput</a></td><td align="center">no</td><td>Object that includes all the fields to create a meal plan from scratch.</td></tr><tr><td align="center"><code>isPublic</code></td><td align="center">Boolean</td><td align="center">no</td><td>True if a coach wants to make the template visible to other coaches. Use this field if the third party has access to the coaching portal</td></tr><tr><td align="center"><code>name</code></td><td align="center">String</td><td align="center">yes</td><td>Name of the meal plan template.  It can be an empty string.</td></tr></tbody></table>

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.suggestic.com/graphql/query/mutations/meal-plan/create-meal-plan-template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
