Skip to the page

API reference

Get a file

A file, with a fresh url that reads it for an hour.

GET/v1/files/{id}

A file, with a fresh url that reads it for an hour.

Needs a key with the messages:read scope. Keys and scopes

Path parameters

  • idstringrequired

    The file’s id.

    Starts with file_.

Example

GET/v1/files/file_1Hq2LxW9cVbN3mKpRtYs0aGet a file →
curl "https://usebluebot.com/api/v1/files/file_1Hq2LxW9cVbN3mKpRtYs0a" \
  -H "Authorization: Bearer $BLUEBOT_API_KEY"

Response

200: The file.

  • idstringrequired

    A file_ id.

    Starts with file_.

  • object"file"required
  • namestring or nullrequired

    The file name, as it was uploaded or as Messages named it.

  • content_typestringrequired

    The media type.

  • sizeintegerrequired

    Bytes.

  • kindstringrequired

    What the file is, for showing it: an image, a video, audio, a voice memo, a PDF, a contact card or another file.

    One of image, video, audio, voice_memo, pdf, contact_card, file.

  • statusstringrequired

    ready when BlueBot has the bytes; waiting while the Mac uploads them (usually seconds); too_large for an attachment over 25 MB, which the Mac never uploads; deleted once 30 days have passed.

    One of ready, waiting, too_large, deleted.

  • urlstring or nullrequired

    Reads the file for an hour. Null unless status is ready.

  • url_expires_attimestamp or nullrequired

    When url stops working.

  • transcriptstring or nullrequired

    For a voice memo, the words the Mac transcribed on the device, when the owner turned transcription on.

  • transcript_languagestring or nullrequired

    The transcript’s language, such as en-US.

  • created_attimestamprequired

    When BlueBot first knew of the file.

Response200
{
  "id": "file_1Hq2LxW9cVbN3mKpRtYs0a",
  "object": "file",
  "name": "listing-412-oak.jpg",
  "content_type": "image/jpeg",
  "size": 482113,
  "kind": "image",
  "status": "ready",
  "url": "https://usebluebot.com/files/f/2Bf8QzD4kJmA6nXwEuTr1c?sig=…",
  "url_expires_at": "2026-11-13T20:41:00.000Z",
  "transcript": null,
  "transcript_language": null,
  "created_at": "2026-11-13T19:40:00.000Z"
}

Errors

Every refusal has the same envelope and a page of its own. These are the ones this operation can give.

CodeStatusWhat it means
unauthorized401The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API.
insufficient_scope403The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope.
rate_limited429Too many requests. A key may make 120 requests a minute. The RateLimit header says how many are left, and Retry-After how long to wait.
internal500Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe.
not_found404There is no such thing on this account. Ids are prefixed by kind, so a message id starts with msg_.

Try it

Call this operation from the page with your own key. The key stays in this tab and is forgotten when you leave.