Title: lore21's Replies | WordPress.org

---

# lore21

  [  ](https://wordpress.org/support/users/lore21/)

 *   [Profile](https://wordpress.org/support/users/lore21/)
 *   [Topics Started](https://wordpress.org/support/users/lore21/topics/)
 *   [Replies Created](https://wordpress.org/support/users/lore21/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/lore21/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/lore21/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/lore21/engagements/)
 *   [Favorites](https://wordpress.org/support/users/lore21/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [API to send posts](https://wordpress.org/support/topic/api-to-send-posts/)
 *  Thread Starter [lore21](https://wordpress.org/support/users/lore21/)
 * (@lore21)
 * [3 years ago](https://wordpress.org/support/topic/api-to-send-posts/#post-16770567)
 * Hi [@ashfame](https://wordpress.org/support/users/ashfame/) thanks for reply.
 * I don’t know how to create a plugin, but I think I can put the code in a child
   functions.php file, right?
 *     ```wp-block-code
       add_action('wp_insert_post', 'send_to_external_service', 10, 3); 
       function send_to_external_service($post_id, $post, $update) 
       {
   
       {
       // swagger API code
       "identifier": "ipsum",
   
       "destinationName": "laborum esse dolor ut quis",
   
       "description": "exercitation et amet",
   
       "language": "it",
   
       "longitude": "in ",
   
       "latitude": "cupidatat ex fugiat dolore",
   
       "image": [
   
       {
   
       "imageLicense": "consequat qui cupidatat",
       etc etc etc...
       }
       ```
   
 * is it correct?
 * Thanks in advice

Viewing 1 replies (of 1 total)