Stuck with wp_remote_post sending data to an external api on user registration

I recommend only setting the arguments you absolutely need to change from defaults, to eliminate potential issues while testing. It’s best to only add additional arguments as they are needed.

All arguments can be found here:
https://developer.wordpress.org/reference/classes/WP_Http/request/

If possible also remove the required authentication at first to just test the POST before adding in security/authentication.

You also don’t need to close a function with a semicolon ;

I recommend looking up how to setup xdebug so you can debug your code locally, if you can’t do that, then I recommend using error_log to log to your hosting providers error log, so you can see what the response is.

You also set blocking to false, do you not want a response from the server?

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
    die;
}

//Find the details of a new user

add_action('user_register', 'send_doqaru_user', 10, 1);

function send_doqaru_user ($user_id){

    $new_doqaru_user = get_userdata($user_id);
    $doqaru_user_email = $new_doqaru_user -> user_email;

    // get all the meta data of the newly registered user
    $new_user_data = get_user_meta($user_id);

    // get the first name of the user as a string
    $doqaru_user_firstname = get_user_meta( $user_id, 'first_name', true );
    $doqaru_user_lastname = get_user_meta( $user_id, 'last_name', true );


    if( ! $new_user ){
        error_log( 'Unable to get userdata!' );
        return;
    }

    $url="https://api.capsulecrm.com/api/v2/parties";
    $body = array(
        'type' => 'person',
        'firstName' => $doqaru_user_firstname,
        'lastName' => $doqaru_user_lastname,
        'emailAddresses'     => array(
            'type' => 'Work',
            'address' => $new_user->user_email

    ));

    $args = array(
        'method'      => 'POST',
        'timeout'     => 45,
        'sslverify'   => false,
        'headers'     => array(
            'Authorization' => 'Bearer {token goes here}',
            'Content-Type'  => 'application/json',
        ),
        'body'        => json_encode($body),
    );

    $request = wp_remote_post( $url, $args );

    if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {
        error_log( print_r( $request, true ) );
    }

    $response = wp_remote_retrieve_body( $request );
}