API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
API OverviewAPI Reference
developer.placewise.comapp.placewise.complacewise.com
IndexPublic APIManagement API
Users APIOperations APIMessaging APIReporting APIML APIData APISystem API
IndexPublic APIManagement API
Users APIOperations APIMessaging APIReporting APIML APIData APISystem API
  1. Files
  • Introduction
  • Core
    • Community
      • Community Model
      • Show Community
      • Update Community
    • Loyalty Clubs
      • Show Loyalty Club
      • Update Loyalty Club
      • Update Loyalty Club Public Info
    • Applications
      • Application model
      • List applications
      • Create application
      • Update application
      • Show application
      • Destroy application
    • Branding
      • Show loyalty club branding
      • Show application branding
      • Update application branding
      • Duplicate application branding
      • Destroy application branding
    • Cookie Policy
      • Show Cookie Policy
      • Update Cookie Policy
    • Terms
      • Introduction
      • Show Terms
      • Update Terms
    • Domains
      • Introduction
      • List Domains
      • Show Domain
      • Create Domain
      • Destroy Domain
    • Domain Email Configs
      • Introduction
      • Show Domain Email Config
      • Create Domain Email Config
      • Destroy Domain Email Config
    • Domain Web Configs
      • Introduction
      • Show Domain Web Config
      • Create Domain Web Config
      • Destroy Domain Web Config
    • TLS Certificates
      • Introduction
      • List TLS Certificates
      • Show TLS Certificate
      • Create TLS Certificate
      • Update TLS Certificate
      • Destroy TLS Certificate
    • Links
      • Introduction
      • List Links
      • Show Link
      • Enable Link
      • Disable Link
      • Create Link
      • Delete Link
      • Generate Link
    • Fonts
      • Introduction
      • List Fonts
      • Show Font
      • Create Font
      • Enable Font
      • Disable Font
      • Update Font
      • Destroy Font
    • Subunits
      • Introduction
      • List Subunits
      • Show Subunit By External ID
      • Show Subunit
      • Create Subunit
      • Update Subunit
      • Destroy Subunit
    • Subunits Scopes
      • Introduction
      • List Subunits Scopes
      • Show Subunits Scope
      • Create Subunits Scope
      • Update Subunits Scope
      • Destroy Subunits Scope
    • Contacts
      • Introduction
      • List Customer Contacts
      • Show Customer Contact
      • Create Customer Contact
      • Update Customer Contact
      • Destroy Customer Contact
      • List Organization Contacts
      • Show Organization Contact
      • Create Organization Contact
      • Update Organization Contact
      • Destroy Organization Contact
    • Translations
      • [DRAFT] Show Loyalty Club Translations
      • Show Application Translations
      • Show Application Translations Locale
      • Update Application Translations
      • Duplicate Application Translations
      • Destroy Application Translations
      • Show Loyalty Club Mobile App Translations
      • Update Loyalty Club Mobile App Translations
    • Promotions Policy
      • Introduction
      • Show Promotions Policy
      • Update Promotions Policy
    • Tracker
      • Show Loyalty Club Configuration
      • Update Loyalty Club Configuration
      • List tracked links
      • Show tracked link
    • Social Logins
      • List configurations
      • Show configuration
      • Create configuration
      • Update configuration
      • Destroy configuration
    • Billing
      • Service Quotas
        • ServiceQuotasConfig Model
        • List Service quotas configs
        • Create Service quotas config
        • Show Service quotas config
        • Update Service quotas config
        • Delete Service quotas config
      • Recurring Charges
        • RecurringCharge Model
        • Archieve Recurring charge
        • Restore Recurring charge
        • List Recurring charges
        • Create Recurring charge
        • Show Recurring charge
        • Update Recurring charge
        • Delete Recurring charge
      • Service Usages
        • History
          • Show Service Usage History
        • List Service Usages
      • Customer Accoutning Configurations
        • Show customer accoutning configuration
        • Update customer accoutning configuration
      • Cost and usage
        • Show billing summary
        • Show billing breakdown
      • Data transfer
        • Show data transfer summary
        • Show data transfer breakdown
      • Customer Balance
        • Show billing balance
        • Show billing manual balance changes
        • Add billing manual balance changes
    • SMS Sender Identities
      • Introduction
      • List Sms Sender Identities
    • Member Authentication Configuration
      • Show loyalty club member authentication configuration
      • Show application member authentication configuration
      • Update member authentication configuration
      • Duplicate application member authentication configuration
      • Destroy member authentication configuration
    • Sender Identities
      • SMS Sender Identities
        • Introduction
        • List SMS Sender Identity
        • Show SMS Sender Identity
        • Create SMS Sender Identity
        • Update SMS Sender Identity
        • Delete SMS Sender Identity
      • Email Sender Identities
        • Introduction
        • List Email Sender Identities
        • Show Email Sender Identity
        • Create Email Sender Identity
        • Update Email Sender Identity
        • Delete Email Sender Identity
    • OAuth2
      • Clients
        • List loyalty club oauth2 clients
        • Show loyalty club oauth2 client
        • Create loyalty club oauth2 client
        • Update loyalty club oauth2 client
        • Destroy loyalty club oauth2 client
      • Keys
        • Generate loyalty club oidc keys
        • List loyalty club oidc keys
    • Privacy Policy
      • Introduction
      • Show Privacy Policy
      • Update Privacy Policy
  • Members
    • Listing Members
      • List members
      • Count members
      • List Members By Audience
      • List Members
    • Member Profile
      • Benefits
        • Introduction
        • Parking
          • Check member parking benefit by car LPN
          • Register member parking event by car LPN
          • Check member parking benefit by hashed car LPN
          • Register member parking event by hashed car LPN
        • List Member Benefits
        • Show Member Benefit
      • Offers
        • Show Offers Meta
        • Show Offer
        • Encode Offer
        • List Offers
        • Use Offer
        • Like Offer
        • Unlike Offer
        • Grant Offer
      • Public Info
        • Show Member Public Info
        • Show Member Public Info by MSISDN
        • Show Member Public Info by Email
      • Person ID
        • Show Member Person ID
        • Show Member Person ID by MSISDN
        • Show Member Person ID by Email
      • Cars
        • Introduction
        • List Member Cars
        • Create Member Car
        • Show Member Car
        • Update Member Car
        • Renew Member Car
        • Destroy Member Car
        • Lookup a Car
        • Archive Car
        • Find Member Car By LPN
        • Find Member Car By Hashed LPN
      • Children
        • MemberChild Model
        • List Member Children
        • Register Member Child
        • Show Member Child
        • Update Member Child
        • Unregister Member Child
      • Groups
        • Add Member to Group
        • Remove Member from a Group
        • List Members of a Group
        • List Groups of a Member By MSISDN
        • List Groups of a Member by Email
        • List Groups of a Member
      • Programs
        • By Member Token
          • List Member Programs
          • Update Member Programs
          • Add Member to Program
          • Remove Member from Program
        • List Member Programs
        • Update Member Programs
        • Add Member to Program
        • Remove Member from Program
      • Rewards
        • Show Member Rewards Status
        • Grant Points
        • Cancel Transaction
      • Export
        • Export Member
        • Download Member Export
      • Misc
        • Show Member Profile History
        • Generate Link
        • Ban member
        • Unban member
      • Create Member
      • Update Member
      • Remove Member Properties
      • Validate Member
      • Register Member App Token
      • Show Member
      • Show Member By MSISDN
      • Show Member By Email
      • Show Member By Encrypted ID
      • Show Member By User ID
      • Destroy Member
    • Imports
      • Introduction
      • Create Members Import Request
      • Show Members Import Status
      • Show Members Import Bulk Status By Request Number
      • Show Members Import Bulk Status
    • Groups
      • Introduction
      • Groups
        • List Member Groups
        • Show Member Group
        • Create Member Group
        • Update Member Group
        • Destroy Member Group
        • Add Members to Group
        • Remove Members from Group
        • Add Members to Group by audience
        • Remove Members from Group by audience
      • Types
        • List Member Groups Types
    • Programs
      • Introduction
      • Create Program
      • List Programs
      • Show Program
      • Update Program
      • Destroy Program
    • Benefits
      • Introduction
      • Create Benefit
      • List Benefits
      • Show Benefit
      • Update Benefit
      • Archive Benefit
      • Restore Benefit
      • Destroy Benefit
    • Cars
      • Show Cars Configuration
      • Update Cars Configuration
    • Webhooks
      • Introduction
      • Subscriptions Management
        • List Members Notifications Subscriptions
        • Create Members Notifications Subscription
        • Update Members Notifications Subscription
        • Destroy Members Notifications Subscription
    • Receipts
      • Introduction
      • List Submissions
      • Show Submission
      • Update Submission
      • Check Limits Exceeded
    • Messages
      • Send "delivered" event for push message
      • Send "opened" event for push message
    • OAuth2
      • Untitled Endpoint
    • Refer a Friend
      • Create RAF Campaign
      • List RAF Campaigns
      • Show RAF Campaign
      • Show current RAF Campaign
      • Update RAF Campaign
      • Destroy RAF Campaign
      • Show Member Campaign
    • Random Draws
      • List Random Draws
      • Show Random Draw
      • Create Random Draw
      • Update Random Draw
    • Misc
      • Generate Link
      • Show Messages History
  • CMS
    • Introduction
    • Articles
      • Article Model
      • Articles Categories
        • List Articles Categories
        • Show Articles Category
        • Create Articles Category
        • Update Articles Category
        • Destroy Articles Category
      • List Articles
      • Show Article
      • Create Article
      • Update Article
      • Archive Article
      • Restore Article
      • Destroy Article
    • Events
      • Event Model
      • Events Groups
        • Introduction
        • List Events Groups
        • Show Events Group
        • Create Events Group
        • Update Events Group
        • Destroy Events Group
      • Events Categories
        • List Events Categories
        • Show Events Category
        • Create Events Category
        • Update Events Category
        • Destroy Events Category
      • List Events
      • Show Event
      • Create Event
      • Update Event
      • Archive Event
      • Restore Event
      • Destroy Event
    • Promotions
      • Promotion Model
      • Promotions Collections
        • Promotion Collection Model
        • List Promotions Collections
        • Show Promotions Collection
        • Create Promotions Collection
        • Update Promotions Collection
        • Destroy Promotions Collection
      • List Promotions
      • Show Promotion
      • Create Promotion
      • Update Promotion
      • Archive Promotion
      • Restore Promotion
      • Destroy Promotion
    • Pages
      • Page Model
      • Components
        • Component Model and Schema
        • System Components
        • Custom Components
          • Introduction
          • List Custom Components
          • Show Custom Component
          • Create Custom Component
          • Update Custom Component
          • Archive Custom Component
          • Restore Custom Component
          • Destroy Custom Component
        • Show Components Schema
        • Validate Component
      • List Services
      • List Pages
      • Show Page
      • Create Page
      • Update Page
      • Archive Page
      • Restore Page
      • Destroy Page
      • List Merge Properties
    • Job Postings
      • Introduction
      • List Job Postings
      • Show Job Posting
      • Create Job Posting
      • Update Job Posting
      • Archive Job Posting
      • Restore Job Posting
      • Destroy Job Posting
    • Press Releases
      • PressRelease Model
      • Press Release Categories
        • List Press Releases Categories
        • Show Press Releases Category
        • Create Press Releases Category
        • Update Press Releases Category
        • Destroy Press Releases Category
      • List Press Releases
      • Show Press Release
      • Create Press Release
      • Update Press Release
      • Archive Press Release
      • Restore Press Release
      • Destroy Press Release
    • Service Messages
      • Introduction
      • List Service Messages
      • Show Service Message
      • Create Service Message
      • Update Service Message
      • Archive Service Message
      • Restore Service Message
      • Destroy Service Message
    • Extensions
      • Tags
        • Tag Model
        • List Tags
        • Show Tag
        • Create Tag
        • Update Tag
        • Destroy Tag
      • Attachments
        • Attachment Model
        • List attachments
        • Show Attachment
        • Create Attachment
        • Update Attachment
        • Destroy Attachment
    • Other
      • Mixed Content
        • Search Mixed Content
  • Landing Pages
    • Introduction
    • Landing Page Templates
      • Introduction
      • Bee Templates
        • Introduction
        • List Bee Landing Page Templates
        • List Bee Landing Page Templates Tags
        • Show Bee Landing Page Templates
      • List Landing Page Templates
      • Show Landing Page Template
      • Create Landing Page Template
      • Update Landing Page Template
      • Destroy Landing Page Template
    • List Landing Pages
    • Show Landing Page
    • Create Landing Page
    • Update Landing Page
    • Archive Landing Page
    • Restore Landing Page
    • Destroy Landing Page
  • Website
    • Website Model
    • Website Domains
      • Introduction
      • List Website Domains
      • Show Website Domain
      • Create Website Domain
      • Update Website Domain
      • Destroy Website Domain
    • Redirections
      • Redirection Model
      • List Redirections
      • Show Redirection
      • Create Redirection
      • Update Redirection
      • Archive Redirection
      • Restore Redirection
      • Destroy Redirection
    • Show Website
    • Update Website
  • Mobile App
    • Homepage
      • Show Homepage
      • Update Homepage
      • Destroy Homepage
    • Versions
      • List versions
      • Show version
      • Create version
      • Update version
      • Destroy version
    • Configuration
      • Show Mobile App Configuration
      • Update Mobile App Configuration
  • Stores
    • V4 API
      • Stores
        • Store Model
        • List Stores
        • Show Store
        • Create Store
        • Update Store
        • Archive Store
        • Restore Store
        • Destroy Store
        • Update Store receipt information
      • Retailers
        • Retailer Model
        • List Retailers
        • Show Retailer
      • Categories
        • StoreCategory Model
        • List Stores Categories
        • Show Stores Category
        • Create Stores Category
        • Update Stores Category
        • Destroy Stores Category
      • Store Categories
        • Add Store To Category
        • Remove Store From Category
        • Bulk Update Store Categories
    • V3 API
      • Stores
        • List Stores
        • Show Store By Store ID
        • Show Store
        • Create Store
        • Update Store By Store ID
        • Update Store
        • Delete Store By Store ID
        • Delete Store
        • List User Stores
      • Categories
        • List Store Categories
      • Zones
        • List Stores Zones
      • Floors
        • List Stores Floors
      • Tenant Categories
        • List Stores Tenant Categories
      • Store events
        • Create Store Event
      • Departments
        • List Store Departments
        • Show Store Department By Department ID
        • Create Store Department
        • Update Store Department by Department ID
        • Update Store Department
  • Offers
    • Introduction
    • Offers
      • Show Offer
      • List Offers
      • List Offers Groups
      • Create Offers
      • Update Offers
      • Clone Offers
      • Grant Offers
      • Archive Offers
    • Collections
      • List Collections
      • Show Collection
      • Create Collection
      • Update Collection
      • Archive Collection
      • Update Collections Order
  • Rewards
    • Configuration
      • Introduction
      • Show Rewards Program Configuration
      • Show Rewards Program Configuration
    • Points expiration notifications policy
      • Introduction
      • Show Points Expiration Notifications Policy
      • Update Points Expiration Notifications Policy
  • Triggerer
    • Rules
      • Introduction
      • List Triggerer Rules
      • Show Triggerer Rule
      • Create Triggerer Rule
      • Update Triggerer Rule
      • Pause Triggerer Rule
      • Start Triggerer Rule
      • Delete Triggerer Rule
    • Event Types Schema
      • Show Event Types Schema
    • Point Multipliers
      • Introduction
      • List Point Multipliers
      • Show Point Multiplier
      • Create Point Multiplier
      • Update Point Multiplier
      • Destroy Point Multiplier
  • RSVP Events
    • Events
      • Event model
      • List Events
      • Show Event
      • Create event
      • Update Event
      • Destroy Event
      • Archive Event
      • Restore Event
      • List registered members
  • Games
    • Codebreaker
      • List codebreaker campaigns
      • Show codebreaker campaign
      • Create codebreaker campaign
      • Update codebreaker campaign
      • Destroy codebreaker campaign
    • Games
      • List games
      • Create game
      • Show game
      • Update game
      • Delete game
      • Activate/deactivate game
      • Validate game setup
      • List games (alias)
    • Schemas
      • Get main game schema
      • Get component schema for game
    • Statistics
      • Get game statistics
      • Get game statistics (alias)
    • Prizes
      • List prizes for game
      • Grant prize to member
    • Languages
      • Show game languages
      • Update game languages
    • Styles
      • Show game styles
      • Set game styles
    • Settings
      • List game settings (images)
      • Upload game setting image
    • Sections (Wheel of Fortune)
      • List sections
      • Create section
      • Update section
      • Delete section
    • Symbols (Scratchcard)
      • List symbols
      • Create symbol
      • Update symbol
      • Delete symbol
    • Game Prize Collections
      • List prize collections for game
      • List prize collections with coupons for game
    • Game Prizes
      • List prizes in collection
      • Create prize in collection
      • Show prize
      • Update prize
      • Delete prize
    • Game Prize Stocks
      • List stocks for prize
      • Create stock for prize
      • Show stock
      • Update stock
      • Delete stock
    • Tickets
      • Grant tickets
    • Add Languages to Game
    • Add Component to Game
    • Show Game Schema
    • Show Single Game Schema
    • Show Game Components
    • Update Game Component
    • Delete Component Data
  • Scraper
    • Scraper
      • Get scraper info
      • Run Scraper
      • Debug Scraper
      • Get scraper configuration
      • Update scraper configuration
    • Shopping mall
      • List Scraped Shopping Malls
      • Show Scraped Shopping Mall
      • Add Scraped Shopping Mall
      • Update Scraped Shopping Mall
      • Delete Scraped Shopping Mall
    • Shopping mall language
      • List ShoppingMall Languages
      • Show ShoppingMall Language
      • Add ShoppingMall Language
      • Update ShoppingMall Language
      • Delete ShoppingMall Language
    • Menu item
      • List Scraped Menu Items
      • Show Scraped Menu Item
      • Add Scraped Menu Item
      • Update Scraped Menu Item
      • Delete Scraped Menu Item
  • Files
    • Introduction
    • Uploading a file
    • Uploads
      • Start Upload
      • Upload Part
      • Finish Upload
      • Activate Uploaded File
      • Upload status
    • Upload from URL
      POST
    • List File Records
      GET
    • Destroy File Records
      DELETE
  • Receipts
    • Introduction
    • Loyalty Club Configuration
    • Receipt Submissions
    • Show Receipts Configuration
    • Update Receipts Configuration
    • Show Receipt Submission
    • Update Receipt Submissions
    • List Receipt Submissions
  • Automation
    • Overview
    • Workflow Model
    • Action Model
    • WorkflowGroup Model
    • Workflow Groups
      • List Workflow Groups
      • Show Workflow Group
      • Create Workflow Group
      • Update Workflow Group
      • Archive Workflow Group
      • Restore Workflow Group
      • Destroy Workflow Group
    • Workflows
      • List Workflows
      • Show Workflow
      • Archive Workflow
      • Restore Workflow
      • Update Workflow
      • Create Workflow
      • Destroy Workflow
    • Workflow Actions
      • Update Workflow Action
      • Destroy Workflow Action
      • Create Workflow Action
      • Validate Workflow Action
    • List Member Event Types
  • Messaging History
    • Messages List v2
    • Messages List
  • AttendanceChallenge
    • Edition model
    • Editions
      • List Editions
      • Show Edition
      • Create Edition
      • Update Edition
  1. Files

