Documentation Index
Fetch the complete documentation index at: https://docs.ofauth.com/llms.txt
Use this file to discover all available pages before exploring further.
mediaItems is an array used by endpoints like:
- Create Post (
POST /v2/access/posts) - Send Message (
POST /v2/access/chats/{userId}/messages) - Create Mass Message (
POST /v2/access/mass-messages)
mediaItems array.
Accepted Item Formats
Each element inmediaItems can be one of the following:
| Format | Example | When to use |
|---|---|---|
| Vault media ID (number) | 12345 | You already have a vault media ID and want to reuse it |
| Vault media ID (numeric string) | "12345" | Same as above, but your ID is a string |
Upload reference (mediaUploadId) | "upload:550e8400-e29b-41d4-a716-446655440000" | You just uploaded media via /v2/access/uploads/* and want OFAuth to resolve it to a vault ID for you |
| External URL (HTTP/HTTPS) | "https://example.com/image.jpg" | You want to attach a remotely hosted file by URL |
Upload References Are Single-Use
If you pass amediaUploadId (the value returned by POST /v2/access/uploads/init) inside mediaItems, OFAuth resolves it and then consumes the upload reference.
If you need to attach the same media multiple times, store and reuse the vault media ID instead.
Examples
Use a vault media ID
Use an upload reference
Mix formats
Validation Rules (Quick)
- Non-numeric strings that are not an
upload:reference and not anhttp(s)://URL are rejected. - Only
http://andhttps://URLs are accepted. - If an upload reference is invalid/expired/unused (not ready), the request fails with
400.