Mint a branded, shareable link for an attachment
Identical response shape to the /url variant — the attachment metadata, a downloadUrl, a shareUrl, and expiresInSeconds — but always returns the branded, Dairo-hosted download link and its companion human share page, which is what you want for a link a person will click or that you'll paste into another app.
Identical response shape to the /url variant — the attachment metadata, a downloadUrl, a shareUrl, and expiresInSeconds — but always returns the branded, Dairo-hosted download link and its companion human share page, which is what you want for a link a person will click or that you'll paste into another app. expiryHours behaves the same: an integer from 1 to 168 (up to 7 days), defaulting to 5 minutes when omitted, with 400 on an out-of-range or non-integer value. As with every attachment read, the call is scoped to the message that owns the attachment — an id your key can't reach returns 404 — and the links exist only once the file has passed its malware scan: before that the call answers 409, and a file the scan flagged is withheld with a 403. Requires the messages:read scope.
Scope: messages:read. Send the API key as a bearer token; Scopes lists what each one reaches.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
attachmentId | string (uuid) | yes | The attachment's ID. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
expiryHours | integer | no | Signed link expiry in hours. Defaults to about 5 minutes when omitted. Maximum is 168 hours / one week. (minimum 1, maximum 168) |
Response
200 Success. Body: application/json, AttachmentDownloadUrlResponse.
| Field | Type | Required | Description |
|---|---|---|---|
attachment | MessageAttachment | yes | |
downloadUrl | string (uri) | yes | |
expiresInSeconds | integer | yes | (minimum 1, maximum 604800) |
shareUrl | string (uri) | yes | Human branded Dairo share page URL for the attachment. |
Errors
Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.
| Status | Meaning |
|---|---|
400 | The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch). |
401 | The API key is missing or invalid. |
403 | The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted). |
404 | No such resource in this account (resource_not_found). |
409 | The resource already exists or its state does not allow this (duplicate_resource or a condition-specific code). |
422 | The request is well-formed but a field failed validation (validation_failed). |
429 | Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached). |
500 | An unexpected error; retry with backoff, then contact support (internal_error). |
Mint a signed download URL for an attachment
Returns JSON with a short-lived downloadUrl for the file, a branded shareUrl (a human-viewable Dairo share page, or null until the file passes its malware scan), the attachment metadata (filename, contentType, sizeBytes, disposition, messageId, createdAt), and expiresInSeconds.
List audit log events
Returns your account's audit log as a reverse-chronological (newest-first) page of control-plane events in the standard data list envelope.