The "WordPress API" is a pretty vague (WP got multiple APIs). But from your error it seems that it's a HTTP API problem. There're multiple possible obstacles:
SSL Certificate issues
If you got a problem with your SSL certificate (necessary when the server is a subdomain of the site listed in the SSL certificate; using a wildcard certificate obviates the need for this).
As pointed out in the comments, the problem could also be that your server has out-of-date or missing SSL CA root certificates.
Request problems (WP HTTP API not responding
You think you ain't got
cURL available and the
fsocketopen fallback didn't work out?
First you want to check if the response works out. For this task, you can use two services (where both tell you slightly different details):
Then, as @HameedullahKhan pointed out in his answer, there's a debug filter for the WP HTTP API. This filter runs at the absolute last point of any request, right before giving it back to the developer.
/** Plugin Name: (#28871) Debug WP HTTP API response */
add_action( 'http_api_debug', 'wpse28871_debug_request', 999, 5 );
function wpse28871_debug_request( $response, $type, $class, $args, $url )
printf( '<pre>ResponseData: %s', is_wp_error( $response )
? $response->get_error_code().' '.$response->get_error_message()
printf( '<br />ResponseType: %s', $type );
printf( '<br />ResponseClass: %s', $class );
printf( '<br />ResponseArgs: %s', $args );
printf( '<br />ResponseURl: %s</pre>', $url );
# @TODO Uncomment to exit when debugging AJAX requests
If the above doesn't give you any insights, you can still try to debug the cURL object right after it got built and right before it got fired. This way is pretty unknown, but it has enormous powers when you combine it with above plugin: It tells you if the request has a problem with the cURL args or if it fails later, narrowing down the range of possible problems pretty fast.
/* Plugin Name: (#28871) Debug WP HTTP API cURL arguments */
add_action( 'http_api_curl', 'wpse28871_curl_debug' );
function wpse28871_curl_debug( $handle )
,var_export( curl_getinfo( $handle, CURLINFO_HEADER_OUT ), true ) )