Uploading a file

File Upload#

Upload files to MPC Files directly to storage using a multipart upload. Your client asks the Files API to start an upload, gets a pre-signed URL for each part, sends the bytes straight to storage, and then tells the Files API to finish. File bytes never pass through the Files API, so large files upload quickly and reliably.
The same flow is used by MPC users, backend-to-backend integrations and member-facing apps.

Overview#

StepCallPurpose
1POST /v1/files/upload/startRegister the file and receive a file_handle
2POST /v1/files/upload/part/{part_number}Get a pre-signed URL for one part (repeat per part)
3PUT {presigned_url}Upload the part's bytes directly to storage and keep the returned ETag
4POST /v1/files/upload/finishAssemble the parts into the final file (optionally activate it)
5GET /v1/files/upload/status(Optional) Poll processing status and get a preview URL
6POST /v1/files/upload/activateActivate the file, if it wasn't activated in step 4

Before you start#

Authentication. All Files API calls require the standard MPC authentication. Your credentials must be allowed to upload the given file_type; otherwise start returns 403 Forbidden.
Splitting the file into parts.
Every part except the last must be at least 5 MiB. The last part can be any size.
A part can be at most 5 GiB, and a file can have at most 10,000 parts.
Files smaller than 5 MiB are uploaded as a single part (part_number = 1).
Part numbers start at 1 and must be consecutive.
Parts can be uploaded in parallel and in any order.
Browser clients. Read the ETag response header from each PUT to storage — you need it to finish the upload.

