How to broadcast a new block When i mine a new block on my pc, how can i broadcast it to other peers, making it included in the blockchain and getting my reward?

Is there any API that provides a function like "sendBlock" or something?

I'm asking it for bitcoin and any other criptocurrency. Ty
What i was looking for is submitblock RPC call.