To add media attachments to a post or a comment, set the attachments parameter to a JSON array containing attachment objects. Each object has the type field which determines the type of the attachemtn and the rest of the fields:
image – an image file that is not a photo that belongs to a photo album:
file_id– theidreturned by the upload endpoint after uploading the imagefile_hash– thehashfrom the upload endpointtext– an optional caption or alt text for this image
photo – a photo from an album:
photo_id– the identifier of the photo
poll – a poll:
poll_id– the identifier of the poll returned by polls.create