Sending a PDF file to a WhatsApp recipient from a Win64 VCL program

Does anyone have a sample code for sending a PDF file to a WhatsApp recipient from a Win64 VCL program? I’m using Delphi RIO 10.3
Thank you in advance

This is the relevant code from the WhatsApp decumentation:
Step1: Upload media to cloud API.

curl -X POST \
  'https://graph.facebook.com/v15.0/FROM_PHONE_NUMBER_ID/media' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -F 'file=@/local/path/file.jpg;type=image/jpeg' 
  -F 'messaging_product=whatsapp'

A successful response includes an object with an identifier for the media:
{
“id”:“ID”
}

Step 2: Send message using media ID.

curl -X  POST \
 'https://graph.facebook.com/v15.0/FROM-PHONE-NUMBER-ID/messages' \
 -H 'Authorization: Bearer ACCESS_TOKEN' \
 -H 'Content-Type: application/json' \
 -d '{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "PHONE-NUMBER",
  "type": "image",
  "image": {
    "id" : "MEDIA-OBJECT-ID"
  }
}'