Describe the steps required to create an API in a programming language.