<p>If you don't want to get into plugin controllers and actions you can replicate this format here: <a href="https://craftcms.com/docs/templating/entry-form" rel="nofollow noreferrer">https://craftcms.com/docs/templating/entry-form</a></p>

<p>And trick Craft into believing your data comes from an entry form. </p>

CC BY-SA 3.0
2016-11-30T15:48:45.740Z
Thanks for the hint. I have tried this to no avail, but I think there may have been a server POST issue that I have to investigate tomorrow. I'll get back to you...
designermonkey
CC BY-SA 3.0
2016-11-29T15:11:06.073Z
2016-11-29T15:11:06.073Z
gioppe
<p>I have a site set up that uses Craft as a CMS only, not used to display templates, as this is handled by React JS separately.</p>

<p>My site is set up so that Craft responds on <code>/api</code>.</p>

<p>I cannot for the life of me figure out how to POST data into a section!</p>

<p>I have a route set up, so my routes file is like:</p>

<pre><code>return array(
    'post-message' =&gt; array(
        'action' =&gt; 'entries/saveEntry',
        'sectionId' =&gt; 13,
    ),
);
</code></pre>

<p>I am trying to test this using Rested app, posting a couple of fields into my section, but it doesn't do anything.</p>

<p>Rested is pointing to <code>/api/post-message</code> using a POST request.</p>

<p>I can't find any documentation that tutors a developer on how to post data into a section, so I'm completely stuck here.</p>

CC BY-SA 3.0
2017-03-19T21:08:01.457Z
Currently researching the best approach to use Craft as a headless CMS. May I ask how your set up of front- and backend looks like? Do you run the React frontend in a different environment?
rppld
<routing><post>
POSTing data into Craft
# POSTing data into Craft

(Asked by: username_0 on 2016-11-29)

I have a site set up that uses Craft as a CMS only, not used to display templates, as this is handled by React JS separately.
My site is set up so that Craft responds on /api.
I cannot for the life of me figure out how to POST data into a section!
I have a route set up, so my routes file is like:
return array(
    'post-message' => array(
        'action' => 'entries/saveEntry',
        'sectionId' => 13,
    ),
);

I am trying to test this using Rested app, posting a couple of fields into my section, but it doesn't do anything.
Rested is pointing to /api/post-message using a POST request.
I can't find any documentation that tutors a developer on how to post data into a section, so I'm completely stuck here.

**Tags:** routing, post

> **Comments:**
> **username_1**: Currently researching the best approach to use Craft as a headless CMS. May I ask how your set up of front- and backend looks like? Do you run the React frontend in a different environment?  

---

## 1 answers

### Answer by username_2 on 2016-11-29. Score: 2 | Accepted answer

If you don't want to get into plugin controllers and actions you can replicate this format here: <https://craftcms.com/docs/templating/entry-form>

And trick Craft into believing your data comes from an entry form.

> **Comments:**
> **username_0**: Thanks for the hint. I have tried this to no avail, but I think there may have been a server POST issue that I have to investigate tomorrow. I'll get back to you...  

---

