Added response to return for the pin_api() function