> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.dealsignal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.dealsignal.com/_mcp/server.

# List API keys

GET https://app.dealsignal.com/api/v1/auth/api_keys

Returns the authenticated user's current API key metadata along with any
rolled-away previous keys still inside their individual grace windows.

Plaintext keys are never returned — use this endpoint to track which keys
you have minted and when each one expires.


Reference: https://docs.dealsignal.com/api-reference/authentication/list-api-keys

## Request

### Query parameters

- `api_key` (string, required) — Your Dealsignal API key. Obtain it from the Dealsignal dashboard.

## Response

### 200

Current and previous API keys.

- `current` (ApiKeyListResponseCurrent, optional)
- `previous` (list of PreviousApiKey, optional) — Rolled-away keys still inside their grace windows, ordered by `expires_at` ascending.

## Errors

### 401 Unauthorized Error

Invalid key, inactive account, or expired subscription.

- `message` (string, required)
- `authorization_failure` (boolean, optional)
- `inactive` (boolean, optional)

## Types

### ApiKeyListResponseCurrent

- `expires_at` (datetime, optional, nullable) — Recommended rotation date for the current key — two months after it was minted or last rolled. It is a reminder, not an expiry: the key keeps working after this date until you roll it. `null` when no date is recorded.

### PreviousApiKey

A previously-current API key that is still inside its grace window. Each rolled-away key has its own independent `expires_at`; multiple previous keys can be active simultaneously. At most five stay active: a roll beyond that revokes the one closest to its expiry right away.

- `id` (integer, optional)
- `expires_at` (datetime, optional) — When this previous key stops being accepted.
- `created_at` (datetime, optional) — When this key was rolled away from current.

## Examples

**Response**

```json
{
  "current": {
    "expires_at": "2026-07-18T09:00:00Z"
  },
  "previous": [
    {
      "id": 17,
      "expires_at": "2026-05-20T09:00:00Z",
      "created_at": "2026-05-18T09:00:00Z"
    }
  ]
}
```

**SDK Code**

```python Authentication_listApiKeys_example
import requests

url = "https://app.dealsignal.com/api/v1/auth/api_keys"

querystring = {"api_key":"YOUR_API_KEY"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript Authentication_listApiKeys_example
const url = 'https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Authentication_listApiKeys_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Authentication_listApiKeys_example
require 'uri'
require 'net/http'

url = URI("https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Authentication_listApiKeys_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY")
  .asString();
```

```php Authentication_listApiKeys_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY');

echo $response->getBody();
```

```csharp Authentication_listApiKeys_example
using RestSharp;

var client = new RestClient("https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Authentication_listApiKeys_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://app.dealsignal.com/api/v1/auth/api_keys?api_key=YOUR_API_KEY")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```