Skip to main content
The API accepts JWT. You get a pair of tokens with the email and password of your AiGenda account and send access with every request.

Get a token

Response 200
The field is called username, but it holds your email.

Send the token

Add this header to every request except getting and refreshing a token:

Token lifetime

Refreshing with refresh returns a new access but does not issue a new refresh. One day after sign-in you can no longer refresh, so the simplest approach is:
  1. Store access and its expiration time. It is in the exp field inside the token (Unix time in seconds).
  2. When less than a day is left before exp, or the API responds with 401, get a new pair with email and password.
  3. Retry the original request once with the new token.
Token expiration

Errors

Do not store the password in code or in the repository. Pass it through environment variables or your platform’s secret store.
Do you sign in to the cabinet with Google? Such an account may have no password. Set one on the password recovery page, and API sign-in will work.
Last modified on October 17, 2026