Zeptomail API with invoice attachment

Zeptomail API with invoice attachment

I am unbale to figureout the API request (PHP) with attachment of order invoice pdf file.  My code sample below - 

  1. $base64_attFile = chunk_split(base64_encode(file_get_contents($attFile)));

    "from": { "address": "admin@example.com", "name": "example.com"},
    "to": [{"email_address": {"address": "customer@gmail.com","name": "Customer Name"}}],
    "reply_to": {"address": "seller@example.com", "name": "Seller Name"},
    "subject":"Order Confirmation",
    "attachments": { "content": "'.$base64_attFile.' ", "mime_type": "application/pdf", "name": "myinvoice.pdf"},
    "htmlbody":"<div><b> Test email sent successfully. </b></div>",
    }'
But getting error as follows - 

  1. {"error":{"code":"TM_3301","details":[{"code":"SM_101","message":"Invalid value format","target":"attachments"}],"message":"Bad Syntax"}}

Kindly help me to fix it.