Files use a temporary upload followed by a separate operation that attaches the resource to a record. The complete, runnable contact-document example is in Upload and attach files.
What you’ll have at the end
An understood storage handoff: temporary URL for bytes, resource ID for the attachment.
- Request URL
- Upload bytes
- Attach ID
- Verify document
Before you start
- A permitted attachment endpoint
- A small file and a designated test record
On this page
Call Get upload URL with your API key. The response contains id and a signed url. The reviewed URL expires after 15 minutes, so obtain it shortly before the upload.
Send an HTTP PUT with the raw file bytes to the returned URL. Preserve its query string and omit the campai API key: the signed URL authorizes this storage request. Check the response before attempting attachment creation.
Pass the returned id as file.resource and the intended filename as file.fileName to an operation such as Create contact document. Uploading alone does not create that document.
Use Get document to inspect the result. A signed read URL is temporary access to the content, not a durable resource identifier to reuse in a new attachment.
Different destinations can use different request fields. Follow the exact schema for the contact document, receipt, or other record you are changing. Do not copy an entire read response back into an update request.
The full upload guide covers permissions, executable code, read-back verification, sharing, cleanup, and failures at each stage.
Check your result
- Signed URL expired
- Obtain a new upload URL.
- Bytes uploaded
- A document still needs an attachment request.
- Resource attached
- Verify the destination record and content.