uploaded_media

Step 1 of the presigned upload flow: reserves a pending image and returns a presigned URL to POST the file to directly, bytes never pass through this API. Call complete_upload with the returned id once the upload finishes.

post/api/projects/{project_id}/uploaded_media/start_upload/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/uploaded_media/start_upload/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

namestring required

The file's display name, e.g. 'logo.png'.

purposestring required

Library to add this image to once uploaded, e.g. 'email'.

Response

idstring uuid required

Id of the pending upload — pass this to complete_upload.

upload_urlstring uri required

POST the image file here as multipart/form-data.

form_fieldsobject required

Extra form fields to send alongside the file in the same POST.

expires_ininteger required

Seconds before upload_url expires.

Changes

No recorded changes to this operation across all 1 revision of this API.