Skip to main content

Attach File (From URL)

POST /public/action/attachments/createFromUrl

Fetches a file from a URL and attaches it to a record.

Authentication: X-API-KEY header (see Authentication).

Query parameters

ParameterTypeRequiredDescription
idstringYesId of the object to attach the file to.
typeenumYesObject type: CLIENT, PROJECT, DELIVERABLE, OPPORTUNITY, EXPENSE, TICKET.
fileUrlstringYesPublicly reachable URL of the file to fetch.
fileNamestringYesName to store the file under.

Request

curl -X POST https://api.withmoxie.com/public/action/attachments/createFromUrl?id=VALUE&type=VALUE&fileUrl=VALUE&fileName=VALUE \
-H "X-API-KEY: your_api_key_here"

Response

Returns the stored file reference / URL as a plain string.

"https://files.withmoxie.com/10016/clients/66b0f2a1.../contract.pdf"