add API functionality, background jobs setup