# Update API key

Tool: `veryfront__update_api_key`

Change an API key's name or expiry.

## Arguments

| Name         | Type           | Required | Description                          |
| ------------ | -------------- | -------- | ------------------------------------ |
| `name`       | string         |          | New name for the API key             |
| `expires_at` | string \| null |          | New expiration date (null to remove) |
| `api_key_id` | string         | Yes      | API key ID                           |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__update_api_key",
    "arguments": {
      "api_key_id": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"string\",\"project_id\":\"string\",\"user_id\":\"string\",\"name\":\"string\",\"key_prefix\":\"string\",\"last_used_at\":\"string\",\"expires_at\":\"string\",\"created_at\":\"string\",\"updated_at\":\"string\",\"status\":\"active\",\"revoked_at\":\"string\",\"scopes\":[\"string\"],\"scope\":\"account\"}"
      }
    ],
    "structuredContent": {
      "id": "string",
      "project_id": "string",
      "user_id": "string",
      "name": "string",
      "key_prefix": "string",
      "last_used_at": "string",
      "expires_at": "string",
      "created_at": "string",
      "updated_at": "string",
      "status": "active",
      "revoked_at": "string",
      "scopes": [
        "string"
      ],
      "scope": "account"
    }
  }
}
```
