I need to get the parameters from a http post url sent to my site and use the data to create a new entry in Expressionenegine.

1 Answer 1


You need to use the Channel Entries API. This will allow you to programatically create new Channel Entries.


The correct way to do it would be to create a custom module, and then have wherever this data is coming from ping that ACTion url.


Make sure when you do your database inserts for your ACTion ID, you make sure to set the csrf_exempt column to 1, otherwise you will not be able to post to your website from a different domain. HOWEVER, you MUST replace that protection with something else. The simple thing would be to use something akin to an API key. Here's an example to run with for you custom module:

class My_module 

    $channel_id = "666";

    function __construct()
        // instantiate your channel entries api

    function my_module_method_for_making_channel_entries()
        // bail if you don't get your trusted api key
        if ( ee()->input->post('api_key') != 'random_api_key_youll_make_up' ) 

        // go ahead an use the channel entries api
        $title = ee()->input->post('title');
        $data = array("title" => $title);

        // save entry
        ee()->api_channel_entries->submit_new_entry($this->channel_id, $data);
  • Thank you jrothafer, this worked exactly as i asked, except i had to use save_entry instead and also add session data. however the script does empty previous data when updated with only some of the fields filled in.
    – Ralph
    Oct 2, 2015 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.