# Media

## Get Signed URL to download a file

> \<ul>\<li>Roles Allowed: Member and Partner\</li>\<li>Impersonated User Allowed: True\</li>\<li>fileId is the id of file record\</li>\<li>Use response signedUrl as follows: curl -X GET '${url}'\</li>\</ul>

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://apis.saleschat.pro"}],"security":[{"bearer-key":[]},{}],"components":{"securitySchemes":{"bearer-key":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FileRespDto":{"type":"object","properties":{"signed_url":{"type":"string"},"file_id":{"type":"string"},"file_upload_name":{"type":"string"},"mime_type":{"type":"string"}}},"ErrorRespDto":{"type":"object","properties":{"error_code":{"type":"integer"},"error_message":{"type":"string"},"error_description":{"type":"string"},"payload":{"type":"object"}}}}},"paths":{"/v1/orgs/{orgId}/file/{fileId}/download/signed_url":{"get":{"tags":["file-controller"],"summary":"Get Signed URL to download a file","description":"<ul><li>Roles Allowed: Member and Partner</li><li>Impersonated User Allowed: True</li><li>fileId is the id of file record</li><li>Use response signedUrl as follows: curl -X GET '${url}'</li></ul>","operationId":"getDownloadSignedUrl","parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully fetched signed download url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRespDto"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"403":{"description":"User or partner not allowed to download file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"500":{"description":"Internal Exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.saleschat.pro/api-documentation/media.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