File lifecycle#

StatusMeaning
upload_in_progressUpload started; parts are being uploaded
completingfinish was called; parts are being assembled
completedFile is stored but not yet active
activeFile is active and ready to use

1. Start the upload#

POST /v1/files/upload/start
Registers the file and opens a multipart upload.

Request body#

FieldTypeRequiredDescription
file_typestringYesType of file in MPC. Determines permissions and validation rules.
filenamestringYesOriginal file name, e.g. receipt.jpg.
mimetypestringYesMIME type, e.g. image/jpeg.
sizeintegerYesTotal file size in bytes.
file_identifierstringNoID of the object the file belongs to. Can also be set in finish or activate.
file_subidentifierstringNoAdditional identifier of the object the file belongs to.
{
  "file_type": "receipt",
  "filename": "20240927_164634.jpg",
  "mimetype": "image/jpeg",
  "size": 312077,
  "file_identifier": "12345"
}

Response 200 OK#

FieldTypeDescription
file_handlestringUnique, 32-character identifier of the file. Use it in every following call.
{
  "file_handle": "q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u"
}

Errors#

StatusWhen
400 / 422Missing or invalid field (e.g. unsupported mimetype, size above the limit for this file_type)
401Missing or invalid credentials
403Not permitted to upload this file_type

2. Get a pre-signed URL for a part#

