Title: Additional Headers
Last modified: November 8, 2019

---

# Additional Headers

 *  Resolved [kpeu3e](https://wordpress.org/support/users/kpeu3e/)
 * (@kpeu3e)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/)
 * Hello,
 * I am trying to integrate CF7 with a third-party app. They require the contact
   form to send them this information:
 * curl -X “POST” “[https://api.mariner.yembo.ai/initial-params&#8221](https://api.mariner.yembo.ai/initial-params&#8221);\
   -
   H ‘Content-Type: application/json’ \ -H ‘X-Landing-Page-Access-Token: your-value-
   here ‘ \ -d $'{ “move”: { “date”: “2018-09-01” }, “consumer”: { “givenName”: “
   Joe”, “phone”: “5550001234”, “email”: “jschmo@example.com”, “familyName”: “Schmo”},“
   origin”: { “zip”: 12345, “beds”: 3 }, “destination”: { “zip”: 90210 } }’
 * I think some part of this request is clear, but I am not sure how to add these
 * curl -X “POST” “[https://api.mariner.yembo.ai/initial-params&#8221](https://api.mariner.yembo.ai/initial-params&#8221);\
   -
   H ‘Content-Type: application/json’ \ -H ‘X-Landing-Page-Access-Token: your-value-
   here ‘ \ -d $'{ “move”: { “date”: “2018-09-01” },
 * I have the token here, but I am not sure how to insert those headers. Would you
   please help me?
 * Thanks!
    -  This topic was modified 6 years, 6 months ago by [kpeu3e](https://wordpress.org/support/users/kpeu3e/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadditional-headers-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Mário Valney](https://wordpress.org/support/users/mariovalney/)
 * (@mariovalney)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12110942)
 * Hi.
 * You can add custom headers this way:
    [https://wordpress.org/support/topic/headers-7-authentication/](https://wordpress.org/support/topic/headers-7-authentication/)
 *  Thread Starter [kpeu3e](https://wordpress.org/support/users/kpeu3e/)
 * (@kpeu3e)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12111152)
 * Hi Mario,
 * thank you very much for your reply!
 * I saw that topic, but still it is not very clear for me.
 * I added this as the webhook URL:
    [https://api.mariner.yembo.ai/initial-params](https://api.mariner.yembo.ai/initial-params)
 * and this to functions.php
 *     ```
       add_filter( 'ctz_post_request_args', 'oilbanker_ctz_post_request_args' );
       function oilbanker_ctz_post_request_args( $args ) {
           $args['headers']['X-Landing-Page-Access-Token: my-token-here'] = 'value';
   
           return $args;
       }
       ```
   
 * now, do I need to also add something about these two?
 *     ```
       -H ‘Content-Type: application/json’ \
       -d $'
       ```
   
 * and if yes, how to add multiple headers? This way?
 *     ```
       add_filter( 'ctz_post_request_args', 'oilbanker_ctz_post_request_args' );
       function oilbanker_ctz_post_request_args( $args ) {
           $args['headers']['X-Landing-Page-Access-Token: my-token-here'] = 'value';
       $args['headers']['Content-Type: application/json'] = 'value';
   
           return $args;
       }
       ```
   
 * Also, is there a way I could test if it is working in the end?
 * Thank you!
    -  This reply was modified 6 years, 6 months ago by [kpeu3e](https://wordpress.org/support/users/kpeu3e/).
 *  Plugin Author [Mário Valney](https://wordpress.org/support/users/mariovalney/)
 * (@mariovalney)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12111185)
 * I guess you don’t need to add Content-Type header. And your custom header is 
   not ok. Just add to your `functions.php`:
 *     ```
       <?php
   
       add_filter( 'ctz_post_request_args', 'kpeu3e_ctz_post_request_args' );
       function kpeu3e_ctz_post_request_args( $args ) {
           $args['headers']['X-Landing-Page-Access-Token'] = 'your-value-here';
   
           return $args;
       }
       ```
   
 * The array key (X-Landing-Page-Access-Token) is the header name and the value 
   is the header’s value.
 * _Note: please, use code tag to make your code more readable on forum._
    -  This reply was modified 6 years, 6 months ago by [Mário Valney](https://wordpress.org/support/users/mariovalney/).
 *  Thread Starter [kpeu3e](https://wordpress.org/support/users/kpeu3e/)
 * (@kpeu3e)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12115230)
 * Thanks, Mario.
 * And does the plugin provide an option to use custom JSON template, or is it only
   predefined?
    For example if I want to exclude some fields.
 * Thanks.
    -  This reply was modified 6 years, 6 months ago by [kpeu3e](https://wordpress.org/support/users/kpeu3e/).
 *  Plugin Author [Mário Valney](https://wordpress.org/support/users/mariovalney/)
 * (@mariovalney)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12118058)
 * In the same way, you can use the **ctz_get_data_from_contact_form** filter to
   change data provided by form or even the **ctz_post_request_args** again.
 * For example:
 *     ```
       <?php
   
       add_filter( 'ctz_post_request_args', 'kpeu3e_ctz_post_request_args' );
       function kpeu3e_ctz_post_request_args( $args ) {
           $args['headers']['X-Landing-Page-Access-Token'] = 'your-value-here';
   
           $data = json_decode( $args['body'] );
           // Your code
           $args['body'] = json_encode( $data );
   
           return $args;
       }
       ```
   
 *  Thread Starter [kpeu3e](https://wordpress.org/support/users/kpeu3e/)
 * (@kpeu3e)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12126755)
 * Thanks!
 * Great plugin and great support!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Additional Headers’ is closed to new replies.

 * ![](https://ps.w.org/cf7-to-zapier/assets/icon-256x256.jpg?rev=3214555)
 * [CF7 to Webhook](https://wordpress.org/plugins/cf7-to-zapier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-to-zapier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-to-zapier/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-to-zapier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-to-zapier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-to-zapier/reviews/)

## Tags

 * [headers](https://wordpress.org/support/topic-tag/headers/)

 * 6 replies
 * 1 participant
 * Last reply from: [kpeu3e](https://wordpress.org/support/users/kpeu3e/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/additional-headers-4/#post-12126755)
 * Status: resolved