Receive Data From WP Webhooks Pro

Use the webhook URL down below to connect your external service with your site. This URL receives data from external endpoints and does certain actions on your WordPress site. Please note, that deleting the default main webhook creates automatically a new one. If you need more information, check out the installation and documentation by clicking here.
Webhook Name Webhook URL Webhook API Key Action

Add Webhook

Available Webhook Actions

Below you will find a list of all available actions when sending data from your specified service to WordPress.
Create a new user via webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_user
  • user_emailRequired
    This field is required. Include the email for the user.
  • first_name
    The first name of the user.
  • last_name
    The last name of the user.
  • nickname
    The nickname. Please note that the nickname will be sanitized by WordPress automatically.
  • user_login
    A string with which the user can log in to your site.
  • display_name
    The name that will be seen on the frontend of your site.
  • user_nicename
    A URL-friendly name. Default is user' username.
  • description
    A description for the user that will be available on the profile page.
  • rich_editing
    Wether the user should be able to use the Rich editor. Set it to "yes" or "no". Default "no".
  • user_registered
    The date the user gets registered. Date structure: Y-m-d H:i:s
  • user_url
    Include a website url.
  • role
    The main user role. If not set, default is subscriber.
  • additional_roles
    This allows to add multiple roles to a user. For more information, please read the description.
  • user_pass
    The user password. If not defined, we generate a 32 character long password dynamically.
  • user_meta
    You can also add user meta values. Please check the description for more details.
  • send_email
    Set this field to "yes" to send a email to the user with the data.
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the user id with the key "user_id" and the user data with the key "user_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'data' => array(
        'user_id' => 0,
        'user_data' => array()
    )
);
        

This webhook action is used to create a user on your WordPress system via a webhook call.
The description is uniquely made for the create_user webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use create_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to create_user.
  2. It is also required to set an email address using the argument user_email. This should be the email address of the user you want to create.
  3. All the other arguments are optional and just extend the creation of the user. We would still recommend to set the attribute user_login, since this will be the name a user can log in with.


Special Arguments


role
The slug of the role. The default roles have the following slugs: administrator, editor, author, contributor, subscriber

additional_roles
This argument allows you to add or remove additional roles on the user. There are two possible ways of doing that:
  1. String method
    This method allows you to add or remove the user roles using a simple string. To make it work, simply add the slug of the role and define the action (add/remove) after, separated by double points (:). If you want to add multiple roles, simply separate them with a semicolon (;). Please refer to the example down below.
    editor:add;custom-role:add;custom-role-1:remove
  2. JSON method
    We also support a JSON formatted string, which contains the role slug as the JSON key and the action (add/remove) as the value. Please refer to the example below:
    {
      "editor": "add",
      "custom-role": "add",
      "custom-role-1": "remove"
    }

user_meta
This argument is specifically designed to add/update or remove user meta to your updated user.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the user meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the user meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single user meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the user_meta argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three user meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the user_meta argument, needs to be escaped.

send_email
In case you set the send_email argument to yes, we will send an email from this WordPress site to the user email, containing his login details.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the create_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $user_data, $user_id, $user_meta, $update ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $user_data (array)
    Contains the data that is used to create the user.
  2. $user_id (integer)
    Contains the user id of the newly created user. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $user_meta (string)
    Contains the unformatted user meta as you sent it over within the webhook request as a string.
  4. $update (bool)
    This value will be set to 'false' for the create_user webhook.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Update a user via WP Webhooks Pro.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to update_user
  • user_idRequired
    (Optional if user_email is defined) Include the numeric id of the user. (Note that the user_id has a higher priority than the user_email. More details in the description.)
  • user_emailRequired
    (Optional if user_id is defined) Include the email correlated to the account.
  • first_name
    The first name of the user.
  • last_name
    The last name of the user.
  • nickname
    The nickname. Please note that the nickname will be sanitized by WordPress automatically.
  • user_login
    A string with which the user can log in to your site.
  • display_name
    The name that will be seen on the frontend of your site.
  • user_nicename
    A URL-friendly name. Default is user' username.
  • description
    A description for the user that will be available on the profile page.
  • rich_editing
    Wether the user should be able to use the Rich editor. Set it to "yes" or "no". Default "no".
  • user_registered
    The date the user got registered. Date structure: Y-m-d H:i:s
  • user_url
    Include a website url.
  • role
    The main user role. If set, all additional roles are removed.
  • additional_roles
    This allows to add/remove multiple roles on a user. For more information, please read the description.
  • user_pass
    The user password. If not defined, we don't generate a new one.
  • user_meta
    You can also add user meta values. Existing ones get updated. To delete a user meta key, just set the following string as the meta_value: ironikus-delete (More informatin within the description)
  • send_email
    Set this field to "yes" to send a email to the user with the data.
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • create_if_none
    Wether you want to create the user if it does not exists or not. Set it to "yes" or "no" Default is "no".
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the user id with the key "user_id" and the user data with the key "user_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'data' => array(
        'user_id' => 0,
        'user_data' => array()
    )
);
        

This webhook action is used to update a user on your WordPress system via a webhook call.
The description is uniquely made for the update_user webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use update_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to update_user.
  2. It is also required to set the users email address or the user id using the argument user_email/user_id. You can as well set both of them, but in this case, the user id has a higher priority than the email for fetching the user.
  3. All the other arguments are optional and just extend the updating process of the user.


Special Arguments


role
The slug of the role. The default roles have the following slugs: administrator, editor, author, contributor, subscriber
Important: Please note that once you set this value while updating a user, all of your additional roles are removed from that user. This is a default WordPress behavior. If you don't want that, please only use the additional_roles argument and leave this one empty. (In case you set the argument create_if_none to yes, it will create the user with the default role. If you don't want that, simply remove that role within the additional_roles argument again).

additional_roles
This argument allows you to add or remove additional roles on the user. There are two possible ways of doing that:
  1. String method
    This method allows you to add or remove the user roles using a simple string. To make it work, simply add the slug of the role and define the action (add/remove) after, separated by double points (:). If you want to add multiple roles, simply separate them with a semicolon (;). Please refer to the example down below.
    editor:add;custom-role:add;custom-role-1:remove
  2. JSON method
    We also support a JSON formatted string, which contains the role slug as the JSON key and the action (add/remove) as the value. Please refer to the example below:
    {
      "editor": "add",
      "custom-role": "add",
      "custom-role-1": "remove"
    }

user_meta
This argument is specifically designed to add/update or remove user meta to your updated user.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the user meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the user meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single user meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the user_meta argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three user meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the user_meta argument, needs to be escaped.