POST /v1/files/upload/part/{part_number}
Returns a pre-signed URL and the headers to use when uploading one part to storage. Call it once per part.

Path parameters#

ParameterTypeDescription
part_numberintegerPart number, from 1 to 10000.

Request body#

FieldTypeRequiredDescription
file_handlestringYesValue returned by start.
sizeintegerYesSize of this part in bytes.
md5stringYesBase64-encoded MD5 digest of this part's bytes. Storage rejects the part if it doesn't match.
{
  "file_handle": "q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u",
  "size": 312077,
  "md5": "dqt0LFjuwom3N7+rgvhTIg=="
}

Response 200 OK#

FieldTypeDescription
urlstringPre-signed URL to PUT the part to. The URL expires after a short time; request a new one if it does.
headersobjectHeaders you must send, unchanged, with the PUT.
partintegerPart number this URL is for.
{
  "url": "https://<bucket>.s3.eu-central-1.amazonaws.com/<key>?partNumber=1&uploadId=...&X-Amz-Signature=...",
  "headers": {
    "Content-MD5": "dqt0LFjuwom3N7+rgvhTIg==",
    "Content-Type": "image/jpeg"
  },
  "part": 1
}

Errors#

StatusWhen
404Unknown file_handle
422Invalid part_number, size or md5, or the upload is no longer in progress

