> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agentplatform-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Inbuilt tool - get_attachment_url

<Badge icon="arrow-left" color="gray">[Back to Inbuilt tools](/agent-platform/inbuilt-tools/index#available-tools)</Badge>

The `get_attachment_url` tool returns a time-limited public URL for a file that the user uploaded during the conversation.

## When to use

Use `get_attachment_url` when you need to give the URL of an uploaded file to another system, such as an external API or a ticketing tool, or to share the file in a message.

To forward the file to an external system for you, use [route\_attachment](/agent-platform/inbuilt-tools/route-attachment).

## Declare the tool

```yaml theme={null}
TOOLS:
  get_attachment_url(attachment_id: string, expires_in_seconds?: number) -> object
```

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `attachment_id` | Yes | The ID of the uploaded attachment. |
| `expires_in_seconds` | No | How long the URL stays valid. Default: 3600 (1 hour). Maximum: 86400 (24 hours). |

## Returns

A URL that can be fetched from outside the platform, with the lifetime it is valid for. Depending on the storage backend, this is a presigned storage URL or a platform-served download link. The platform may apply a shorter lifetime to the platform-served link, so use the lifetime in the result.

If the attachment does not exist or does not belong to the current conversation, the tool returns `ATTACHMENT_NOT_FOUND`. If `attachment_id` is missing, it returns `MISSING_PARAMETER`.


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