# Trying to create an endpoint to receive API requests but is not working

**URL:** https://forum.mautic.org/t/trying-to-create-an-endpoint-to-receive-api-requests-but-is-not-working/32700
**Category:** Development
**Created:** [July 10, 2024, 12:58am UTC](https://forum.mautic.org/t/trying-to-create-an-endpoint-to-receive-api-requests-but-is-not-working/32700 "2024-07-10T00:58:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)
#### Post date: [July 10, 2024, 3:29am UTC](https://forum.mautic.org/t/trying-to-create-an-endpoint-to-receive-api-requests-but-is-not-working/32700/2 "2024-07-10T03:29:19Z")

</div>

Found my issue (that had since october)

I was writing the “methods” with “s” at the end and is “method”, singular

> ```
> 'routes' => [
> 'api' => [
> 'mautic_zender_receive_hello' => [
> 'path' => '/zender/receive-hello',
> 'controller' => 'MauticPlugin\MauticZenderBundle\Controller\ApiController::receiveHello',
> 'method' => ['POST'], // Lista de todos los métodos HTTP
> 'defaults' => [],
> ],
> ],
> ],
> 
> ```

This is the correct usage  
With the “s” at the end it only accepted the “GET” method

Found very useful this command: php bin/console debug:router \> routes.txt  
And the solution came from this example: [mautic-contact-source/Config/config.php at b8f128a26e8c64fc05bbaf86f7786f7a10f0e1ef · TheDMSGroup/mautic-contact-source · GitHub](https://github.com/TheDMSGroup/mautic-contact-source/blob/b8f128a26e8c64fc05bbaf86f7786f7a10f0e1ef/Config/config.php)

---

_[View the full topic](https://forum.mautic.org/t/trying-to-create-an-endpoint-to-receive-api-requests-but-is-not-working/32700)._
