# Who am I (https://docs-ecmrhub-v2.lucaspiera.com/docs/api/connections/whoami)

## POST /rest/v1/rpc/whoami

Who am I

The kind of caller (user, apikey or connection), its company, permissions and, for a connection or an API key, whether its writes wait for a person's approval.

```json
{
  "operationId": "whoami",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {}
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "user",
                  "apikey",
                  "connection"
                ]
              },
              "tenantId": {
                "type": "string",
                "format": "uuid"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "member"
                ]
              },
              "keyId": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "permissions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "documents:read",
                    "documents:write",
                    "library:read",
                    "library:write",
                    "signing:links",
                    "tracking:manage"
                  ]
                }
              },
              "expiresAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "connectionId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "clientId": {
                "type": "string"
              },
              "requireApproval": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "tenantId",
              "permissions"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "default": {
      "$ref": "#/components/responses/Problem"
    }
  }
}
```

Schemas referenced as `#/components/...` are in the full contract: https://docs-ecmrhub-v2.lucaspiera.com/openapi.json