{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/softsync-ai/json-schema/softsync-ai-api-key-response-dto-schema.json",
  "title": "ApiKeyResponseDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/softsync-ai-api-keys-api-openapi.yml#/components/schemas/ApiKeyResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "keyPrefix": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "lastUsedAt": {
      "format": "date-time",
      "type": "string"
    },
    "partner": {
      "$ref": "#/$defs/PartnerDto"
    },
    "info": {
      "$ref": "#/$defs/APIInfoDto"
    }
  },
  "required": [
    "id",
    "label",
    "keyPrefix",
    "createdAt",
    "lastUsedAt"
  ],
  "$defs": {
    "APIInfoDto": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "The ID of the user"
        },
        "email": {
          "type": "string",
          "description": "The email of the user"
        },
        "firstName": {
          "type": "string",
          "description": "User's first name"
        },
        "lastName": {
          "type": "string",
          "description": "User's last name"
        },
        "workspaceId": {
          "type": "string",
          "description": "The ID of the workspace"
        },
        "workspaceName": {
          "type": "string",
          "description": "The name of the workspace"
        }
      },
      "required": [
        "userId",
        "email",
        "workspaceId",
        "workspaceName"
      ]
    },
    "PartnerDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "website": {
          "type": "string"
        },
        "imageUrl": {
          "type": "string"
        },
        "provider": {
          "allOf": [
            {
              "$ref": "#/$defs/WorkspaceProvider"
            }
          ]
        }
      },
      "required": [
        "name",
        "website",
        "imageUrl"
      ]
    },
    "WorkspaceProvider": {
      "type": "string",
      "enum": [
        "softsync",
        "doneai",
        "analystx"
      ],
      "description": "Provider configured in the requesting client. Defaults to the server default for older clients."
    }
  }
}