Stop a particular from Logging work in tempo using REST API

We want to create a system where based on certain conditions we make a REST API call and disallow user from logging work into tempo.

Is there a way we can achieve this using JIRA or Tempo REST APIs?