Answers.Body: <p>I'd caution against trying to adapt the ElementAPI plugin for this purpose, as it was designed to be read-only—it's basically a wrapper around Craft's <code>ElementQuery</code> interface, which does not handle write operations.</p>
  
  <p>In lieu of that, you might take a look at the <a href="https://github.com/markhuot/craftql" rel="nofollow noreferrer">CraftQL plugin</a>, by Mark Huot. It supports sophisticated queries (reading), as well as mutations (writing).</p>
  
  <p>Otherwise, if the scope of the content you need to update is relatively narrow (i.e. you know what section and fields you need to use), I'd recommend reading through the <a href="https://docs.craftcms.com/v3/plugin-intro.html" rel="nofollow noreferrer">plugin docs</a>, and determining whether it's something you could build on your own, with a simple Controller and supporting Service(s)!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-18T16:47:44.690Z
Answers.LastActivityDate: 2018-06-18T16:47:44.690Z
Answers.UserDisplayName: August Miller
Body: <p>I’d like to use Craft as a headless CMS for my mobile app (via the <a href="https://github.com/craftcms/element-api" rel="nofollow noreferrer">Element API</a> plugin). However, in addition to reading data, I’d also like to write data back to Craft.</p>
  
  <p>It looks like this is typically done using an <a href="https://docs.craftcms.com/v3/templating/examples/entry-form.html" rel="nofollow noreferrer">Entry Form</a> on the front-end. Is writing to Craft possible without using Craft’s front-end though (e.g. native inputs in the app that send data via the API instead of a web view with an entry form)? If not, could this be accomplished by forking the Element API and adding that functionality somehow?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T11:36:03.617Z
Comments.Text: You could create a custom plugin, I would not suggest you to fork the plugin
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-19T19:10:00.523Z
Comments.Text: This link may be of interest: https://www.flipboxfactory.com/blog/restful-api-with-yii2-and-craft-3
Comments.UserDisplayName: Dalton Rooney
Tags: <plugin-elementapi><frontend-form><entry-form><app>
Title: Write to Craft via Element API
ThreadText: # Write to Craft via Element API
  
  (Asked by: username_0 on 2018-06-18)
  
  I’d like to use Craft as a headless CMS for my mobile app (via the [Element API](https://github.com/craftcms/element-api) plugin). However, in addition to reading data, I’d also like to write data back to Craft.
  
  It looks like this is typically done using an [Entry Form](https://docs.craftcms.com/v3/templating/examples/entry-form.html) on the front-end. Is writing to Craft possible without using Craft’s front-end though (e.g. native inputs in the app that send data via the API instead of a web view with an entry form)? If not, could this be accomplished by forking the Element API and adding that functionality somehow?
  
  **Tags:** plugin-elementapi, frontend-form, entry-form, app
  
  > **Comments:**
  > **username_1**: You could create a custom plugin, I would not suggest you to fork the plugin  
  > **username_2**: This link may be of interest: https://www.flipboxfactory.com/blog/restful-api-with-yii2-and-craft-3  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-06-18. Score: 1 | Accepted answer
  
  I'd caution against trying to adapt the ElementAPI plugin for this purpose, as it was designed to be read-only—it's basically a wrapper around Craft's `ElementQuery` interface, which does not handle write operations.
  
  In lieu of that, you might take a look at the [CraftQL plugin](https://github.com/markhuot/craftql), by Mark Huot. It supports sophisticated queries (reading), as well as mutations (writing).
  
  Otherwise, if the scope of the content you need to update is relatively narrow (i.e. you know what section and fields you need to use), I'd recommend reading through the [plugin docs](https://docs.craftcms.com/v3/plugin-intro.html), and determining whether it's something you could build on your own, with a simple Controller and supporting Service(s)!
  
  
  ---
  
  