Hi community,
We’re currently trying to create a custom endpoint using Directus extensions to integrate with a system that can’t be handled via flows. However, we’re running into issues accessing the extension in our project, despite following the official documentation:
Here are the steps we followed:
-
Created a new endpoint extension via
npx create-directus-extension@latest
(run from the project root), using the interactive options.→ This successfully generated a folder with the extension name.
-
Ran
npm run build
, which correctly produced adist
folder containing theindex.js
. -
From here, we were unsure about the correct procedure to make the custom endpoint accessible in the application.
-
We tried creating a new folder under
./package_extensions
with the same name as the extension (waba-entry
), and placed inside it both the builtindex.js
from thedist
folder and thepackage.json
.Image here: 222 · CleanShot Cloud
→ After restarting the project locally, the endpoint still wasn’t accessible.
→ Accessing
https://<projectname>.com/waba-entry/
only returns a generic 404 error.
At this point, we’re unsure what step we might be missing in order to properly register and expose the extension.
Could you clarify the correct process to make a custom endpoint accessible in Directus?
Thanks in advance for your support!