Docs

Reference

Import a file from a URL

The second way: give a public HTTPS `url` (or a host's `file`, e.g. ChatGPT `{ download_url }`); the server downloads it (port 443, no user:password, no redirects, 20 seconds at most), checks it like files.complete_upload and returns `storagePath`. The URL is not stored.

View MarkdownThis page is generated from the source code on every release.

The second way: give a public HTTPS url (or a host's file, e.g. ChatGPT { download_url }); the server downloads it (port 443, no user:password, no redirects, 20 seconds at most), checks it like files.complete_upload and returns storagePath. The URL is not stored.

Overview

Name Value
Code files.import_url
Scope needed messages.send
Risk Write
May need confirmation No
Runs as Answers right away
Needs Idempotency-Key No
Member roles allowed owner, manager, agent
In the app Assistant (Build 2.1)

Input fields

Field Type Required Description
purpose "message" | "story" | "photo" | "campaign" Yes
accountId uuid No
campaignId uuid No
url uri No
file object No
fileName text No
mime text No

Example request

curl -X POST https://tlg.builera.app/api/public/v2/ops/files.import_url \
  -H "Authorization: Bearer $TELEGRAM_AUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purpose":"message"}'

Output fields (data)

Field Type Required
ok true Yes
uploadId text Yes
status "expired" | "pending" | "checking" | "ready" | "rejected" | "used" Yes
purpose "message" | "campaign" | "photo" | "story" Yes
accountId null | text Yes
campaignId null | text Yes
fileName text Yes
storagePath null | text Yes
kind null | "video" | "photo" | "audio" | "voice" | "document" Yes
mime null | text Yes
size null | number Yes
sha256 null | text Yes
code null | text Yes
uploadExpiresAt text Yes
readyExpiresAt null | text Yes
usedAt null | text Yes

Example answer

{
  "data": {
    "ok": true,
    "uploadId": "00000000-0000-4000-8000-000000000000",
    "status": "expired",
    "purpose": "message",
    "accountId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "fileName": "text",
    "storagePath": "text",
    "kind": "video",
    "mime": "text",
    "size": 1,
    "sha256": "text",
    "code": "text",
    "uploadExpiresAt": "2026-10-22T12:00:00.000Z",
    "readyExpiresAt": "2026-10-22T12:00:00.000Z",
    "usedAt": "2026-10-22T12:00:00.000Z"
  }
}

Using it over MCP

Not listed on any profile: call tools_describe then tools_run with code: "files.import_url". Tool name when listed: files_import_url.

Was this page helpful?

Last checked: 10/24/2026 · build 2.0