send_email
In case you set the send_email argument to yes, we will send an email from this WordPress site to the user email, containing his login details.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the update_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $user_data, $user_id, $user_meta, $update ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $user_data (array)
    Contains the data that is used to update the user.
  2. $user_id (integer)
    Contains the user id of the updated user. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $user_meta (string)
    Contains the unformatted user meta as you sent it over within the webhook request as a string.
  4. $update (bool)
    This value will be set to 'true' for the update_user webhook.

create_if_none
In case you set the create_if_none argument to yes, a user will be created with the given details in case it does not exist.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete a user via WP Webhooks Pro.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_user
  • user_idRequired
    (Optional if user_email is defined) Include the numeric id of the user.
  • user_emailRequired
    (Optional if user_email is defined) Include the assigned email of the user.
  • send_email
    Set this field to "yes" to send a email to the user that the account got deleted.
  • remove_from_network
    Set this field to "yes" to delete a user from the whole network. WARNING: This will delete all posts authored by the user. Default: "no"
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the user id with the key "user_id" and the user delete success boolean with the key "user_deleted". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array(
        'user_deleted' => false,
        'user_id' => 0
    )
);
        

This webhook action is used to delete a user on your WordPress system via a webhook call.
This description is uniquely made for the delete_user webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use delete_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to delete_user.
  2. It is also required to set either the email or the user id of the user you want to delete. You can do that by using the user_id or user_email argument.
  3. All the other arguments are optional and just extend the deletion of the user.
  4. Please note that deleting a user inside of a multisite network without setting the remove_from_network argument, just deletes the user from the current site, but not from the whole network.


Special Arguments


send_email
In case you set the send_email argument to yes, we will send an email from this WordPress site to the user email, containing the notice of the deleted account.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the delete_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $user, $user_id, $user_email, $send_email ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $user (object)
    Contains the WordPress user object.
  2. $user_id (integer)
    Contains the user id of the deleted user. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $user_email (string)
    Contains the user email.
  4. $send_email (string)
    Returns either yes or no, depending on your settings for the send_email argument.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Search for users on your WordPress website
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_users
  • argumentsRequired
    A string containing a JSON construct in the WP_User_Query notation. Please check the description for more information.
  • return_only
    Define the data you want to return. Please check the description for more information. Default: get_results
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the user query. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch one or multiple users from your WordPress system via a webhook call.
This description is uniquely made for the get_users webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_users

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_users.
  2. It is also required to set the argument arguments, which contains a JSON formatted string with the parameters used to identify the users.
  3. All the other arguments are optional and just extend the fetching of the users.


Special Arguments


arguments
This argument contains a JSON formatted string, which includes certain arguments from the WordPress user query called WP_User_Query. For further details, please check out the following link:
https://codex.wordpress.org/Class_Reference/WP_User_Query
Here is an example on how the JSON is set up:
{"search":"Max","number":5}
The example above will filter the users for the name "Max" and returns maximum five users with that name.

return_only
You can also manipulate the output of the query using the return_only parameter. This allows you to, for example, output either only the search results, the total count, the whole query object or any combination in between. Here is an example that returns all of the data:
get_total,get_results,all

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_users action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $user_query, $args, $return_only ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $user_query (object)
    The full WP_User_Query object.
  3. $args (string)
    The string formatted JSON construct that was sent by the caller within the arguments argument.
  4. $return_only (string)
    The string that was sent by the caller via the return_only argument.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Returns the object of a user
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_user
  • user_valueRequired
    The user id of the user. You can also use certain other values. Please check the descripton for more details.
  • value_type
    You can choose between certain value types. Possible: id, slug, email, login
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the user qury. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch a single users from your WordPress system via a webhook call.
It uses the WordPress function get_user_by() to fetch the user from the database. To learn more about this function, please check the official WordPress docs:https://developer.wordpress.org/reference/functions/get_user_by/

This description is uniquely made for the get_user webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_user.
  2. It is also required to set the argument user_value, which by default is the user id. You can also use other values like the email or the login name (But for doing so, please read the next step).
  3. In case you want to use e.g. the email instead of the user id, you need to set the argument value_type to email. Further details are down below within the Special Arguments description.
  4. All the other arguments are optional and just extend the fetching of the user.


Special Arguments


value_type
This argument is used to change the data you can add within the user_value argument. Possible values are: id, ID, slug, email, login

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $user_value, $value_type, $user ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $user_value (string)
    The value you included into the user_value argument.
  3. $value_type (string)
    The value you included into the value_type argument.
  4. $user (mixed)
    Returns null in case an the user_value wasn't set, the user object on success or a wp_error object in case an error occurs.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Insert/Create a post. You have all functionalities available from wp_insert_post
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_post
  • post_author
    (mixed) The ID or the email of the user who added the post. Default is the current user ID.
  • post_date
    (string) The date of the post. Default is the current time. Format: 2018-12-31 11:11:11
  • post_date_gmt
    (string) The date of the post in the GMT timezone. Default is the value of $post_date.
  • post_content
    (string) The post content. Default empty.
  • post_content_filtered
    (string) The filtered post content. Default empty.
  • post_title
    (string) The post title. Default empty.
  • post_excerpt
    (string) The post excerpt. Default empty.
  • post_status
    (string) The post status. Default 'draft'.
  • post_type
    (string) The post type. Default 'post'.
  • comment_status
    (string) Whether the post can accept comments. Accepts 'open' or 'closed'. Default is the value of 'default_comment_status' option.
  • ping_status
    (string) Whether the post can accept pings. Accepts 'open' or 'closed'. Default is the value of 'default_ping_status' option.
  • post_password
    (string) The password to access the post. Default empty.
  • post_name
    (string) The post name. Default is the sanitized post title when creating a new post.
  • to_ping
    (string) Space or carriage return-separated list of URLs to ping. Default empty.
  • pinged
    (string) Space or carriage return-separated list of URLs that have been pinged. Default empty.
  • post_parent
    (int) Set this for the post it belongs to, if any. Default 0.
  • menu_order
    (int) The order the post should be displayed in. Default 0.
  • post_mime_type
    (string) The mime type of the post. Default empty.
  • guid
    (string) Global Unique ID for referencing the post. Default empty.
  • post_category
    (string) A comma separated list of category names, slugs, or IDs. Defaults to value of the 'default_category' option. Example: cat_1,cat_2,cat_3
  • tags_input
    (string) A comma separated list of tag names, slugs, or IDs. Default empty.
  • tax_input
    (string) A simple or JSON formatted string containing existing taxonomy terms. Default empty. More details within the description.
  • meta_input
    (string) A json or a comma and semicolon separated list of post meta values keyed by their post meta key. Default empty. More info in the description.
  • wp_error
    Whether to return a WP_Error on failure. Posible values: "yes" or "no". Default value: "no".
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the post id with the key "post_id" and the post data with the key "post_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success'   => false,
    'msg'       => '',
    'data'      => array(
        'post_id' => null,
        'post_data' => null
    )
);
        

