Check with your local-building-department for regulations and whether you require a license/permit.
Refer to the NEC/National-Electrical-Code,
Wires generally require physical-protection from accidental-contact with people or structures.
Most-electricians would install conduit outside your-building and pull your-wires through it,
or they could use direct-burial-cable excavated sufficiently-deep or concrete/masonry-protected.