3. Upload the part to storage#

PUT {url}
Send the raw bytes of the part to the url from step 2, with all headers from step 2. Do not add an Authorization header — authorization is in the URL.
A successful upload returns 200 OK with an ETag response header, for example:
ETag: "76ab742c58eec289b737bfab82f85322"
Store the ETag (including the quotes) together with the part number. If the upload fails, retry the same part — get a new URL if the old one has expired.

4. Finish the upload#

POST /v1/files/upload/finish
Tells the Files API that all parts are uploaded. The parts are assembled asynchronously; the file moves to completing and then to completed (or active, if activate is true).

Request body#

FieldTypeRequiredDescription
file_handlestringYesValue returned by start.
partsarrayYesEvery uploaded part, sorted by part_number.
parts[].part_numberintegerYesPart number.
parts[].etagstringYesETag returned by storage for this part.
activatebooleanNoActivate the file as soon as it's completed. Default false. Requires file_identifier to be set.
file_identifierstringNoSets or overrides the value given in start.
file_subidentifierstringNoSets or overrides the value given in start.
{
  "file_handle": "q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u",
  "activate": true,
  "file_identifier": "12345",
  "parts": [
    { "part_number": 1, "etag": "\"76ab742c58eec289b737bfab82f85322\"" }
  ]
}

