Title: Using API cURL not working
Last modified: September 4, 2023

---

# Using API cURL not working

 *  Resolved [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/)
 *     ```wp-block-code
       {
         "code": "rest_no_route",
         "message": "No route was found matching the URL and request method.",
         "data": {
           "status": 404
         }
       }
       ```
   
 * I’m getting the above error when attempting to add a subscriber via the API, 
   and also getting it when testing on [Newsletters’ own test page](https://www.thenewsletterplugin.com/documentation/api-reference/).
 * Since it’s happening on the plugin’s test page, perhaps something has changed
   that is not shown in the documentation. How can this be fixed? Thank you.

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

 *  Plugin Author [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/#post-17023033)
 * Hi, the API addon has been installed? And which url are you using as endpoint?
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/#post-17025525)
 * Yes, API addon installed, and set the keys for v2.
 * The endpoint is the website root and:
   /wp-json/newsletter/v2/subscribers/add?
   client_key=xxx&client_secret=xxx
 * ….with the correct keys added.
    -  This reply was modified 2 years, 9 months ago by [jamminjames](https://wordpress.org/support/users/jamminjames/).
    -  This reply was modified 2 years, 9 months ago by [jamminjames](https://wordpress.org/support/users/jamminjames/).
 *  Plugin Author [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/#post-17026071)
 * Hi, there is not an “add” endpoint this is why you get the not found answer. 
   You should use the /subscribers endpoint, with POST or PUT.
 * [https://www.thenewsletterplugin.com/documentation/api-reference/](https://www.thenewsletterplugin.com/documentation/api-reference/)
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/#post-17026421)
 * Okay, is this different from v1? I have another site still using that, and it
   has used the /add in the url with no problem.
 *  Plugin Author [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/#post-17094575)
 * Yes, v2 is completely different.

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

The topic ‘Using API cURL not working’ is closed to new replies.

 * ![](https://ps.w.org/newsletter/assets/icon-256x256.png?rev=1052028)
 * [Newsletter - Send awesome emails from WordPress](https://wordpress.org/plugins/newsletter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/newsletter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/newsletter/)
 * [Active Topics](https://wordpress.org/support/plugin/newsletter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/newsletter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/newsletter/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/using-api-curl-not-working/#post-17094575)
 * Status: resolved