# Identity

Check who a key or a sign-in acts as, and in which organization.

## GET /v1/me

Get me

```bash
curl -H "x-api-key: $PHI_KEY" https://api.dynophi.com/v1/me
```

### Parameters

| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| details | query | boolean | Optional | false | Also return the user's and the organization's names, read from Clerk. |

Returns 200 or 422.

### 200 response (application/json)

### 200 response fields and schema

```json
{
  "$ref": "#/$defs/MeResponse",
  "$defs": {
    "AutoReloadSummary": {
      "type": "object",
      "required": [
        "enabled",
        "threshold_credits",
        "amount_cents"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "threshold_credits": {
          "type": "integer"
        },
        "amount_cents": {
          "type": "integer"
        }
      }
    },
    "CreditsBlock": {
      "type": "object",
      "required": [
        "allowance",
        "allowance_available",
        "purchased",
        "total_available",
        "reset_at",
        "auto_reload"
      ],
      "properties": {
        "allowance": {
          "type": "integer"
        },
        "allowance_available": {
          "type": "integer"
        },
        "purchased": {
          "type": "integer"
        },
        "total_available": {
          "type": "integer"
        },
        "reset_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "auto_reload": {
          "$ref": "#/$defs/AutoReloadSummary"
        }
      }
    },
    "MeProfile": {
      "type": "object",
      "properties": {
        "user_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "user_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "org_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "org_slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "MeResponse": {
      "type": "object",
      "required": [
        "org_id",
        "user_id",
        "auth_mode",
        "environment",
        "api_version",
        "git_sha",
        "credits"
      ],
      "properties": {
        "org_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "auth_mode": {
          "type": "string",
          "enum": [
            "clerk",
            "static"
          ]
        },
        "environment": {
          "type": "string",
          "enum": [
            "development",
            "staging",
            "production"
          ]
        },
        "api_version": {
          "type": "string"
        },
        "git_sha": {
          "type": "string"
        },
        "credits": {
          "anyOf": [
            {
              "$ref": "#/$defs/CreditsBlock"
            },
            {
              "type": "null"
            }
          ]
        },
        "profile": {
          "anyOf": [
            {
              "$ref": "#/$defs/MeProfile"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

Illustrative response shape. Values are placeholders, not a recorded result.

```json
{
  "org_id": "<value>",
  "user_id": "<value>",
  "auth_mode": "clerk",
  "environment": "development",
  "api_version": "<value>",
  "git_sha": "<value>",
  "credits": {
    "allowance": 0,
    "allowance_available": 0,
    "purchased": 0,
    "total_available": 0,
    "reset_at": "<value>",
    "auto_reload": {
      "enabled": false,
      "threshold_credits": 0,
      "amount_cents": 0
    }
  },
  "profile": {
    "user_name": "<value>",
    "user_email": "<value>",
    "org_name": "<value>",
    "org_slug": "<value>"
  }
}
```


---
Source: https://dynophi.com/docs/api/identity. From phi-api 0.2.2, 2026-11-23.
