---
title: "List API keys"
description: "Never returns the secret."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/organization/list-api-keys"
---
# List API keys

> Never returns the secret.

<api-operation method="GET" path="/v1/api_keys">
<template v-slot:docs="">

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        list
      </code>
      
      . One of <code>
        list
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The rows on this page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The api key's id (key_…).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The key's name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.prefix
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The first characters of the key, so you can recognize it. The full key is shown only once, when you create it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.livemode
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        live
      </code>
      
       for a live key, <code>
        test
      </code>
      
       for a test key. One of <code>
        test
      </code>
      
      , <code>
        live
      </code>
      
      , <code>
        all
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.scope
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      What the key can do: <code>
        read
      </code>
      
       or <code>
        write
      </code>
      
      . One of <code>
        read
      </code>
      
      , <code>
        write
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.secret
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Returned once at creation only.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.last_used_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the key was last used (ISO-8601 UTC), or null.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.created_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the api key was created (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.revoked_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the key was revoked (ISO-8601 UTC), or null.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.expires_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the key stops working (ISO-8601 UTC), or null if it never expires.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.permissions
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The key's permission map. Null: the key works by its scope.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Success
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/api_keys" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</template>

<template v-slot:response="">

```json [200 OK]
{
  "object": "list",
  "data": [
    {
      "object": "api_key",
      "id": "key_XXXXXXXXXXXX01",
      "prefix": "sk_test_AbCd",
      "livemode": "test"
    }
  ]
}
```

</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
