Skip to main content
POST
/
api
/
v2
/
browser-profiles
/
initiate-upload
Initiate a profile upload
curl --request POST \
  --url https://agp.eu.hcompany.ai/api/v2/browser-profiles/initiate-upload \
  --header 'Authorization: Bearer <token>'
{
  "profile_id": "<string>",
  "upload_url": "<string>",
  "upload_fields": {},
  "upload_expires_in": 123
}
Starts the profile upload flow. Returns a presigned upload target so you can send the profile archive directly to object storage, and the bytes never pass through the Agent API. No request body is required. After uploading the archive, call Complete upload with the returned profile_id to finalize the profile. Returns 200 with the presigned upload target.
upload_url and upload_fields are passed through from object storage unchanged, so send them exactly as returned, with the file as the last form field. They expire after upload_expires_in seconds.

Response

profile_id
string
Id (UUID) reserved for the profile. Pass it to Complete upload.
upload_url
string
Presigned object-storage URL to POST the archive to.
upload_fields
object
Form fields that must accompany the upload, sent before the file as multipart/form-data.
upload_expires_in
integer
Seconds until the presigned target expires.

Examples

curl -X POST https://agp.eu.hcompany.ai/api/v2/browser-profiles/initiate-upload \
  -H "Authorization: Bearer $HAI_API_KEY"
Response
{
  "profile_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "upload_url": "https://storage.eu.hcompany.ai/browser-profiles",
  "upload_fields": {
    "key": "browser-profiles/pending/org_123/a1b2c3d4-5678-90ab-cdef-1234567890ab/profile.zip",
    "Content-Type": "application/zip",
    "x-amz-checksum-algorithm": "SHA256",
    "tagging": "<Tagging><TagSet><Tag><Key>status</Key><Value>pending</Value></Tag></TagSet></Tagging>",
    "bucket": "browser-profiles",
    "policy": "eyJ...",
    "x-amz-algorithm": "AWS4-HMAC-SHA256",
    "x-amz-credential": "AKIA.../20260206/eu-west-1/s3/aws4_request",
    "x-amz-date": "20260206T000000Z",
    "x-amz-signature": "abcd1234"
  },
  "upload_expires_in": 3600
}