This webhook action is used to create a post on your WordPress system via a webhook call.
The description is uniquely made for the create_post webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use create_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to create_post.
  2. All the other arguments are optional and just extend the creation of the post. We would still recommend to set the attribute post_title, to make recognizing it easy, as well as for creating proper permalinks/slugs.


Tipps

  1. In case you want to create a post for a custom post type, you can do that by using the post_type argument.
  2. By default, we create each post in a draft state. If you want to directly publish a post, use the post_status argument and set it to publish.
  3. In case you want to set a short description for your post, you can use the post_excerpt argument.


Special Arguments


post_author
The post author argument accepts either the user id of a user, or the email address of an existing user. In case you choose the email adress, we try to match it with the users on your WordPress site. In case we couldn't find a user for the given email, we leave the field empty.

post_content
The post content is the main content area of the post. It can contain HTML or any other kind of content necessary for your functionality.

post_status
The post status defines further details about how your post will be treated. By default, WordPress offers the following post statuses: draft, pending, private, publish. Please note that other plugins can extend the post status values to offer a bigger variety, e.g. Woocommerce.

post_type
The post type determines to which group of posts your currently created post belongs. Please use the slug of the post type to assign it properly.

tags_input
This argument supports the default tags_input variable of the wp_insert_post() function. Please use this function only if you are known to its functionality since WordPress might not add the values properly due to permissions. If you are not sure, please use the tax_input argument instead.

Here is an example:
342,5678,2
This argument supports a comma separated list of tag names, slugs, or IDs.

tax_input
This argument allows you to add/append/delete any kind of taxonomies on your post. It uses a custom functionality that adds the taxonomies independently of the wp_update_post() function.
To make it work, we offer certain different features and methods to make the most out of the taxonomy management. Down below, you will find further information about the whole functionality.
  1. String method
    This method allows you to add/update/delete or bulk manage the post taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too. In case you use more complex taxonomies that use semicolons or double points within the slugs, you need to use the JSON method.
    • Replace existing taxonomy items
      This method allows you to replace already existing taxonomy items on the post. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      taxonomy_1,tax_item_1:tax_item_2:tax_item_3;taxonomy_2,tax_item_5:tax_item_7:tax_item_8
      To separate the taxonomies from the single taxonomy items, please use a comma ",". In case you want to add multiple items per taxonomy, you can separate them via a double point ":". To separate multiple taxonomies from each other, please separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all; in front of a semicolon-separated list of the taxonomies you want to remove all items for. Here is an example:
      ironikus-remove-all;taxonomy_1;taxonomy_2
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. Here is an example:
      ironikus-append;taxonomy_1,value_1:value_2-ironikus-delete:value_3;taxonomy_2,value_5:value_6:value_7-ironikus-delete
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2. We also add the taxonomy items value_1, value_3, value_5 and value_6. We also remove the taxonomy items value_2 and value_7.
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append; at the beginning of the string.
      ironikus-append;taxonomy_1,value_1:value_2:value_3;taxonomy_2,value_1:value_2:value_3
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2 with multiple taxonomy items on the post. The already assigned ones won't be replaced.
  2. JSON method
    This method allows you to add/update/delete or bulk manage the post taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too.
    • Replace existing taxonomy items
      This JSON allows you to replace already existing taxonomy items on the post. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      {
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog",
          "male",
          "simple"
        ]
      }
      The key on the first layer of the JSON is the slug of the taxonomy. As a value, it accepts multiple slugs of the single taxonomy terms. To add multiple taxonomies, simply append them on the first layer of the JSON.
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all as a separate value with the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. Here is an example:
      {
        "wpwhtype": "ironikus-remove-all",
        "category": [],
        "post_tag": []
      }
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append to the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. All the taxonomies you add after, will be added to the existing ones on the post.
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog"
        ]
      }
      In the example above, we append the taxonomies category and post_tag with multiple taxonomy items on the post. The already assigned ones won't be replaced.
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. To do that, simply append -ironikus-delete at the end of the taxonomy term slug. This specific taxonomy term will then be removed from the post. Here is an example:
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category-ironikus-delete"
        ],
        "post_tag": [
          "dog-ironikus-delete"
        ]
      }
      In the example above, we append the taxonomies category and post_tag. We also add the taxonomy item test-category. We also remove the taxonomy items second-category and dog.

meta_input
This argument is specifically designed to add/update or remove post meta to your created post.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the post meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the post meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single post meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the meta_input argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three post meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the meta_input argument, needs to be escaped.

wp_error
In case you set the wp_error argument to yes, we will return the WP Error object within the response if the webhook action call. It is recommended to only use this for debugging.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the create_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post_data, $post_id, $meta_input, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post_data (array)
    Contains the data that is used to create the post and some additional data as the meta input.
  2. $post_id (integer)
    Contains the post id of the newly created post. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $meta_input (string)
    Contains the unformatted post meta as you sent it over within the webhook request as a string.
  4. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Update a post. You have all functionalities available from wp_update_post
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to update_post
  • post_idRequired
    (int) The post id itself. This field is mandatory
  • post_author
    (mixed) The ID or the email of the user who added the post. Default is the current user ID.
  • post_date
    (string) The date of the post. Default is the current time.
  • post_date_gmt
    (string) The date of the post in the GMT timezone. Default is the value of $post_date.
  • post_content
    (string) The post content. Default empty.
  • post_content_filtered
    (string) The filtered post content. Default empty.
  • post_title
    (string) The post title. Default empty.
  • post_excerpt
    (string) The post excerpt. Default empty.
  • post_status
    (string) The post status. Default 'draft'.
  • post_type
    (string) The post type. Default 'post'.
  • comment_status
    (string) Whether the post can accept comments. Accepts 'open' or 'closed'. Default is the value of 'default_comment_status' option.
  • ping_status
    (string) Whether the post can accept pings. Accepts 'open' or 'closed'. Default is the value of 'default_ping_status' option.
  • post_password
    (string) The password to access the post. Default empty.
  • post_name
    (string) The post name. Default is the sanitized post title when creating a new post.
  • to_ping
    (string) Space or carriage return-separated list of URLs to ping. Default empty.
  • pinged
    (string) Space or carriage return-separated list of URLs that have been pinged. Default empty.
  • post_modified
    (string) The date when the post was last modified. Default is the current time.
  • post_modified_gmt
    (string) The date when the post was last modified in the GMT timezone. Default is the current time.
  • post_parent
    (int) Set this for the post it belongs to, if any. Default 0.
  • menu_order
    (int) The order the post should be displayed in. Default 0.
  • post_mime_type
    (string) The mime type of the post. Default empty.
  • guid
    (string) Global Unique ID for referencing the post. Default empty.
  • post_category
    (string) A comma separated list of category IDs. Defaults to value of the 'default_category' option. Example: cat_1,cat_2,cat_3. Please note that WordPress just accepts categories of the type "category" here.
  • tags_input
    (string) A comma separated list of tag names, slugs, or IDs. Default empty. Please note that WordPress just accepts tags of the type "post_tag" here.
  • tax_input
    (string) A simple or JSON formatted string containing existing taxonomy terms. Default empty. More details within the description.
  • meta_input
    (string) A json or comma and semicolon separated list of post meta values keyed by their post meta key. Default empty. More info in the description.
  • wp_error
    Whether to return a WP_Error on failure. Posible values: "yes" or "no". Default value: "no".
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • create_if_none
    Wether you want to create the post if it does not exists or not. Set it to "yes" or "no" Default is "no".
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the post id with the key "post_id" and the post data with the key "post_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success'   => false,
    'msg'       => '',
    'data'      => array(
        'post_id' => null,
        'post_data' => null
    )
);
        

