Skip to main content

PUT Method on Blog Posts API Example

Hi, i am reading the "Create Endpoint" article in the API documentation guide. I can't make   the Post request work.
Could you provide a php code where i can see how to create the body for the request?

I'm using this code:

$fetch = $client->fetch($baseApiUrl . '/api/v1/sites/johndoe/pages/blogs/1/posts/', $parameters = array($json_body), 'POST', array(
"Content-Type" => "application/json",
"x-li-format" => "json"

I get this message: "invalid_json".


Thanks in advance!!

Official response from submitted

Showing 4 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.