Skip to main content
POST
/
files
/
temporary-upload
Upload an image, video, audio or document. You can use the return object directly when creating a new message. An internal UUID will be generated. This UUID will be used instead of providing a public URL to a file. You can use the URL field, which is reachable from public, for use in Whatsapp templates. Depending on the given type, mime type validation will take place. File will be stored for a maximum of 24 hours. Special: images will be downsized to 1500px (each side, respecting aspect ratio) to maintain file size limits when sending to external services (e.g. WhatsApp limits images to 5MB). Special: videos of type video/quicktime (usually from iOS) will be converted to mp4.
curl --request POST \
  --url https://1-some-client.some-server.healvi-chat/third-party/v1/files/temporary-upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form type=image \
  --form file=@example-file
{
  "internal_uuid": "<string>",
  "url": "<string>",
  "name": "<string>",
  "type": "<string>",
  "mime_type": "<string>",
  "size": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
type
enum<string>
Available options:
image,
video,
audio,
document
file
file

Response

200 - application/json

Success

internal_uuid
string

Internal identifier which will be used when creating a new message.

url
string

Public reachable URL.

name
string

Name of uploaded file.

type
string

Type of uploaded file (specified on upload).

mime_type
string

Mime type of uploaded file.

size
integer

Size in bytes of uploaded file.