This webhook action is used to update a post on your WordPress system via a webhook call.
The description is uniquely made for the update_post webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use update_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to create_post.
  2. Another argument you need to define is the post_id. It contains the ID of the post within your WordPress site.
  3. All the other arguments are optional and just extend the updating process of the post.


Tipps

  1. To update a post, you only need to set the values you want to update. The undefined settings won't be overwritten.
  2. In case you want to create the post if it does not exists at that point, you can set the create_if_none argument to yes


Special Arguments


post_author
The post author argument accepts either the user id of a user, or the email address of an existing user. In case you choose the email adress, we try to match it with the users on your WordPress site. In case we couldn't find a user for the given email, we leave the field empty.

post_content
The post content is the main content area of the post. It can contain HTML or any other kind of content necessary for your functionality.

post_status
The post status defines further details about how your post will be treated. By default, WordPress offers the following post statuses: draft, pending, private, publish. Please note that other plugins can extend the post status values to offer a bigger variety, e.g. Woocommerce.

post_type
The post type determines to which group of posts your currently updated post belongs. Please use the slug of the post type.

tags_input
This argument supports the default tags_input variable of the wp_update_post() function. Please use this function only if you are known to its functionality since WordPress might not add the values properly due to permissions. If you are not sure, please use the tax_input argument instead.

Here is an example:
342,5678,2
This argument supports a comma separated list of tag names, slugs, or IDs.

tax_input
This argument allows you to add/append/delete any kind of taxonomies on your post. It uses a custom functionality that adds the taxonomies independently of the wp_update_post() function.
To make it work, we offer certain different features and methods to make the most out of the taxonomy management. Down below, you will find further information about the whole functionality.
  1. String method
    This method allows you to add/update/delete or bulk manage the post taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too. In case you use more complex taxonomies that use semicolons or double points within the slugs, you need to use the JSON method.
    • Replace existing taxonomy items
      This method allows you to replace already existing taxonomy items on the post. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      taxonomy_1,tax_item_1:tax_item_2:tax_item_3;taxonomy_2,tax_item_5:tax_item_7:tax_item_8
      To separate the taxonomies from the single taxonomy items, please use a comma ",". In case you want to add multiple items per taxonomy, you can separate them via a double point ":". To separate multiple taxonomies from each other, please separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all; in front of a semicolon-separated list of the taxonomies you want to remove all items for. Here is an example:
      ironikus-remove-all;taxonomy_1;taxonomy_2
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. Here is an example:
      ironikus-append;taxonomy_1,value_1:value_2-ironikus-delete:value_3;taxonomy_2,value_5:value_6:value_7-ironikus-delete
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2. We also add the taxonomy items value_1, value_3, value_5 and value_6. We also remove the taxonomy items value_2 and value_7.
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append; at the beginning of the string.
      ironikus-append;taxonomy_1,value_1:value_2:value_3;taxonomy_2,value_1:value_2:value_3
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2 with multiple taxonomy items on the post. The already assigned ones won't be replaced.
  2. JSON method
    This method allows you to add/update/delete or bulk manage the post taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too.
    • Replace existing taxonomy items
      This JSON allows you to replace already existing taxonomy items on the post. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      {
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog",
          "male",
          "simple"
        ]
      }
      The key on the first layer of the JSON is the slug of the taxonomy. As a value, it accepts multiple slugs of the single taxonomy terms. To add multiple taxonomies, simply append them on the first layer of the JSON.
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all as a separate value with the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. Here is an example:
      {
        "wpwhtype": "ironikus-remove-all",
        "category": [],
        "post_tag": []
      }
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append to the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. All the taxonomies you add after, will be added to the existing ones on the post.
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog"
        ]
      }
      In the example above, we append the taxonomies category and post_tag with multiple taxonomy items on the post. The already assigned ones won't be replaced.
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. To do that, simply append -ironikus-delete at the end of the taxonomy term slug. This specific taxonomy term will then be removed from the post. Here is an example:
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category-ironikus-delete"
        ],
        "post_tag": [
          "dog-ironikus-delete"
        ]
      }
      In the example above, we append the taxonomies category and post_tag. We also add the taxonomy item test-category. We also remove the taxonomy items second-category and dog.

meta_input
This argument is specifically designed to add/update or remove post meta to your updated post.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the post meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the post meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single post meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the meta_input argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three post meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the meta_input argument, needs to be escaped.

wp_error
In case you set the wp_error argument to yes, we will return the WP Error object within the response if the webhook action call. It is recommended to only use this for debugging.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the update_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post_data, $post_id, $meta_input, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post_data (array)
    Contains the data that is used to update the post and some additional data as the meta input.
  2. $post_id (integer)
    Contains the post id of the newly updated post. Please note that it can also contain a wp_error object since it is the response of the wp_update_user() function.
  3. $meta_input (string)
    Contains the unformatted post meta as you sent it over within the webhook request as a string.
  4. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.

create_if_none
In case you set the create_if_none argument to yes, a post will be created with the given details in case it does not exist.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete a post via WP Webhooks Pro.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_post
  • post_idRequired
    The post id of your specified post. This field is required.
  • force_delete
    (optional) Whether to bypass trash and force deletion (added in WordPress 2.9). Possible values: "yes" and "no". Default: "no". Please note that soft deletion just works for the "post" and "page" post type.
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) Post related data as an array. We return the post id with the key "post_id" and the force delete boolean with the key "force_delete". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'post_id' => 0,
        'force_delete' => false
    )
);
        

This webhook action is used to delete a post on your WordPress system via a webhook call.
This description is uniquely made for the delete_post webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use delete_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to delete_post.
  2. It is also required to set the post id of the post you want to delete. You can do that by using the post_id argument.
  3. All the other arguments are optional and just extend the deletion of the post.
  4. Please note that deleting a post without defining the force_delete argument, only moves default posts and pages to the trash (wherever applicable) - otherwise they will be directly deleted.


