Create new post with meta data using WordPress API

You need to register your meta field first, then you can insert / update it into a post using rest api. https://codex.wordpress.org/Function_Reference/register_meta

$object_type="post";
$args1 = array(
    'type' => 'string', 
    'description' => 'My Meta Key Description',
    'single' => true,
    'show_in_rest' => true,
    );
register_meta( $object_type, 'MyMetaKey', $args1 );

Hope it helps

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)