Yes, in addition to managing your Messaging Service in the Console, Twilio offers a Messaging Service API for creating a Service and managing the phone numbers, short codes, and alpha sender IDs associated with the Service.
Check out the API doc here to see sample codes how to create and manage a Messaging Service.
Please note, this API is currently available in Beta.