> ## Documentation Index
> Fetch the complete documentation index at: https://help.impactu.colav.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Update API key expiration

> Updates the expiration date of the user's existing API key.

> [!NOTE]
>
> The authenticated user can only modify their own API key. If they don't
> have one yet, it returns `404`: create it first with
> [Generate API key](https://help.impactu.colav.co/en/api-reference/users/create-apikey.md).

## Path parameters

**email** `string` *required*

User's email address. It must match the authenticated user.

## Request body

**expires** `integer`

New expiration date in Unix seconds, as an integer. It must be a
future date at least 1 day ahead. If omitted, the API key has no
expiration.

## Response

**success** `boolean`

`true` if the expiration was updated successfully.

**msg** `string`

Confirmation or error message.

```json 200 theme={null}
{ "success": true, "msg": "Expiración del API key actualizada" }
```

```json 400 theme={null}
{ "success": false, "msg": "La expiración mínima del API key es de 1 día" }
```

```json 401 theme={null}
{"msg": "Token no proporcionado o inválido. Por favor, inicia sesión nuevamente.", "success": false}
```

```json 403 theme={null}
{ "success": false, "msg": "No tienes permiso para gestionar el API Key de otro usuario." }
```

```json 404 theme={null}
{ "success": false, "msg": "Usuario usuario@example.com no encontrado o sin API key" }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.