POST
/
{environmentId}
/
storage
/
local
curl --request POST \
  --url https://app.formbricks.com/api/v2/{environmentId}/storage/local \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "surveyId": "survey123",
  "fileName": "example.jpg",
  "fileType": "image/jpeg",
  "signature": "signedSignatureValue",
  "uuid": "uniqueUuidValue",
  "timestamp": "1627891234567",
  "fileBase64String": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/..."
}'
{
  "message": "File uploaded successfully"
}

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
surveyId
string
required

The ID of the survey associated with the file.

fileName
string
required

The URI encoded file name.

fileType
string
required

The MIME type of the file.

signature
string
required

Signed signature for verifying the file upload.

uuid
string
required

Unique identifier used in the signature validation.

timestamp
string
required

Timestamp used in the signature validation.

fileBase64String
string
required

Base64 encoded string of the file. It should include data type information, e.g. "data:<mime-type>;base64,<base64-encoded-data>".

Response

200
application/json
OK - File uploaded successfully.
message
string

Success message.

Was this page helpful?