# Create "Own" Recipe

{% hint style="danger" %}
**CAUTION: Legacy Endpoint!**\
Please refer to the [User's recipe](https://docs.suggestic.com/graphql/query/mutations/food-log/user-recipe/create-a-user-recipe) documentation for a new and improved way of creating your own recipe for food logging or other purposes.
{% endhint %}

Use the `createOwnRecipe`mutation to create a new "own" recipe for the currently logged user. The purpose of creating a custom recipe is to add food with multiple ingredients to add them to your daily log.&#x20;

**Optional:** use *logAfterCreation* to automatically add to the user's log after the item has been created.

{% hint style="info" %}
Created recipes cannot be added to a meal plan.
{% endhint %}

### Resources

* Refer to [this how-to guide](https://docs.suggestic.com/graphql/advanced-guides/how-to-guides/how-to-log-your-custom-recipe) to find and implementation example of this mutation.

### List of Arguments

| Required           | Type  |                                                                                                      |                                                                      |
| ------------------ | ----- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `recipeName`       | true  | String!                                                                                              | Name of the recipe                                                   |
| `logAfterCreation` | false | Boolean                                                                                              | Log this recipe after created? default: true                         |
| `ingredients`      | true  | \[[OwnRecipeIngredient](https://docs.suggestic.com/graphql/objects/food-logs/own-recipe-ingredient)] | Object that represents the list of ingredients related to the recipe |
| `quantity`         | true  | Float!                                                                                               | Quantity of the ingredients                                          |
| `serving`          | true  | Float!                                                                                               | Servings quantity                                                    |

{% tabs %}
{% tab title="Mutation" %}

```graphql
mutation {
  createOwnRecipe(
    recipeName: "My cool bacon eggs"
    logAfterCreation:true
    ingredients: [
      {
        id: "01123",
        mealType: USDA_MEAL,
        quantity: 2,
        serving: 1
      },
      {
        id: "10123",
        mealType: USDA_MEAL,
        quantity: 1,
        serving: 1
      }
    ]
    quantity: 1
  ) {
    success
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "createOwnRecipe": {
      "success": true
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.suggestic.com/graphql/query/mutations/food-log/users-foods-and-recipes/own-recipe/create-own-recipe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
