Skip to main content
POST
/
deal-folder
/
{dealFolder}
/
files
/
initiate
iOS — Initiate direct-to-S3 multipart upload for a new file slot
curl --request POST \
  --url http://localhost/mogl/mogl-backend/api/deal-folder/{dealFolder}/files/initiate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "milestone_athlete_rel_id": 88,
  "file_name": "reel.mp4",
  "file_size": 8421376,
  "file_mime_type": "video/mp4"
}
'
{
  "status": "success",
  "data": {
    "session_id": 501,
    "upload_id": "2~abcDEF123ghiJKL456mnoPQR789stuVWX0",
    "s3_key": "deal-folders/12/slot-1/v1/reel.mp4",
    "parts": [
      {
        "part_number": 1,
        "presigned_url": "https://mogl-prod.s3.amazonaws.com/deal-folders/12/slot-1/v1/reel.mp4?partNumber=1&uploadId=2~abc...&X-Amz-Signature=..."
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.

Path Parameters

dealFolder
integer
required

Deal folder ID

Example:

12

Body

application/json
milestone_athlete_rel_id
integer
required

MilestonesAthleteRel ID this file belongs to.

Example:

88

file_name
string
required

Original file name (max 500 chars).

Example:

"reel.mp4"

file_size
integer
required

File size in bytes. Max 250 MB (262144000 bytes).

Example:

8421376

file_mime_type
string
required

MIME type of the file (max 255 chars).

Example:

"video/mp4"

Response

Upload session created with presigned part URLs

status
string
Example:

"success"

data
object