> This page is for Cash App Pay Partner API.

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

# Retrieve API key

GET https://api.cash.app/management/v1/api-keys/{api_key_id}

Retrieves an API key by ID.

**This endpoint is rate limited to 10 QPS.**

Scopes: `API_KEYS_READ`

Reference: https://developers.cash.app/cash-app-pay-partner-api/api-reference/management-api/retrieve-api-key

## Servers

- `https://api.cash.app/management/v1` (Production, default)
- `https://sandbox.api.cash.app/management/v1` (Sandbox)

## Request

### Path parameters

- `api_key_id` (string, required) — ID of the API key.

## Response

### 200

OK

- `api_key` (ApiKey, required)

## Errors

### 404 Not Found Error

Not Found

- `errors` (list of Error, required) — A list of errors that occurred while processing the request. Min number of items: `1`

## Types

### ApiKey

- `id` (string, required) — Unique identifier for this API key issued by Cash App. This is the API key value that is passed in the `Authorization` header.
- `created_at` (datetime, required) — When this API key was created, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
- `expires_at` (datetime, required) — When this API key will be automatically deleted and become unusable, in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) format (UTC).
- `scopes` (list of enum, required) — An array of permissions granted to the API key. Current values: - `API_KEYS_READ`: Permits listing API keys and retrieving individual keys. - `API_KEYS_WRITE`: Permits creating and deleting API keys. - `BRANDS_READ`: Permits listing brands and retrieving individual brands. - `BRANDS_WRITE`: Permits creating, upserting, and updating brands. - `CUSTOMERS_READ`: Permits listing customers and retrieving individual customers. - `DISPUTES_READ`: Permits listing disputes / dispute evidence and retrieving details about individual disputes / dispute evidence. - `DISPUTES_WRITE`: Permits uploading dispute evidence, accepting disputes, and challenging disputes. - `FEE_PLANS_READ`: Permits listing fee plans and retrieving individual fee plans. - `GRANTS_READ`: Permits listing grants for a customer and retrieving individual grants. - `GRANTS_WRITE`: Permits revoking a grant. - `MERCHANTS_READ`: Permits listing merchants and retrieving individual merchants. - `MERCHANTS_WRITE`: Permits creating, upserting, and updating merchants. - `PAYMENTS_READ`: Permits listing payments and retrieving individual payments. - `PAYMENTS_WRITE`: Permits taking payments, capturing payments, and voiding payments. - `PAYOUTS_READ`: Permits listing payouts and retrieving individual payouts. - `PAYOUTS_WRITE`: Permits creating payouts. - `REFUNDS_READ`: Permits listing refunds and retrieving individual refunds. - `REFUNDS_WRITE`: Permits issuing refunds, capturing refunds, and voiding refunds. - `WEBHOOK_CONFIG_READ`: Permits listing webhook delivery settings and retrieving individual configurations. - `WEBHOOK_CONFIG_WRITE`: Permits creating and updating webhook delivery settings. - `WEBHOOK_EVENTS_READ`: Permits listing webhook events and retrieving individual events. Min number of items: `1`
  - Allowed values: `PAYMENTS_READ`, `PAYMENTS_WRITE`, `PAYOUTS_READ`, `PAYOUTS_WRITE`, `REFUNDS_READ`, `REFUNDS_WRITE`, `DISPUTES_READ`, `DISPUTES_WRITE`, `CUSTOMERS_READ`, `FEE_PLANS_READ`, `GRANTS_READ`, `GRANTS_WRITE`, `API_KEYS_READ`, `API_KEYS_WRITE`, `BRANDS_READ`, `BRANDS_WRITE`, `MERCHANTS_READ`, `MERCHANTS_WRITE`, `WEBHOOK_CONFIG_READ`, `WEBHOOK_CONFIG_WRITE`, `WEBHOOK_EVENTS_READ`
- `reference_id` (string, optional) — A user-defined identifier for this API key, typically used to associate the API key with a record in an external system. Min length: `1` Max length: `1024`

### Error

Represents an error encountered during a request to the API.

- `category` (enum, required) — The high-level reason the error occurred
  - Allowed values: `API_ERROR`, `AUTHENTICATION_ERROR`, `BRAND_ERROR`, `DISPUTE_ERROR`, `MERCHANT_ERROR`, `INVALID_REQUEST_ERROR`, `PAYMENT_PROCESSING_ERROR`, `RATE_LIMIT_ERROR`, `WEBHOOK_ERROR`, `API_KEY_ERROR`, `GRANT_ERROR`
- `code` (string, required) — A unique identifier for the specific type of error that occurred. See the Error Code Reference for more information. Min length: `1`
- `detail` (string, optional) — Human-readable description of why the error occurred and how to resolve it. Min length: `1`
- `field` (string, optional) — The field in the request that caused the error, using array and object dot notation. Min length: `1`

## Examples

**Response**

```json
{
  "api_key": {
    "id": "KEY_test_do_not_use",
    "created_at": "2022-01-01T00:00:00Z",
    "expires_at": "2022-02-01T00:00:00Z",
    "scopes": [
      "PAYMENTS_READ"
    ],
    "reference_id": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.cash.app/management/v1/api-keys/api_key_id"

headers = {
    "Accept": "Accept",
    "User-Agent": "User-Agent",
    "X-Region": "X-Region",
    "X-Signature": "X-Signature"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cash.app/management/v1/api-keys/api_key_id';
const options = {
  method: 'GET',
  headers: {
    Accept: 'Accept',
    'User-Agent': 'User-Agent',
    'X-Region': 'X-Region',
    'X-Signature': 'X-Signature'
  }
};

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

```go
package main

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

func main() {

	url := "https://api.cash.app/management/v1/api-keys/api_key_id"

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

	req.Header.Add("Accept", "Accept")
	req.Header.Add("User-Agent", "User-Agent")
	req.Header.Add("X-Region", "X-Region")
	req.Header.Add("X-Signature", "X-Signature")

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

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

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

}
```

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

url = URI("https://api.cash.app/management/v1/api-keys/api_key_id")

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

request = Net::HTTP::Get.new(url)
request["Accept"] = 'Accept'
request["User-Agent"] = 'User-Agent'
request["X-Region"] = 'X-Region'
request["X-Signature"] = 'X-Signature'

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

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

HttpResponse<String> response = Unirest.get("https://api.cash.app/management/v1/api-keys/api_key_id")
  .header("Accept", "Accept")
  .header("User-Agent", "User-Agent")
  .header("X-Region", "X-Region")
  .header("X-Signature", "X-Signature")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cash.app/management/v1/api-keys/api_key_id', [
  'headers' => [
    'Accept' => 'Accept',
    'User-Agent' => 'User-Agent',
    'X-Region' => 'X-Region',
    'X-Signature' => 'X-Signature',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.cash.app/management/v1/api-keys/api_key_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "Accept");
request.AddHeader("User-Agent", "User-Agent");
request.AddHeader("X-Region", "X-Region");
request.AddHeader("X-Signature", "X-Signature");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "Accept",
  "User-Agent": "User-Agent",
  "X-Region": "X-Region",
  "X-Signature": "X-Signature"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cash.app/management/v1/api-keys/api_key_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```