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

# Check your credentials

GET https://api.confirm.global/partner/v1/whoami

Returns the partner your key belongs to, the environment it is bound to,
and every registry it can reach. No side effects.

The fastest way to confirm a key works and is pointed at the right
environment — worth making the first call in any integration, and the
first thing to try when something 401s or 403s.


Reference: https://docs.confirm.global/partner-api/organizations/whoami

## Authentication

- `Authorization` header (bearer token, required) — Partner API key sent as `Authorization: Bearer cfk_...`. Keys are partner-level — one key reaches every registry linked to your partner account and nothing else. CONFIRM issues and revokes them; a key is shown exactly once at creation because only its hash is stored, and revocation takes effect on the next request. Develop against the sandbox base URL with a sandbox key, where telephony is restricted to an allowlist you provide.

## Response

### 200

The identity behind this key.

- `partner` (string, optional) — Your partner slug.
- `name` (string, optional)
- `environment` (enum, optional) — The environment this key is bound to. A key presented to any other environment is refused with `wrong_environment`.
  - Allowed values: `production`, `sandbox`
- `organizations` (list of WhoamiGetResponsesContentApplicationJsonSchemaOrganizationsItems, optional) — Every registry this key can reach, by your own reference.

## Errors

### 401 Unauthorized Error

Missing, malformed, or revoked API key (`error.type: authentication_error`).

- `error` (ErrorError, required)

### 403 Forbidden Error

The key is valid but bound to a different environment.

- `error` (ErrorError, required)

## Types

### WhoamiGetResponsesContentApplicationJsonSchemaOrganizationsItems

- `external_ref` (string, optional)

### ErrorError

- `type` (enum, required) — Broad error category.
  - Allowed values: `authentication_error`, `invalid_request_error`, `not_found_error`, `conflict_error`, `rate_limit_error`, `api_error`
- `code` (string, required) — Machine-readable error code, e.g. `invalid_request`, `unknown_location_ref` or `wrong_environment`. Branch on this; the strings are contract.
- `message` (string, required) — Human-readable explanation.
- `request_id` (string, required) — Identifier for this request — the same value as the response's `X-Request-Id` header. Include it when contacting CONFIRM support.
- `details` (list of ErrorErrorDetailsItems, optional) — Present on `invalid_request` (400): one entry per field that failed validation.
- `location_ref` (string, optional) — Present on `unknown_location_ref` (404) — the reference that wasn't found.
- `organization_ref` (string, optional) — Present on `unknown_organization_ref` (404) — the reference that wasn't found — and on `email_has_account` (409) — the registry the invitation was for.
- `external_ref` (string, optional) — Present on workspace-teardown refusals (403) — the workspace you asked to delete — and on applicant errors (`unknown_candidate_ref`, `no_application_at_location`, `outcome_conflict`) — the applicant ref.
- `organization_refs` (list of string, optional) — Present on `ambiguous_location_ref` (409) — the registries the ref exists in.
- `locations` (list of ErrorErrorLocationsItems, optional) — Present on `location_refs_span_organizations` (400) — each ref you sent with the registry it belongs to.

### ErrorErrorDetailsItems

- `field` (string, required) — Dotted path to the offending field, e.g. `address.postal_code`.
- `message` (string, required) — Why that field was rejected.

### ErrorErrorLocationsItems

- `location_ref` (string, optional)
- `organization_ref` (string, optional, nullable)

## Examples

**Response**

```json
{
  "partner": "carelink",
  "name": "CareLink",
  "environment": "sandbox",
  "organizations": [
    {
      "external_ref": "cl_biz_4471"
    },
    {
      "external_ref": "cl_biz_5522"
    }
  ]
}
```

**SDK Code**

```python whoami
import requests

url = "https://api.confirm.global/partner/v1/whoami"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript whoami
const url = 'https://api.confirm.global/partner/v1/whoami';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go whoami
package main

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

func main() {

	url := "https://api.confirm.global/partner/v1/whoami"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.confirm.global/partner/v1/whoami")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.get("https://api.confirm.global/partner/v1/whoami")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.confirm.global/partner/v1/whoami', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp whoami
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/whoami");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift whoami
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/whoami")! 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()
```