ADMIN API Uploading File issue


I have created the admin API key and successfully created the new post. But I am now facing the problem of uploading any file. Not the Image it can be xls, pdf, csv. Please check below the code I used for creating a post. I had passed the file parameter but it is not working.

$headers = [
'Authorization: Ghost ’ . $token,
‘Content-Type: application/json’,
‘Accept-Version: v3.0’,
$payload = json_encode([‘posts’ => [[‘title’ => ‘Hello sgdfg’, ‘html’ => ‘

My post content. Work in progress…


Any help is highly appreciated.

What is the returned error message?

1 Like

I fixed it @ngeorger

1 Like