import { ByteFlow } from "@byteflow-inc/sdk"

const sdk = new ByteFlow("YOUR_API_KEY_HERE")

await sdk.sendMessageWithMedia({
    message_content: "Hello, World!",
    destination_number: "+11234567890",
    mediaPath: "<full_path_to_file_here>"
})

This endpoint works by first getting a pre-signed upload URL from our server and then using that to upload your file. Once that has been completed it calls the send message endpoint and appends the file URL to the message_content

Body

The body of the function call.

message_content
string

The content of the message that was sent

destination_number
string

The phone number the message should be sent too

mediaPath
string

Full path to the file you want to send. e.g: ./example/test/example2/xyz/yourfile.png

All media sent will be deleted after 14 days. If this is an issue you can upload your media to an S3 bucket or similar and send the asset URL in your message.