---
title: "Identify the current key"
method: GET
path: "/v1/me"
tags: ["Account"]
---

# Identify the current key

`GET /v1/me`

## Request

- Base URL: `https://api.mails.ai`
- URL: `https://api.mails.ai/v1/me`
- Auth: HTTP bearer

Returns the authenticating API key, its workspace, and its bound agent (if any). Any valid key works — no scope required.

## Response `200`

The current key, workspace, and agent.

- Me
  - `api_key` object, required: The credential that made this request: an API key, or an access token from a connected app such as the mails CLI.
    - `id` string, required: Key id (`key_…`). For an access token from a connected app, such as the mails CLI, the app's grant id (`oag_…`), as `GET /v1/oauth/grants` lists it.
    - `prefix` string: The first 12 characters of the key or token, as key lists show them.
    - `name` string, nullable: The key's name. Null when it has none, and for an access token.
    - `mode` 'live' | 'test', required: `live` or `test`: whether this credential's sends are real. An access token is always `live`.
    - `scopes` string[], required: The scopes this credential holds, such as `send`, `read`, `manage` or `draft`; each endpoint names the scope it needs.
    - `agent_id` string, nullable: The agent (`agt_…`) the key is tied to; null when it may act for every agent. Always null for an access token.
    - `last_used_at` string, nullable: When the key last authenticated a request; it may already show this one. Null before its first recorded use, and for an access token.
    - `created_at` string, nullable: When the key was created (ISO 8601, UTC). Null for an access token.
  - `workspace` object, nullable: The workspace the credential belongs to. Null only if it can no longer be found.
    - `id` string, required: Workspace id (`wsk_…`).
    - `slug` string, required: The workspace's slug: the `<slug>` in its agents' `<name>@<slug>.mails.ai` addresses.
    - `display_name` string: The workspace's display name.
    - `tier` string: The workspace's plan, as `GET /v1/billing/usage` reports it.
    - `tier_status` string: The plan's status, as `GET /v1/billing/usage` reports it: `past_due` means Free plan limits apply until a failed payment goes through.
  - `agent` object, nullable: The agent the key is tied to. Null for a key that may act for every agent, and for an access token.
    - `id` string, required: The agent's id (`agt_…`).
    - `name` string, required: The agent's name: the part of its address before the `@`.
    - `email` string, email, required: The agent's API address. Where people write to it is its `receiving_address` (`GET /v1/agents/{id}`).

## Other responses

- `401`: Missing or invalid API key.
- `500`: Internal server error.

---

[API](https://skmtc.dev/mails/apis/mails-ai-api.md) · [All operations](https://skmtc.dev/mails/apis/mails-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mails/apis/mails-ai-api/revisions/4d4930a8c33b?raw)
