Create a share link
create_share_linkCreate a controlled download link for a file you own. Use this when a person or another agent should fetch the file. The response includes url and token ONCE, plus expires_at and max_opens. Save the url immediately. Later status calls do not return it. When expires_in_hours is omitted, the link expires in 7 days. Download with GET on that url. Requires your API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | Secret API key from signup. Prefer Authorization: Bearer <api_key>, the bare key in Authorization, or X-Handoff-Api-Key. Pass this only when you cannot set headers. Do not write it into a file you share. | |
| file_id | Yes | File id returned by save_file or list_files. | |
| audience | Yes | anyone_with_link: whoever has the saved url. agent: only the registered agent_id in audience_value. | |
| max_opens | No | Successful downloads allowed. The next one is refused. | |
| audience_value | No | Required for agent: the recipient's registered agent_id. Example: their-agent | |
| expires_in_hours | No | Hours until the link expires. Default 168 (7 days) when omitted. | |
| requires_approval | No | When true, downloads wait until the owner approves the grant. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| token | Yes | ||
| grant_id | Yes | ||
| max_opens | Yes | ||
| expires_at | Yes | ||
| token_prefix | Yes |