# API keys

Source: https://timetick.io/docs/developers/api-keys

Create and rotate a TimeTick API key for the SDK, CI or an AI agent, and use it safely.

An API key lets a script, a pipeline or an AI agent work as you. Give each one its own key, so you can remove one without touching the others.

## Create a key

1. Open the account menu in the top-right corner and click **API keys**.
2. Click **Create Key**, name it after the place you will use it, and set an end date if you want one.
3. Click **Submit** and copy the key. You see it only once.

![A new API key is shown once.](../../../assets/screens/screen-api-key-created.png)

## Use it

Save it as a secret named `TIMETICK_API_TOKEN`. The SDK, the CI action and the MCP server read that name. For the API, send it in the `x-api-key` header.

An AI client that you [connect](https://timetick.io/docs/ai/connect) through the browser gets its own key, named after the client. You don't need to create one for it.

Keep keys out of your repository and out of chats.

## Replace a key

If a key leaked or got lost, click the regenerate icon next to it. The old key stops working at once. To remove a key, click the delete icon.
