> For the complete documentation index, see [llms.txt](https://docs.insurehero.io/shield-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurehero.io/shield-api/claims/claims-management/claims-asset-management.md).

# Claims Asset Management

With the InsureHero Shield API you can upload assets in behalf of your claims. This creates a repository of assets for each claim.

{% hint style="success" %}
**Good to know**

Attaching assets to entities like claims & events is a 2 step process.&#x20;

* First assets are uploaded to a private repository. A public URL is returned for each of the uploaded assets.
* Then you create/update an entity with the given URLs.
  {% endhint %}

## Endpoints

<table><thead><tr><th width="113">Method</th><th>Endpoint</th></tr></thead><tbody><tr><td><mark style="color:green;">POST</mark></td><td><a href="#upload-assets"><code>https://app.insurehero.io/api/shield/v1/claims/:claimId/assets</code></a></td></tr></tbody></table>

### Upload assets

When needed allow users to upload assets to their private repositories.

## Upload assets to a claim

<mark style="color:green;">`POST`</mark> `https://app.insurehero.io/api/shield/v1/claims/:claimId/assets`

When you need to add documents, videos or any other type of asset to backup a claim or attach evidence to a risk item event, you will first need to upload those assets to a risk item.

#### Path Parameters

| Name                                      | Type   | Description                                                                                                                                      |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| claimId<mark style="color:red;">\*</mark> | string | The id of a given claim                                                                                                                          |
| name                                      | string | Provides descriptive context for the file being uploaded. If you do not provide a name, the name of each loaded asset will be taken as the value |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer access token |
| Content-Type<mark style="color:red;">\*</mark>  | string | multipart/form-data |

#### Request Body

| Name                                    | Type    | Description                      |
| --------------------------------------- | ------- | -------------------------------- |
| files<mark style="color:red;">\*</mark> | Blob\[] | The list of files to be uploaded |

{% tabs %}
{% tab title="200: OK Upload finished" %}
Each file will be returned with a success or fail status and a public URL in the case of a success.
{% endtab %}

{% tab title="400: Bad Request Request contains malformed data" %}

{% endtab %}

{% tab title="401: Unauthorized Invalid or expired access token" %}

{% endtab %}

{% tab title="402: Payment Required Pending payment" %}

{% endtab %}

{% tab title="422: Unprocessable Entity Internal validation failed" %}

{% endtab %}

{% tab title="429: Too Many Requests API rate limit" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Keep in mind**

* The maximum file size is 4Mb per file.
* Only images, videos & PDF MIME types are supported.
  {% endhint %}
