{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/algenta-ai/json-schema/algenta-ai-sign-up-response-schema.json",
  "title": "SignUpResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/algenta-ai-auth-api-openapi.yml#/components/schemas/SignUpResponse",
  "properties": {
    "user": {
      "$ref": "#/$defs/UserInfo"
    },
    "org": {
      "$ref": "#/$defs/OrgInfo"
    },
    "api_key": {
      "$ref": "#/$defs/APIKeyCreated"
    },
    "message": {
      "type": "string",
      "title": "Message",
      "default": "Account created successfully. Your API key is shown once — store it securely."
    }
  },
  "type": "object",
  "required": [
    "user",
    "org",
    "api_key"
  ],
  "$defs": {
    "APIKeyCreated": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "key_prefix": {
          "type": "string",
          "title": "Key Prefix"
        },
        "device_limit": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Device Limit",
          "description": "Max registered devices for this key on the local runtime path. 0 preserves the plan's unlimited or no-local-runtime behavior."
        },
        "raw_key": {
          "type": "string",
          "title": "Raw Key",
          "description": "The full API key — shown ONCE, store it securely."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "label",
        "key_prefix",
        "device_limit",
        "raw_key",
        "created_at"
      ],
      "title": "APIKeyCreated",
      "description": "Returned once at key creation — raw key shown here only."
    },
    "OrgInfo": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "slug": {
          "type": "string",
          "title": "Slug"
        },
        "plan": {
          "type": "string",
          "title": "Plan"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "auto_fix_pipeline_enabled": {
          "type": "boolean",
          "title": "Auto Fix Pipeline Enabled"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "slug",
        "plan",
        "status",
        "auto_fix_pipeline_enabled",
        "created_at"
      ],
      "title": "OrgInfo"
    },
    "UserInfo": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "email": {
          "type": "string",
          "title": "Email"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "role": {
          "type": "string",
          "title": "Role"
        },
        "email_verified": {
          "type": "boolean",
          "title": "Email Verified"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "email",
        "name",
        "role",
        "email_verified",
        "created_at"
      ],
      "title": "UserInfo"
    }
  }
}