POST
/
{environmentId}
/
storage
curl --request POST \
  --url https://app.formbricks.com/api/v2/client/{environmentId}/storage \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "surveyId": "cm7pr0x2y004o192zmit8cjvb",
  "fileName": "example.jpg",
  "fileType": "image/jpeg"
}'
{
  "data": {
    "signedUrl": "http://localhost:3000/api/v1/client/cm1ubebtj000614kqe4hs3c67/storage/local",
    "signingData": {
      "signature": "3e51c6f441e646a0c9a47fdcdd25eee9bfac26d5506461d811b9c55cbdd90914",
      "timestamp": 1741693207760,
      "uuid": "f48bcb1aad904f574069a253388024af"
    },
    "updatedFileName": "halle--fid--b153ba3e-6602-4bb3-bed9-211b5b1ae463.jpg",
    "fileUrl": "http://localhost:3000/storage/cm1ubebtj000614kqe4hs3c67/private/halle--fid--b153ba3e-6602-4bb3-bed9-211b5b1ae463.jpg"
  }
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Path Parameters

environmentId
string
required

The ID of the environment.

Body

application/json

Response

200
application/json
OK - Returns the signed URL, signing data, updated file name, and file URL.

The response is of type object.