In your `get_result()` example, the caller won't be able obtain the address of the new allocation in case the callee allocates. The pointer itself is passed by value and any modifications on it by the callee are done on a local copy. If the function was allocating, it would require a double pointer like so:
int get_result(my_api_t api, api_result_t **result);
...
api_result_t *result;
get_result(api, &result);
A lot of confusion comes when API and library authors start typedef-ing pointer types into opaque types like that: typedef api_result_t *API_RESULT;
...
API_RESULT res;
&res; // is this a single or a double pointer?
res; // is this a pointer at all?
If you meant that the function could possibly allocate fields of `result`, the API should always have a `free_result()`.