Special Arguments


force_delete
In case you set the force_delete argument to yes, the post will be completely removed from your WordPress website.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the delete_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post, $post_id, $check, $force_delete ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post (object)
    Contains the WordPress post object of the already deleted post.
  2. $post_id (integer)
    Contains the post id of the deleted post.
  3. $check (mixed)
    Contains the response of the wp_delete_post() function.
  4. $force_delete (string)
    Returns either yes or no, depending on your settings for the force_delete argument.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Search for posts on your WordPress website
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_posts
  • argumentsRequired
    A string containing a JSON construct in the WP_Query notation. Please check the description for more information.
  • return_only
    Define the data you want to return. Please check the description for more information. Default: posts
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the post query. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch one or multiple posts from your WordPress system via a webhook call.
This description is uniquely made for the get_posts webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_posts

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_posts.
  2. It is also required to set the argument arguments, which contains a JSON formatted string with the parameters used to identify the posts. More details about that is available within the Special Arguments list.
  3. All the other arguments are optional and just extend the fetching of the posts.


Special Arguments


arguments
This argument contains a JSON formatted string, which includes certain arguments from the WordPress post query called WP_Query. For further details, please check out the following link:
https://developer.wordpress.org/reference/classes/wp_query/
Here is an example on how the JSON is set up:
{"post_type":"post","posts_per_page":8}
The example above will filter the posts for the post type "post" and returns maximum eight posts.

return_only
You can also manipulate the output of the query using the return_only parameter. This allows you to output only certain elements or the whole WP_Query class. Here is an example:
posts,post_count,found_posts,max_num_pages
Here's a list of all available values for the return_only argument. In case you want to use multiple ones, simply separate them with a comma.
  1. all
  2. posts
  3. post
  4. post_count
  5. found_posts
  6. max_num_pages
  7. current_post
  8. query_vars
  9. query
  10. tax_query
  11. meta_query
  12. date_query
  13. request
  14. in_the_loop
  15. current_post

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_posts action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $post_query, $args, $return_only ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $post_query (object)
    The full WP_Query object.
  3. $args (string)
    The string formatted JSON construct that was sent by the caller within the arguments argument.
  4. $return_only (string)
    The string that was sent by the caller via the return_only argument.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Returns the object of a user
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_post
  • post_idRequired
    The post id of the post you want to fetch.
  • return_only
    Select the values you want to return. Default is all. Please see the description for more details.
  • thumbnail_size
    Pass the size of the thumbnail of your given post id. Default is full. Please see the description for more details.
  • post_taxonomies
    Single value or comma separated list of the taxonomies you want to return. Default: post_tag. Please see the description for more details.
  • do_action
    Advanced: Register a custom action after WP Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the single post. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch a single post from your WordPress system via a webhook call. It uses the default WordPress function get_post():
https://developer.wordpress.org/reference/functions/get_post/

This description is uniquely made for the get_post webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_post.
  2. It is also required to set the argument post_id, which contains the id of the post you want to fetch.
  3. All the other arguments are optional and just extend the fetching of the post.


Special Arguments


return_only
You can also manipulate the result of the post data gathering using the return_only parameter. This allows you to output only certain elements of the request. Here is an example:
post,post_thumbnail,post_terms,post_meta
Here's a list of all available values for the return_only argument. In case you want to use multiple ones, simply separate them with a comma.
  1. all
  2. post
  3. post_thumbnail
  4. post_terms
  5. post_meta

thumbnail_size
This argument allows you to return one or multiple thumbnail_sizes for the given post thumbnail. By default, we output only the full image. Here is an example:
full,medium
Here's a list of all available sizes for the thumbnail_size argument (The availalbe sizes may vary since you can also use third-party size definitions). In case you want to use multiple ones, simply separate them with a comma.
  1. thumbnail (150px square)
  2. medium (maximum 300px width and height)
  3. large (maximum 1024px width and height)
  4. full (full/original image size you uploaded)

post_taxonomies
You can also customize the output of the returned taxonomies using the post_taxonomies argument. Default is post_tag. This argument accepts a string of a single taxonomy slug or a comma separated list of multiple taxonomy slugs. Please see the example down below:
post_tag,custom_taxonomy_1,custom_taxonomy_2

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $post_id, $thumbnail_size, $post_taxonomies ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $post_id (integer)
    The id of the currently fetched post.
  3. $thumbnail_size (string)
    The string formatted thumbnail sizes sent by the caller within the thumbnail_size argument.
  4. $post_taxonomies (string)
    The string formatted taxonomy slugs sent by the caller within the post_taxonomies argument.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Do whatever you like with the incoming data by defining this custom action.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to custom_action
  • wpwh_identifier
    This value is send over within the WordPress hooks to identify the incoming action. You can use it to fire your customizatios only on specific webhooks. For more information, please check the description.
  • custom
    This webhook returns whatever you define withiin the filters. Please check the description for more detials.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

//This is how the default response looks like
$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook action is used to fire a custom wordpress filter within your WordPress system via a webhook call. You can use it to fully cusotmize the webhook logic for your needs.
This description is uniquely made for the custom_action webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use custom_action

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to custom_action.
  2. All the other arguments are optional and just extend the custom execution of the action.
To modify your incoming data based on your needs, you simply create a custom add_filter() call within your theme or plugin. Down below is an example on how you can do that:
add_filter( 'wpwhpro/run/actions/custom_action/return_args', 'wpwh_fire_my_custom_logic', 10, 3 );
function wpwh_fire_my_custom_logic( $return_args, $identifier, $response_body ){

	//If the identifier doesn't match, do nothing
	if( $identifier !== 'ilovewebhooks' ){
		return $return_args;
	}

	//This is how you can validate the incoming value. This field will return the value for the key user_email
	$email = WPWHPRO()->helpers->validate_request_value( $response_body['content'], 'user_email' );

	//Include your own logic here....

	//This is what the webhook returns back to the caller of this action (response)
	//By default, we return an array with success => true and msg -> Some Text
	return $return_args;

}
The custom add_filter() callback accepts three parameters, which are explained down below:
  1. $return_args (array)
    This is what the webhook call returns as a response. You can modify it to return your own custom data.
  2. $identifier (string)
    This is the wpwh_identifier you may have set up within the webhook call. (We also allow to set this specific argument within the URL as &wpwh_identifier=my_identifier). Further information about this argument is available within the Special Arguments list.
  3. $response_body (array)
    This returns the validated payload of the incoming webhook call. You can use WPWHPRO()->helpers->validate_request_value() to validate single entries (See example)

Tipp

Since this webhook action requires you to still set the action as mentioned above (to let our plugin know you want to fire a custom_action), you can also set the action parameter within the webhook URL you define within your external endpoint (instead of within the body). E.g.: &action=custom_action - This way you can avoid modifying the webhook request payload in the first place.

