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

# Asset uploading

The asset uploading flow is split into three separate API calls:

{% stepper %}
{% step %}

### Create a signed upload URL

For example, if you want to upload a `logo` image for a property, you first need to perform an API call to sign an asset, specifying the type of asset and its MIME type. The resulting object will contain an upload URL.

```bash
curl --request POST \
  --url 'https://partners.clym.io/api/portal/instance/property/sign-asset?merchant_id={yourMerchantId}' \
  --header 'Authorization: Bearer {YourAPIKey}' \
  --header 'Content-Type: application/json' \
  --data '{
	"type": "logo",
	"mime": "image/png"
}'
// Result should be
{
  "result": {
    "url": "https://eu1.clym.io/api/u/CPKWkh3HWt7hN....."
  }
}
```

{% endstep %}

{% step %}

### Upload the asset&#x20;

Once you've received the signed upload URL, you can now use it to upload your asset. The signed URL should look like: `https://{instance}.clym.io/api/u/{uploadSignature}`&#x20;

The HTTP request should be a `multipart/form-data` request with the asset under the `asset` field name. An example can be viewed below.

```bash
curl --request POST \
  --url https://eu1.clym.io/api/u/CPKWkh3HWt7hN..... \
  --header 'Content-Type: multipart/form-data' \
  --form asset=@/Users/clym/my-logo.png
// Result should be
{
  "result": {
    "id": "38f305efa9b447839...", // the asset id
    "url": "...."                // the URL of the asset
  }
}
```

{% endstep %}

{% step %}

### Use the uploaded asset id

Once you've received the asset id, you can then use it to attach it to the resource you want to use.

In the example above, we want to assign the uploaded asset to the `logo` field of a property. For that, we would need to perform the following API call:

```bash
curl --request PUT \
  --url 'https://partners.clym.io/api/portal/instance/property?merchant_id={yourMerchantId}' \
  --header 'Authorization: Bearer {YourAPIKey}' \
  --header 'Content-Type: application/json' \
  --data '{ "logo": "38f305efa9b447839.." }'
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clym.io/getting-started/asset-uploading.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
