/v1/meGet authenticated API key details
Returns the authenticated public API key summary and client identity.
curl -X GET "https://api.mortgageguidelines.com/v1/me" \
-H "Authorization: Bearer mgapi_live_your_key_here"const response = await fetch("https://api.mortgageguidelines.com/v1/me", {
headers: {
Authorization: "Bearer mgapi_live_your_key_here",
},
});
const data = await response.json();{
"request_id": "req_9b8f0b5fcb5b4eaa",
"key": {
"id": "pak_test",
"name": "Example Lender Production",
"status": "active",
"scopes": [
"chat:read",
"chat:write",
"sources:read"
],
"last_four": "test",
"client": {
"name": "Example Lender",
"organization": "Example Mortgage Company"
}
}
}Response bodies
200 response schema
{
"request_id": "req_9b8f0b5fcb5b4eaa",
"key": {
"id": "pak_test",
"name": "Example Lender Production",
"status": "active",
"scopes": [
"chat:read",
"chat:write",
"sources:read"
],
"last_four": "test",
"client": {
"name": "Example Lender",
"organization": "Example Mortgage Company"
}
}
}{
"type": "object",
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"description": "Unique request identifier returned by the API.",
"example": "req_9b8f0b5fcb5b4eaa"
},
"key": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"example": "pak_test"
},
"name": {
"type": "string",
"minLength": 1,
"example": "Example Lender Production"
},
"status": {
"type": "string",
"enum": [
"active",
"revoked"
],
"example": "active"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"chat:read",
"chat:write",
"sources:read"
]
},
"last_four": {
"type": "string",
"minLength": 1,
"example": "test"
},
"client": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"example": "Example Lender"
},
"organization": {
"type": "string",
"example": "Example Mortgage Company"
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"required": [
"id",
"name",
"status",
"scopes",
"last_four",
"client"
]
}
},
"required": [
"request_id",
"key"
]
}401 response schema
{
"error": {
"code": "invalid_request",
"message": "Invalid request body",
"request_id": "req_9b8f0b5fcb5b4eaa"
}
}{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"invalid_request",
"unauthorized",
"forbidden",
"not_found",
"rate_limited",
"idempotency_conflict",
"identity_conflict",
"team_not_found",
"team_archived",
"team_in_use",
"upstream_error",
"internal_error"
]
},
"message": {
"type": "string",
"description": "Human-readable error message.",
"example": "Invalid request body"
},
"request_id": {
"type": "string",
"minLength": 1,
"description": "Unique request identifier returned by the API.",
"example": "req_9b8f0b5fcb5b4eaa"
}
},
"required": [
"code",
"message",
"request_id"
]
}
},
"required": [
"error"
]
}429 response schema
{
"error": {
"code": "rate_limited",
"message": "API key rate limit exceeded",
"request_id": "req_9b8f0b5fcb5b4eaa"
}
}{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"invalid_request",
"unauthorized",
"forbidden",
"not_found",
"rate_limited",
"idempotency_conflict",
"identity_conflict",
"team_not_found",
"team_archived",
"team_in_use",
"upstream_error",
"internal_error"
]
},
"message": {
"type": "string",
"description": "Human-readable error message.",
"example": "Invalid request body"
},
"request_id": {
"type": "string",
"minLength": 1,
"description": "Unique request identifier returned by the API.",
"example": "req_9b8f0b5fcb5b4eaa"
}
},
"required": [
"code",
"message",
"request_id"
]
}
},
"required": [
"error"
]
}500 response schema
{
"error": {
"code": "internal_error",
"message": "Internal server error",
"request_id": "req_9b8f0b5fcb5b4eaa"
}
}{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"invalid_request",
"unauthorized",
"forbidden",
"not_found",
"rate_limited",
"idempotency_conflict",
"identity_conflict",
"team_not_found",
"team_archived",
"team_in_use",
"upstream_error",
"internal_error"
]
},
"message": {
"type": "string",
"description": "Human-readable error message.",
"example": "Invalid request body"
},
"request_id": {
"type": "string",
"minLength": 1,
"description": "Unique request identifier returned by the API.",
"example": "req_9b8f0b5fcb5b4eaa"
}
},
"required": [
"code",
"message",
"request_id"
]
}
},
"required": [
"error"
]
}