Modifying WordPress XML-RPC Built-Ins

Figured it out.

$post_obj['permalink'] = my_getDraftPermalink( $post_obj['post_id'] );

That’s the correct syntax for getting the post_id. Then a custom function that gets the permalink the same way as the post dashboard UI is required. The dashboard uses get_sample_permalink and not get_permalink, which will return the draft path if the post isn’t live.

function my_getDraftPermalink ( $post_id ) {
    require_once ABSPATH . '/wp-admin/includes/post.php';

    list( $permalink, $postname ) = get_sample_permalink( $post_id );

    return str_replace( '%postname%', $postname, $permalink );
}