# API Email creation

**URL:** https://forum.mautic.org/t/api-email-creation/20603
**Category:** Development
**Created:** [August 26, 2021, 2:10pm UTC](https://forum.mautic.org/t/api-email-creation/20603 "2021-08-26T14:10:40Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)
#### Post date: [September 7, 2021, 6:12pm UTC](https://forum.mautic.org/t/api-email-creation/20603/5 "2021-09-07T18:12:35Z")

</div>

> [@joeyk](#):
>
> mautic/plugins/GrapesJsBuilderBundle/Model/GrapesJsBuilderModel.php

I have no clue what array $origin is supposed to be. Here is the full function - or whatever these thingies are called:

> ```
> /**
> * If the $key exists in the $origin array then it will return its value.
> *
> * @param mixed $key
> * @param mixed $defaultValue
> *
> * @return mixed
> */
> public static function getValue($key, array $origin, $defaultValue = null)
> {
> return array_key_exists($key, $origin) ? $origin[$key] : $defaultValue;
> }
> 
> ```

[Here’s someone who had the same problem](https://forum.mautic.org/t/grapejs-builder-not-working-no-option-presented-for-landing-pages/19760). He solved it using magic 🌈

---

_[View the full topic](https://forum.mautic.org/t/api-email-creation/20603)._
