# Problems accessing the API v2 docs

**URL:** https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494
**Category:** Development
**Tags:** development
**Created:** [March 18, 2026, 12:00am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494 "2026-03-18T00:00:55Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 12:00am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/1 "2026-03-18T00:00:55Z")

</div>

I’ve looked in the Mautic forum for information on fixing a problem with my Mautic instance. My v2 API documentation isn’t showing right. I couldn’t find anything there on how to solve the issue.

When I go to [https://myinstance/api/v2](https://myinstance/api/v2), I get the following:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/23f0f933d89c62480a49ee7c32034fcc2970b91f.png)  
I’m not sure if there’s an occ command to fix this? I watched a video on YouTube that indicated that the API documentation is supposed to appear there in accordian style presentation, but instead the interface appears to be broken.

Where would I post this problem/find a solution to this problem or even find out about how this OpenAPI documentation route is supposed to work internally (dev\_docs)?

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 12:03am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/2 "2026-03-18T00:03:32Z")

</div>

In the browser developer console, I am getting 404 errors for the fixed assets. I don’t know where the physical files are located to check the file permissions

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [March 18, 2026, 12:04am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/3 "2026-03-18T00:04:06Z")

</div>

Hey there!

Following from Slack (thanks for posting here!) I would check the browser console - it looks like your CSS and whatnot are not being loaded. See if there’s any errors there, which might help track down what’s going on. Also try things like a hard refresh on the browser etc just to check it’s not something wonky there.

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [March 18, 2026, 12:05am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/4 "2026-03-18T00:05:45Z")

</div>

> [@siteleas](#):
>
> I don’t know where the physical files are located to check the file permissions

On my instance, they’re located in /bundles/apiplatform:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/e2f524175fde5c0cfff2289dc9b9eb18586e0eb5.png)

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 12:05am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/5 "2026-03-18T00:05:52Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4bb285537914aa425393e4a99636080a260e3fba.png)

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 12:45am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/6 "2026-03-18T00:45:43Z")

</div>

The weird thing is that I don’t have a bundles folder in the root at all?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/0b1151d63e9e434797ea327dfffefe94c307000d.png)

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 12:48am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/7 "2026-03-18T00:48:25Z")

</div>

I do have the following folder `vendor/api-platform/core/src/Symfony/Bundle/Resources/public/`

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2458fabe78b9fa7c2116f3d3e54a9ec00421b2c4.png)

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 12:58am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/8 "2026-03-18T00:58:09Z")

</div>

I found this, and am looking into if there is something helpful in this GitHub issue - [Add OpenAPI support to Mautic API · Issue #8780 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/8780)

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 1:03am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/9 "2026-03-18T01:03:54Z")

</div>

I also found this - [Swagger/OpenAPI support for Mautic API - #8 by ash\_s85](https://forum.mautic.org/t/swagger-openapi-support-for-mautic-api/12565/8) but that doesn’t seem to be very helpful either.

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 1:07am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/10 "2026-03-18T01:07:20Z")

</div>