Special Arguments


wpwh_identifier
Set this argument to identify your webhook call within the add_filter() function. It can be used to diversify between multiple calls that use this custom action. You can set it to e.g. validate-user and then check within the add_filter() callback against it to only fire it for this specific webhook call. You can also define this argument within the URL as a parameter, e.g. &wpwh_identifier=my-custom-identifier. In case you have defined the wpwh_identifier within the payload and the URL, we prioritize the parameter set within the payload.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Test a webhooks functionality. (Advanced)
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to ironikus_test
  • test_varRequired
    A test var. Include the following value to get a success message back: test-value123
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • test_var
    (string) The variable that was set for the request.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'test_var' => 'test-value123'
);
        

This webhook action is only used for testing purposes to test if WP Webhooks works properly on your WordPress website.
This description is uniquely made for the ironikus_test webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use ironikus_test

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to ironikus_test.
  2. The second argument you need to set is test_var. Please set it to test-value123

Tipp

This webhook makes sense if you want to test if WP Webhooks works properly on your WordPress website. You can try to setup different values to see how the webhook interacts with your site.
You can also use it to test the functionality using our Ironikus assistant:https://ironikus.com/assistant/

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Creates a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_comment
  • comment_agent
    (string) The HTTP user agent of the comment_author when the comment was submitted. Default empty.
  • comment_approved
    (int|string) Whether the comment has been approved. Default 1.
  • comment_author
    (string) The name of the author of the comment. Default empty.
  • comment_author_email
    (string) The email address of the $comment_author. Default empty.
  • comment_author_IP
    (string) The IP address of the $comment_author. Default empty.
  • comment_author_url
    (string) The URL address of the $comment_author. Default empty.
  • comment_content
    (string) The content of the comment. Default empty.
  • comment_date
    (string) The date the comment was submitted. To set the date manually, comment_date_gmt must also be specified. Default is the current time.
  • comment_date_gmt
    (string) The date the comment was submitted in the GMT timezone. Default is comment_date in the site's GMT timezone.
  • comment_karma
    (int) The karma of the comment. Default 0.
  • comment_parent
    (int) ID of this comment's parent, if any. Default 0.
  • comment_post_ID
    (int) ID of the post that relates to the comment, if any. Default 0.
  • comment_type
    (string) Comment type. Default empty.
  • comment_meta
    (array) Optional. Array of key/value pairs to be stored in commentmeta for the new comment. More info within the description.
  • user_id
    (int) ID of the user who submitted the comment. Default 0.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The data related to the comment, as well as the user and the post object, incl. the meta values.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0,
		'comment_data'  => array(),
		'comment_meta'  => array(),
		'current_post_id' => 0,
		'current_post_data' => array(),
		'current_post_data_meta' => array(),
		'user_id' => 0,
		'user_data' => array(),
		'user_data_meta' => array()
	),
);
        

This hook enables you to create a comment with all of its settings.

You can also add custom post meta. Here is an example on how this would look like using the simple structure (We also support json):



meta_key_1,meta_value_1;my_second_key,add_my_value


To separate the meta from the value, you can use a comma ",". To separate multiple meta settings from each other, easily separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)

This is an example on how you can include the post meta using JSON.
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!"
}
				

For security reasons, we don't send the password within the webhook response. To send the password as well, you can check out the following filter: wpwhpro/webhooks/action_create_comment_restrict_user_values

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Updates a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to update_comment
  • comment_IDRequired
    (string) The HTTP user agent of the comment_author when the comment was submitted. Default empty.
  • comment_agent
    (string) The HTTP user agent of the comment_author when the comment was submitted. Default empty.
  • comment_approved
    (int|string) Whether the comment has been approved. Default 1.
  • comment_author
    (string) The name of the author of the comment. Default empty.
  • comment_author_email
    (string) The email address of the $comment_author. Default empty.
  • comment_author_IP
    (string) The IP address of the $comment_author. Default empty.
  • comment_author_url
    (string) The URL address of the $comment_author. Default empty.
  • comment_content
    (string) The content of the comment. Default empty.
  • comment_date
    (string) The date the comment was submitted. To set the date manually, comment_date_gmt must also be specified. Default is the current time.
  • comment_date_gmt
    (string) The date the comment was submitted in the GMT timezone. Default is comment_date in the site's GMT timezone.
  • comment_karma
    (int) The karma of the comment. Default 0.
  • comment_parent
    (int) ID of this comment's parent, if any. Default 0.
  • comment_post_ID
    (int) ID of the post that relates to the comment, if any. Default 0.
  • comment_type
    (string) Comment type. Default empty.
  • comment_meta
    (array) Optional. Array of key/value pairs to be stored in commentmeta for the new comment. More info within the description.
  • user_id
    (int) ID of the user who submitted the comment. Default 0.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The data related to the comment, as well as the user and the post object, incl. the meta values.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0,
		'comment_data'  => array(),
		'comment_meta'  => array(),
		'current_post_id' => 0,
		'current_post_data' => array(),
		'current_post_data_meta' => array(),
		'user_id' => 0,
		'user_data' => array(),
		'user_data_meta' => array()
	),
);
        

This hook enables you to update a comment with all of its settings.

You can also add custom post meta. Here is an example on how this would look like using the simple structure (We also support json):



meta_key_1,meta_value_1;my_second_key,add_my_value


To separate the meta from the value, you can use a comma ",". To separate multiple meta settings from each other, easily separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)

This is an example on how you can include the post meta using JSON. (If you set the meta value to "ironikus-delete", it will remove the existing value.)
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "another_meta_key_1": "ironikus-delete"
}
				

For security reasons, we don't send the password within the webhook response. To send the password as well, you can check out the following filter: wpwhpro/webhooks/action_update_comment_restrict_user_values

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Trash a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to trash_comment
  • comment_idRequired
    (int) The comment id of the comment you want to trash.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The comment id as comment_id.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0
	),
);
        

This hook enables you to trash a comment with all of its settings.

We only support the comment id. Json objects are not allowed.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_comment
  • comment_idRequired
    (int) The comment id of the comment you want to delete.
  • force_delete
    (string) Wether you want to bypass the trash or not. You can set this value to "yes" or "no". Default "no"
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The comment id as comment_id and the force_delete status.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0,
		'force_delete'   => 'no'
	),
);
        

This hook enables you to delete a comment with all of its settings.

Please note, that this function, by default, pushes the comment to the trash. In case you want to fully delete it, set force_delete to "yes".

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Connect certain taxonomy terms to a post.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to set_terms
  • object_idRequired
    The object to relate to. (Post ID)
  • terms
    The terms you want to set. Please see the description for more information.
  • taxonomyRequired
    The context in which to relate the term to the object. (Taxonomy slug)
  • append
    Please set this value to "yes" in case you want to append the taxonomies. If set to false, all previous entries to the defined taxonomies will be deleted. Default "no"
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The taxonomy term ids on success or wp_error on failure.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => '',
);
        

