> ## Documentation Index
> Fetch the complete documentation index at: https://getfaceage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload quiz image

> Upload an image to use in a quiz.

Uploads an image for a quiz and returns its storage path.

## Path parameters

**business\_id** `integer` *required*

ID of the business.

## Body

**image** `file` *required*

Image file. Supported types: `png`, `jpeg`, `jpg`, `ico`. Send as `multipart/form-data`.

## Response

Returns the storage path of the uploaded image as plain text.

```bash cURL theme={null}
curl --request POST 'https://core.getfaceage.com/api/v1/quiz/upload-img/{business_id}' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer your_secret_key' \
  --form 'image=@"/path/to/image.png"'
```

```php PHP theme={null}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://core.getfaceage.com/api/v1/quiz/upload-img/{business_id}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => ['image' => new CURLFILE('/path/to/image.png')],
  CURLOPT_HTTPHEADER => [
    'Accept: application/json',
    'Authorization: Bearer your_secret_key',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

```text 200 theme={null}
storage/quiz/12567/670a4919b99087.png
```

```json 401 theme={null}
{
  "message": "Unauthenticated."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.