I found this PR on the issue here [API Platform implementation by nileshlohar · Pull Request #14812 · mautic/mautic · GitHub](https://github.com/mautic/mautic/pull/14812) and looking into if there is anything helpful when Mautic installs and doesn’t properly set up the resource publishing.

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [March 18, 2026, 1:32am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/11 "2026-03-18T01:32:44Z")

</div>

I guess the issue might be happening if you’re not installing with Composer - is that the case for you?

See this comment in particular:

> <https://github.com/mautic/mautic/pull/14812#issuecomment-3527683425>
>
> Hi all,
> 
> I just faced the same issue.
> 
> So first composer install, then stand…ard Mautic setup and the API docs aren't loading.
> 
> Check out your browser console then:
> 
> \<img width="3840" height="1458" alt="image" src="https://github.com/user-attachments/assets/1f9b8321-4304-43b4-9e42-c72d3d0ff8d5" /\>
> 
> A bit of searching led me to that comment:
> https://github.com/api-platform/api-platform/issues/1799#issuecomment-864118018
> 
> \`sudo -u www-data /usr/bin/php8.3 bin/console asset:install \`
> 
> \<img width="1818" height="453" alt="image" src="https://github.com/user-attachments/assets/fd38c4cd-aa83-44de-8271-5871a8dcc53c" /\>
> 
> That requires, that you'd setup your mautic initially with public instead of docroot, so that "Symfony can take care of things":
> https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/6
> 
> Quite a bit of digging - but it's finally working here as well.

---

<div class="post-metadata">

### Author: ![bastianhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bastianhammer/32/14826_2.png) [@bastianhammer](https://forum.mautic.org/u/bastianhammer)
#### Post date: [March 18, 2026, 7:14am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/12 "2026-03-18T07:14:58Z")

</div>

Hello,

I had this as well at first, despite composer.

Try:

`bin/console asset:install`

That failed and I first had to change the docroot folder:

> **[docroot - Installation — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/7.0/getting_started/how_to_install_mautic.html#how-can-you-use-another-folder-than-docroot-as-the-root-folder)**
>
> Composer says that the general recommendation is no.. They provide arguments against but also workarounds if a project decides to do it anyway.

Give it a try and see whether that helps.  
Which version are you currently using? 7.0.1?

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 8:24am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/13 "2026-03-18T08:24:15Z")

</div>

> [@bastianhammer](#):
>
> bin/console asset:install

Well, that did install the assets, however they are visible under public/bundles/.. instead of bundles/.. which still causes the page to display without loading the assets.

Do we also need to have mod\_rewrite for public to / in the `.htaccess`?

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 9:21am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/15 "2026-03-18T09:21:46Z")

</div>

We are using OpenLightSpeed server. In order to tell OLS to serve up the /public/bundles/…/…/ as /bundles/…/…/ I had to complete the following:

OLS, here is the exact, minimal configuration you need for that Static Context to work:

1. **The Core Settings**

In **Virtual Hosts \> [Your VHost] \> Context \> Add (Static):**

- **URI:** /bundles/
- **Location:** /full/path/to/your/site/public/bundles/ (Ensure this is the absolute path starting from /).
- **Accessible:** Yes

1. **The Rewrite Settings (On the same screen)**

Scroll down to the Rewrite section of this specific context:

- **Enable Rewrite:** Yes
- **Rewrite Rules:**

```plaintext
RewriteEngine On

```

1. **The “Secret Sauce” (Graceful Restart)**

This is where most OLS configurations fail. After you click **Save:**

1. Look at the very top of the WebAdmin console.
2. You will see a **red/orange** icon or a message saying “Configuration has been modified. To apply changes, please perform a graceful restart.”
3. Click the **Graceful Restart** icon (the circle-arrow). **If you don’t do this, the 404 will persist.**

---

<div class="post-metadata">

### Author: ![bastianhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bastianhammer/32/14826_2.png) [@bastianhammer](https://forum.mautic.org/u/bastianhammer)
#### Post date: [March 18, 2026, 9:30am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/16 "2026-03-18T09:30:51Z")

</div>

If you’re using OpenLightSpeed (and other admin panels) it’s getting more complex.

This question might become an OLS question now.  
I recommend the command line way. It’s not fancy, but at least you’d know how you setup your server and make it match Mautic.

In the standard composer setup, the correct root folder for your vhost is:

`docroot`

Anything else (OLS specific) might not work properly or needs to be adjusted “the ols way”.

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 9:33am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/17 "2026-03-18T09:33:20Z")

</div>

I don’t have a `docroot` folder in my hierarchy. This install of Mautic has been upgraded one version at a time all the way from version 3. I have been using this instance for many years.

I did a test to see if I could make the DocumentRoot /public, but that didn’t work. The way I documented above was the only way I could get the API documentation screen to work properly after I completed the ``bin/console asset:install`` command you recommended.

---

<div class="post-metadata">

### Author: ![siteleas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/siteleas/32/1047_2.png) [@siteleas](https://forum.mautic.org/u/siteleas)
#### Post date: [March 18, 2026, 9:39am UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/18 "2026-03-18T09:39:19Z")

</div>

If I should be backing up certain files, directories, and the Mautic 7 database, reinstalling and restoring those files, I would need help knowing what to do, but for now, this was my work around that both; allows the main Mautic 7 instance to load properly, and allows the API ui to load the assets it’s supposed to.

---

<div class="post-metadata">

### Author: ![dannyrich](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dannyrich/32/13311_2.png) [@dannyrich](https://forum.mautic.org/u/dannyrich)
#### Post date: [March 30, 2026, 5:02pm UTC](https://forum.mautic.org/t/problems-accessing-the-api-v2-docs/37494/19 "2026-03-30T17:02:02Z")

</div>

I had the same issue (missing `bundle/` in document root). I ran the `bin/console asset:install` command (which failed the first time because `public/` was missing; I manually created the public directory and ran again). That created `public/bundles/`. I then moved that bundles directory to document root and the API documentation worked.

I confirmed that Mautic 7 was originally installed using the recommended composer path.