Response 202 Accepted#

{
  "file_handle": "q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u",
  "status": "completing"
}

Errors#

StatusWhen
404Unknown file_handle
422Missing or invalid parts, or the upload was already finished

5. Check upload status (optional)#

GET /v1/files/upload/status?file_handle={file_handle}
Use it to wait until the file is ready after finish. Poll with a back-off (e.g. every 1–2 seconds).

Query parameters#

ParameterTypeRequiredDescription
file_handlestringYesValue returned by start.

Response 200 OK#

FieldTypeDescription
statusstringOne of upload_in_progress, completing, completed, active. See File lifecycle.
urlstring | nullURL to fetch the file, e.g. for a preview. Available once the file is completed.
{
  "status": "completed",
  "url": "https://<files-cdn>/q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u"
}

6. Activate the file#

POST /v1/files/upload/activate
Activates a completed file. Not needed if you sent "activate": true in finish.

Request body#

FieldTypeRequiredDescription
file_handlestringYesValue returned by start.
file_identifierstringNo*Sets or overrides the stored value. *Required if it wasn't set in start or finish.
file_subidentifierstringNoSets or overrides the stored value.
{
  "file_handle": "q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u",
  "file_identifier": "12345"
}

Response 200 OK#

{
  "file_handle": "q8ZkT3mVn0aX7pLr2cYbH5wEjF9sGd1u",
  "status": "active"
}

Errors#

StatusWhen
404Unknown file_handle
422file_identifier is not set on the file
422Upload is not completed yet — check status and retry

Full example (JavaScript)#

Troubleshooting#

ProblemCause and fix
Storage returns 403 SignatureDoesNotMatchHeaders sent with the PUT differ from the ones returned in step 2. Send them exactly as returned.
Storage returns 400 BadDigestmd5 doesn't match the bytes sent. Compute it over exactly the bytes of that part.
Storage returns 403 Request has expiredThe pre-signed URL expired. Request a new one for the same part.
ETag is null in the browserThe response header isn't readable by your script. Contact MPC support.
finish returns 422A part is missing, too small (under 5 MiB and not the last), or an ETag is wrong.
activate returns 422Set file_identifier, or wait for status completed.
Previous
Introduction
Next
Start Upload
Built with