What does a 401 response code mean?

Quite simply, if you get a 401 response, it probably means your authorization token has expired. The token will automatically expire after 12 hours. You can get a new authorization token for your ‘write’ tasks as often as you like, but for more efficient use of the Logware API, we recommend you cache your token for 12 hours. If you get a 401 response, simple request a new token and initiate your request again.

If you are interested in the design of this API, it closely follows the pattern found here.