This webhook enables you to apply certain taxonomy terms to a post. You can connect multiple terms to a single taxonomy within one call.

To append taxonomy terms, simple separate them with a comma. You can either use a single term slug, single term id, or array of either term slugs or ids. Passing an empty value will remove all related terms.

term-1,term-2,term-3

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Create a code trigger on your website using webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_code_trigger
  • slugRequired
    The slug you want to identify your code trigger with. (It will be title-sanitized later on)
  • codeRequired
    The code you want to run within your code trigger. Important: Please make sure you know wht you do.
  • active
    Wether to set the code trigger as an active one or not. Inactive means that it is registered on the site, but not in use. Possible values: "yes" and "no". Default: "no"
  • overwrite
    Wether to overwrite an already existing code trigger or not. Possible values: "yes" and "no". Default: "no". Please read the description for more information.
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The slug of the newly created code trigger on success.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'slug' => null
    )
);
        

This webhook enables you to create a code trigger using webhooks. You can set up any kind of php code you want.

To provide you with a better security, we set all newly created webhooks that do not specificly set the "active" key to "yes" on inactive.

By default overwriting existing code triggers is disabled. To make it work, you need to set the overwrite value to "yes".

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete a code trigger on your website using webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_code_trigger
  • slugRequired
    The slug of the code trigger you want to delete. (It will be title-sanitized later on)
  • safe_delete
    If safe_delete is set to "no", we don't check if your site throws any error before officialy deleting the code trigger. Default: "yes"
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The slug of the newly created code trigger on success or the response code on issue with safe delete.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'slug' => null,
        'response_code' => 0
    )
);
        

This webhook enables you to delete a code trigger using webhooks by the code trigger-slug.

In case you set safe_delete to "no", it is possible that your site breaks. If it is set to "yes", we check the site against any html response code that is not within 2xx.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Change the status of a trigger on your website using webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to code_trigger_status
  • slugRequired
    The slug of the code trigger you want to change the status of. (It will be title-sanitized later on)
  • statusRequired
    The status you want to set for the code trigger. Possible values: "yes" or "no"
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The slug of the newly created code trigger on success or the response code on issue with safe delete.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'slug' => '',
        'response_code' => 0
    )
);
        

This webhook enables you to change the status of a webhook. You can enable and disable a code trigger by setting it to "active" or "inactive".

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Execute PHP code on your website using webhooks. Please read our documentation for more information.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to execute_php_code
  • php_codeRequired
    The PHP code you want to execute.
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) PHP related data. We return the last php error.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => null
);
        

This webhook enables you to execute php code via eval() directly on your web server. IMPORTANT: If used incorrectly, this functionality could cause damage to your website.

Down below you will find an example code.

update_option( 'my_demo_option', 'my_new_value' );
                

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Create an attachment from an url on your website using webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_url_attachment
  • urlRequired
    The url of the file you want to create the attachment of.
  • arguments
    (JSON) Custom arguments to customize your upload process. Default: See description.
  • file_name
    Customize the file name of the attachment. E.g. demo-file.txt
  • parent_post_id
    The parent post id inn case you want to set a parent for it. Default: 0
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The attachment id on success, wp_error on inserting error, upload error on wrong upload or status code error.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'attach_id' => null,
        'post_info' => null,
        'upload_info' => null,
        'response' => null
    )
);
        

This webhook enables you to create an attachment from an url. You can also set the parent id for the attachment.

Down below you will see a list with all the default arguments that can be used to customize the upload process. To make it work, you need so setup a json with the arguments you want.

$defaults = array(
    'method' => 'GET',
    'timeout' => apply_filters( 'http_request_timeout', 5 ),
    'redirection' => apply_filters( 'http_request_redirection_count', 5 ),
    'httpversion' => apply_filters( 'http_request_version', '1.0' ),
    'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ),
    'reject_unsafe_urls' => apply_filters( 'http_request_reject_unsafe_urls', false ),
    'blocking' => true,
    'headers' => array(),
    'cookies' => array(),
    'body' => null,
    'compress' => false,
    'decompress' => true,
    'sslverify' => true,
    'sslcertificates' => ABSPATH . WPINC . '/certificates/ca-bundle.crt',
    'stream' => false,
    'filename' => null,
    'limit_response_size' => null,
);
                

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Create an attachment from a local and relative path on your website using webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_path_attachment
  • pathRequired
    The relative path of the file you want to create the attachment of (See the description for more information).
  • parent_post_id
    The parent post id inn case you want to set a parent for it. Default: 0
  • file_name
    Customize the file name of the attachment. E.g. demo-file.txt
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The attachment id on success, wp_error on inserting error, upload error on wrong upload or status code error.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'path' => null,
        'attach_id' => null,
        'post_info' => null,
    )
);
        

This webhook enables you to create an attachment from an path. You can also set the parent id for the attachment.


For security reasons, we restrict the creation of attachments via the path to the WordPress root folder and its sub folders. This means, that you have to define the path in a relative way. Here is an example:


wp-content/uploads/demo-uploads/image.png

In case you want to delete a file within the WordPress root folder, just declare the file:


image.png

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete an attachment from your website using webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_attachment
  • attachment_idRequired
    The id of the attachment you want to delete.
  • force_delete
    Whether to bypass trash and force deletion. Default: noPlease read the description for more information.
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (mixed) The attachment data (post data) on success, false or null on error.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'data' => null,
    )
);
        

This webhook enables you to delete an attachment from your WordPress website.

Please note: The attachment is moved to the trash instead of permanently deleted unless trash for media is disabled, item is already in the trash, or force_delete is true.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Create WordPress Blog Post by sending an email. Please read our documentation for more information.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to post_by_email
  • contentRequired
    The content of the email with all of its settings
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) Post related data as an array. We return the error with the key "error" and the post_data with the key "post_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'error' => null,
        'post_data' => null
    )
);
        

This webhook enables you to create a WordPress post by sending an email.

We offer you various shortcodes to assign content tp certain WordPress fields. They are listed down below.

@settings-start@post_status:publish;post_author:5;comment_status:no@settings-end@

This is the settings shortcode. It starts with "@settings-start@" and ends with "@settings-end@". In between you can declare the mentioned values, separated with a semicolon for each setting and separated by key and value with a ":".

@title-start@My First Post By Email@title-end@

Set the title with the "@title-start@" opener and the "@title-end@" closing tag. In between you can paste the title like you want to show it inside of the post

@excerpt-start@This is my first remote post description for a post via email@excerpt-end@

