API for registering a application?

You cannot.