Not sure what you meant but if you already have an API that has a response info, you can just use it, or better to wrap it inside a server action and add a IsSuccess Return and the API response itself. Set the IsSuccess value to true or false depending on the API return if it returns error add an exception handler aswell. on your front end, if you call the API, if it IsSuccess is true then return success message, if error then return error message