{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenSCORM API",
    "description": "Register learners, list courses, mint launches for an embedded player, and read progress back. Authenticate with a tenant API key: Authorization: Bearer osk_...",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/api"
    }
  ],
  "paths": {
    "/v1/courses": {
      "get": {
        "tags": [
          "CoursesV1"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CourseV1Response"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CourseV1Response"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CourseV1Response"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/launches": {
      "post": {
        "tags": [
          "LaunchesV1"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintLaunchV1Request"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MintLaunchV1Request"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MintLaunchV1Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LaunchV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaunchV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LaunchV1Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Client Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/learners": {
      "post": {
        "tags": [
          "LearnersV1"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterLearnerV1Request"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterLearnerV1Request"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterLearnerV1Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Client Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Client Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/learners/{externalId}": {
      "get": {
        "tags": [
          "LearnersV1"
        ],
        "parameters": [
          {
            "name": "externalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerV1Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/learners/{externalId}/progress": {
      "get": {
        "tags": [
          "LearnersV1"
        ],
        "parameters": [
          {
            "name": "externalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerProgressV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerProgressV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearnerProgressV1Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tenants/{tenantHandle}/courses": {
      "get": {
        "tags": [
          "TenantCoursesV1"
        ],
        "parameters": [
          {
            "name": "tenantHandle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "handle",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCoursesV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCoursesV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCoursesV1Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tenant": {
      "get": {
        "tags": [
          "TenantV1"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantV1Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantV1Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantV1Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, malformed, unknown, or revoked.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The organization is suspended.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "The key's rate limit or the organization's daily call quota is spent. Retry-After names the reset.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CourseProgressV1Response": {
        "type": "object",
        "properties": {
          "courseKey": {
            "type": "integer",
            "format": "int32"
          },
          "handle": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "courseActive": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "score": {
            "type": "string",
            "nullable": true
          },
          "duration": {
            "type": "string",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CourseV1Response": {
        "type": "object",
        "properties": {
          "courseKey": {
            "type": "integer",
            "format": "int32"
          },
          "handle": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "standard": {
            "type": "string",
            "nullable": true
          },
          "launchable": {
            "type": "boolean"
          },
          "shared": {
            "type": "boolean"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "LaunchV1Response": {
        "type": "object",
        "properties": {
          "launchUrl": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "learnerId": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "courseKey": {
            "type": "integer",
            "format": "int32"
          },
          "courseTitle": {
            "type": "string",
            "nullable": true
          },
          "learners": {
            "$ref": "#/components/schemas/TenantV1Learners"
          }
        },
        "additionalProperties": false
      },
      "LearnerProgressV1Response": {
        "type": "object",
        "properties": {
          "learnerId": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "courses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CourseProgressV1Response"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LearnerV1Response": {
        "type": "object",
        "properties": {
          "learnerId": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "boolean"
          },
          "learners": {
            "$ref": "#/components/schemas/TenantV1Learners"
          }
        },
        "additionalProperties": false
      },
      "MintLaunchV1Request": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "courseKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RegisterLearnerV1Request": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantCourseV1Response": {
        "type": "object",
        "properties": {
          "courseKey": {
            "type": "integer",
            "format": "int32"
          },
          "handle": {
            "type": "string",
            "nullable": true
          },
          "variant": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "standard": {
            "type": "string",
            "nullable": true
          },
          "shared": {
            "type": "boolean"
          },
          "hostedBy": {
            "type": "string",
            "nullable": true
          },
          "targetPath": {
            "type": "string",
            "nullable": true
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TenantCoursesV1Response": {
        "type": "object",
        "properties": {
          "tenant": {
            "$ref": "#/components/schemas/TenantCoursesV1Tenant"
          },
          "handle": {
            "type": "string",
            "nullable": true
          },
          "courses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantCourseV1Response"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantCoursesV1Tenant": {
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "nullable": true
          },
          "known": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TenantV1Capacity": {
        "type": "object",
        "properties": {
          "courseCount": {
            "type": "integer",
            "format": "int32"
          },
          "courseLimit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "userCount": {
            "type": "integer",
            "format": "int32"
          },
          "userLimit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantV1Courses": {
        "type": "object",
        "properties": {
          "current": {
            "type": "integer",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantV1Key": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true
          },
          "prefix": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantV1Learners": {
        "type": "object",
        "properties": {
          "current": {
            "type": "integer",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "remaining": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "warningAt": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "periodStartsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "periodResetsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantV1Response": {
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "plan": {
            "type": "string",
            "nullable": true
          },
          "learners": {
            "$ref": "#/components/schemas/TenantV1Learners"
          },
          "courses": {
            "$ref": "#/components/schemas/TenantV1Courses"
          },
          "capacity": {
            "$ref": "#/components/schemas/TenantV1Capacity"
          },
          "key": {
            "$ref": "#/components/schemas/TenantV1Key"
          },
          "usage": {
            "$ref": "#/components/schemas/TenantV1Usage"
          }
        },
        "additionalProperties": false
      },
      "TenantV1Usage": {
        "type": "object",
        "properties": {
          "callsToday": {
            "type": "integer",
            "format": "int32"
          },
          "dailyLimit": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "resetsAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "description": "A tenant API key issued on Settings (osk_ plus 43 characters).",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ]
}