add attend api.