Skip to main content
POST
/
v2
/
access
/
uploads
/
init
Initialize media upload
curl --request POST \
  --url https://api-next.ofauth.com/v2/access/uploads/init \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --header 'x-connection-id: <api-key>' \
  --data '
{
  "filename": "<string>",
  "size": 1,
  "contentType": "<string>",
  "vaultUpload": {
    "mode": "message",
    "userId": "<string>"
  }
}
'
{
  "mediaUploadId": "<string>"
}

Authorizations

apiKey
string
header
required

Your OFAuth API key for authenticating requests.

x-connection-id
string
header
required

Requires a connection via the x-connection-id header.

Body

application/json
filename
string
required

Name of the file to upload

Minimum string length: 1
size
integer
required

File size in bytes

Required range: x > 0
contentType
string
required

MIME type of the file (e.g., image/jpeg, video/mp4)

Minimum string length: 1
vaultUpload
object

Options for vault upload (if uploading to vault)

Response

Successful response

mediaUploadId
string
required