# Troubleshooting

Here you can find the most common issues you may encounter in our API integration.

## Missing "Accept: application/json" header

Our API returns a JSON-formatted response.

If your client does not accept application/json, you may encounter some weird responses such as HTML or not well-formatted response messages.

To avoid any confusion, always send the "**Accept: application/json**" header parameter in any API call.

## (401) Missing API Key

If you get 401 status code and the following response:

```json
{
    "message": "Unauthorized"
}
```

You are probably missing the **x-api-key** header in your API call or your API key is not valid.

To get your API Key you can create one visiting [API Dashboard](https://app.dynamicmockups.com/dashboard-api) page.

## (422) Invalid Mockup UUID

Our [Render API](https://docs.dynamicmockups.com/api-reference/render-api) requires **Mockup UUID** to know what mockup you want to render.

If you provided an invalid Mockup UUID or didn't provide it at all you may see this response:

```json
{
    "message": "The selected mockup uuid is invalid.",
    "errors": {
        "mockup_uuid": [
            "The selected mockup uuid is invalid."
        ]
    }
}
```

There are two ways to fix this issue.

One is to copy **Mockup UUID** from the web application URL. Example image below.

<figure><img src="https://1410134351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXeuL34FauPTZ6yb0wAep%2Fuploads%2FCOyy4M9eO3yW3Xniywjd%2Fimage.png?alt=media&#x26;token=0dd7485d-ca1f-4f52-b232-0e33b778f952" alt=""><figcaption></figcaption></figure>

Another way is to call [Get Mockups API](https://docs.dynamicmockups.com/api-reference/get-mockups-api) to get all the available mockups from your account and their Mockup UUIDs.

## (422) invalid Smart Object UUID

Same as Mockup UUID, our [Render API ](https://docs.dynamicmockups.com/api-reference/render-api)requires **Smart Object UUID** to know what place inside a mockup you want to render and where you probably want to put your design asset.

If you provided an invalid Smart Object UUID you may see this response:

```json
{
    "message": "The selected smart_objects.0.uuid is invalid.",
    "errors": {
        "smart_objects.0.uuid": [
            "The selected smart_objects.0.uuid is invalid."
        ]
    }
}
```

There are two ways to fix this issue.

One is to copy **Smart Object UUID** from the web application URL. Example image below.

<figure><img src="https://1410134351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXeuL34FauPTZ6yb0wAep%2Fuploads%2F4ZfoJwBcJm3av7lZuQPf%2Fimage.png?alt=media&#x26;token=8a8807d5-d50e-4f9a-8fea-3f9b6e8962cf" alt=""><figcaption></figcaption></figure>

Another way is to call [Get Mockups API](https://docs.dynamicmockups.com/api-reference/get-mockups-api) to get all the available mockups from your account and their available smart objects with UUIDs.

## (400) Wrong file URL extension provided

When you provide the design asset you want to render on the mockup using [Render API](https://docs.dynamicmockups.com/api-reference/render-api), we accept the following file extensions: JPG, JPEG, PNG, WEBP, GIF

If you provide any other, such as SVG, you may see this response:

```json
{
    "success": false,
    "message": "Wrong file URL extension provided. svg is not supported. Supported values are: jpg, jpeg, png, webp, gif"
}
```

## Getting 500 server errors?

This is not an expected behavior from our API.

In this case, please [contact us](https://docs.dynamicmockups.com/getting-started/how-can-i-get-support) and we will resolve the issue as soon as possible.