Set the excerpt (short description) with the "@excerpt-start@" opener and the "@excerpt-end@" closing tag. In between you can paste the excerpt like you want to show it inside of the post

@content-start@This is the main content!@content-end@

Place your main content in here. You can use html or plain text. Create the post like you want to see it on your website. (Shortcodes are also allowed)

@category-start@3,4,12@category-end@

You can also add single categories by adding their IDs (comma separated without spaces) in between the shortcodes.

@tag-start@demo-me,third-test@tag-end@

You can also add single categories by adding their IDs or their slugs (comma separated without spaces) in between the shortcodes.

Down below we included a template that you can copy for your emails.


##############

@settings-start@post_status:publish;post_author:5;comment_status:no@settings-end@

This is text that get's ignored by our logic since it is not wrapped in any text.
You can make notes here and send them to your email, mark them or do whatever you desire with it!

@title-start@First Post By Email@title-end@

@excerpt-start@This is my first remote post description for a post via email@excerpt-end@

@content-start@
This is the main Content.

To test it, we include here also a hyperlink! :)

Our Website: https://ironikus.com

This is awesome!
@content-end@

@category-start@3,4,12@category-end@

@tag-start@demo-me,third-test@tag-end@

##############
                

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Create a file via a webhook inside of your WordPress folder structure.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_file
  • fileRequired
    The path as well as the file name and extension. For example: wp-content/themes/demo-theme/index.php (See the main description for more information)
  • content
    The content for your file.
  • mode
    The mode of the file. Default "w" (Write)
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook enables you to create a file inside of your WordPress folder structure.

For security reasons, we restrict the creation of files to the WordPress root folder and its sub folders. This means, that you have to define the path in a relative way. Here is an example:

Please note: The folder structure must exist before you can create the file. Otherwise this webhook will return an error.


wp-content/themes/demo-theme/index.php

In case you want to create a file within the WordPress root folder, just declare the file:


demo.php

With the do_action parameter, you can fire a custom action at the end of the process. Just add your custom action via wordpress hook. We pass the following parameters with the action: $return_args, $file, $content, $mode

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete a file via a webhook inside of your WordPress folder structure.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_file
  • fileRequired
    The path as well as the file name and extension. For example: wp-content/themes/demo-theme/index.php (See the main description for more information)
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook enables you to delete a local file inside of your WordPress folder structure.

For security reasons, we restrict the deletion of files to the WordPress root folder and its sub folders. This means, that you have to define the path in a relative way. Here is an example:


wp-content/themes/demo-theme/index.php

In case you want to delete a file within the WordPress root folder, just declare the file:


demo.php

With the do_action parameter, you can fire a custom action at the end of the process. Just add your custom action via wordpress hook. We pass the following parameters with the action: $return_args, $file

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Create a folder via a webhook inside of your WordPress folder structure.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_folder
  • folderRequired
    The relative path as well as the folder name. For example: wp-content/themes/demo-theme/demo-folder (See the main description for more information)
  • mode
    The mode is 0777 by default, which means the widest possible access.
  • recursive
    Allows the creation of nested directories specified in the pathname. Possible values: "yes" and "no". Default: "no" (See the main description for more information)
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook enables you to create a local folder inside of your WordPress folder structure.

For security reasons, we restrict the creation of folders to the WordPress root folder and its sub folders. This means, that you have to define the path in a relative way. Here is an example:


wp-content/themes/demo-theme/demo-folder

In case you want to create a folder within the WordPress root folder, just declare the folder itself:


demo-folder


If you set recursive to "yes", all in your path mentioned folders will be created if they don't exist.



With the do_action parameter, you can fire a custom action at the end of the process. Just add your custom action via wordpress hook. We pass the following parameters with the action: $return_args, $folder

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Delete a folder and all of its sub folders and files via a webhook inside of your WordPress folder structure.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_folder
  • folderRequired
    The relative path as well as the folder name. For example: wp-content/themes/demo-theme/demo-folder (See the main description for more information)
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook enables you to delete a local folder and all of its sub folders and files inside of your WordPress folder structure.

For security reasons, we restrict the deletion of folders to the WordPress root folder and its sub folders. This means, that you have to define the path in a relative way. Here is an example:


wp-content/themes/demo-theme/demo-folder

In case you want to delete a folder within the WordPress root folder, just declare the folder itself:


demo-folder


With the do_action parameter, you can fire a custom action at the end of the process. Just add your custom action via wordpress hook. We pass the following parameters with the action: $return_args, $folder

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Rename a local file or folder via a webhook inside of your WordPress folder structure.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to rename_file_folder
  • source_pathRequired
    The relative path of the folder you want to rename (and the file name and extension if you want to rename a file). For example: wp-content/themes/demo-theme/demo-folder or for a file wp-content/themes/demo-theme/demo-file.php
  • destination_pathRequired
    The relative path with the new folder name (or the new file name and extension if you want to rename a file). For example: wp-content/themes/demo-theme/new-demo-folder or for a file wp-content/themes/demo-theme/new-demo-file.php
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook allows you to rename a folder or a file inside of your WordPress folder structure.

For security reasons, we restrict renaming of files to the WordPress root folder and its sub folders. This means, that you have to define the destination_path in a relative way. Here is an example:


wp-content/uploads/demo-file.php

In case you want to rename a file or a folder inside the WordPress root folder, just declare the file/folder itself:


demo-file.php


It is also possible to change the extension of a file. just change it for the destination path.


With the do_action parameter, you can fire a custom action at the end of the process. Just add your custom action via wordpress hook. We pass the following parameters with the action: $return_args, $source_path, $destination_path

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.

Copy a local or remote file via a webhook inside of your WordPress folder structure.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to copy_file
  • source_pathRequired
    The relative path of the file you want to copy. This can be a relative path or an external url. For example: wp-content/themes/demo-theme/demo-file.php or a full url like https://my-domain/image.jpg
  • destination_pathRequired
    The relative path as well as file name. For example: wp-content/uploads/demo-image.jpg (See the main description for more information)
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook enables you to copy a local or remote file inside of your WordPress folder structure. (The previous file will not be removed)

For security reasons, we restrict copying of files to the WordPress root folder and its sub folders. This means, that you have to define the destination_path in a relative way. Here is an example:

Please note: If destination_path is a URL, the copy operation may fail if the wrapper does not support overwriting of existing files. If the destination file already exists, it will be overwritten.


wp-content/uploads/demo-image.jpg

In case you want to copy a file into the WordPress root folder, just declare the file itself:


demo-image.jpg


It is also possible to rename the file while you copy it. Just set a custom file name for the destination_path:


wp-content/uploads/another-demo-image.jpg


With the do_action parameter, you can fire a custom action at the end of the process. Just add your custom action via wordpress hook. We pass the following parameters with the action: $return_args, $source_path, $destination_path

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.

Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.