API Reference v2.3
Coggno API · v2.3

API Reference

The Coggno API is organized around REST. It has predictable, resource-oriented URLs, accepts URL-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. This document covers v2 - the v1 API remains available but is no longer extended, so new integrations should use v2.

Endpoints

All API requests are made over HTTPS against the following base URLs.

EnvironmentBase URL
Productionhttps://api.coggno.com/v2
Sandboxhttps://sandbox-app.coggno.com/api/v2
Build and test your integration in the sandbox first. See the Sandbox guide.

Authentication

The Coggno API uses API keys to authenticate requests. View and manage your keys on the Settings → API Keys page in your account.

Authenticate by sending the key as the HTTP Basic Auth username, with no password. With curl, pass it as -u API_KEY: (note the trailing colon).

All requests must be made over HTTPS. Calls made over plain HTTP, or without authentication, fail with 401 Unauthorized.

Security
Your API keys carry many privileges. Keep them secure and never share them in client-side code or public repositories.
cURLExample request
curl https://api.coggno.com/v2/companies -u API_KEY:

Connected accounts

An API key issued to a parent account can act on behalf of any connected LMS (child) account by sending the Coggno-LMS header with the child company’s id.

Without the header, requests are scoped to the parent account. With it, the parent’s own groups, users, documents, and licenses are hidden - only the targeted child’s resources are visible.

cURLActing as a child account
curl https://api.coggno.com/v2/groups \
  -H "Coggno-LMS: comp_42" \
  -u API_KEY:

Dates and times

Timestamps (fields such as created_at) are ISO 8601 in UTC, e.g. 2026-04-30T12:00:00Z.

Dates (fields such as issue_date and expires_at on a certificate) are calendar dates in YYYY-MM-DD form, with no time or time zone.

Neither depends on the account or API key settings.

Core concepts

Errors

Coggno uses conventional HTTP status codes to indicate the outcome of a request. Codes in the 2xx range mean success, 4xx means a client error you can fix (missing parameter, invalid id, expired key), and 5xx means a problem on Coggno’s side.

Error response format

Every error response carries the same JSON shape. The message is human-readable and intended for your logs.

JSONError response
{
  "error": {
    "message": "User is not found"
  }
}

Status codes

StatusNameWhen you’ll see it
200OKRequest succeeded.
201CreatedResource was created.
400Bad RequestA parameter was malformed (e.g. an unknown value passed to expand).
401UnauthorizedAPI key missing, invalid, disabled, or expired - or the Coggno-LMS header points at an unreachable account.
403ForbiddenThe authenticated key does not have permission to act on the target resource.
404Not FoundThe requested resource does not exist or is not visible to this key.
409ConflictThe request conflicts with the current state (e.g. adding a user would exceed the license limit, or deleting a locked group).
422Unprocessable EntityValidation failed - missing or invalid fields, duplicate user, license cannot be launched, etc.
429Too Many RequestsSlow down. Retry with exponential backoff.
500Server ErrorSomething went wrong on Coggno’s side.
Core concepts

Expand related objects

Many endpoints return related resources as bare ids - for example, a license response carries "document": "doc_17". To have the API inline the full related resource instead of the id, pass the expand query parameter.

Using expand

expand accepts either a single key (?expand=document) or multiple keys passed as a repeated array parameter (?expand[]=user&expand[]=document). The allowed keys are user, document, category, sub_category, modules, module_licenses, and licenses.

Passing an unknown key returns 400 Bad Request.

JSONWithout expand
GET /users/user_1/licenses

{
  "object": "list",
  "data": [
    {
      "id": "lic_1_17",
      "object": "license",
      "document": "doc_17",
      "amount": 1,
      "used": 0,
      "score": 0,
      "passed": false,
      "start_date": null,
      "complete_date": null,
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}
JSONWith expand[]=module_licenses&expand[]=document
GET /users/user_1/licenses?expand[]=module_licenses&expand[]=document

{
  "object": "list",
  "data": [
    {
      "id": "lic_23_77",
      "object": "license",
      "course_license": true,
      "document": {
        "id": "doc_77",
        "object": "document",
        "title": "Workplace Safety Course",
        "type": "Course",
        "created_at": "2026-04-30T12:00:00Z"
      },
      "amount": 1,
      "used": 1,
      "views": 3,
      "total_time": 5400,
      "score": 88,
      "passed": true,
      "start_date": "2026-04-15T09:00:00Z",
      "complete_date": "2026-04-16T11:42:11Z",
      "enrollment_date": "2026-04-14T00:00:00Z",
      "created_at": "2026-04-14T17:05:22Z",
      "module_licenses": [
        {
          "id": "lic_23_100",
          "object": "license",
          "course_license": false,
          "document": "doc_100",
          "amount": 1,
          "used": 1,
          "views": 2,
          "total_time": 240,
          "score": 92,
          "passed": true,
          "start_date": "2026-04-15T09:00:00Z",
          "complete_date": "2026-04-15T10:00:00Z",
          "enrollment_date": "2026-04-14T00:00:00Z",
          "created_at": "2026-04-14T17:05:22Z"
        },
        {
          "id": "lic_23_101",
          "object": "license",
          "course_license": false,
          "document": "doc_101",
          "amount": 1,
          "used": 1,
          "views": 1,
          "total_time": 300,
          "score": 84,
          "passed": true,
          "start_date": "2026-04-16T10:00:00Z",
          "complete_date": "2026-04-16T11:42:11Z",
          "enrollment_date": "2026-04-14T00:00:00Z",
          "created_at": "2026-04-14T17:05:22Z"
        }
      ]
    }
  ]
}

Allowed expand keys per endpoint

ParameterAvailable onInlines
userGET /companies GET /documents/:id/licensesThe owner / license holder.
documentGET /licenses/owned GET /users/:id/licenses GET /groups/:id/licenses/:document_id GET /documents/:id/licensesThe document object.
categoryGET /documents/:id GET /marketplace/courses/:id GET /marketplace/sub_categories/:idThe category of the document, course or sub-category.
sub_categoryGET /documents/:id GET /marketplace/courses/:idThe document’s or course’s sub-category.
sub_categoriesGET /marketplace/categories/:idThe category’s sub-categories shown in the marketplace.
modulesGET /documents/:idThe modules (child documents) of a course.
module_licensesGET /documents/:id/licenses GET /users/:id/licensesThe child licenses of a course license.
licensesGET /groups/:id/licenses/:document_idThe group users’ licenses for the document.
Resources

Companies

A company represents a single LMS account. A company owns groups, users, documents, and licenses. Every company created through the API is a connected account of the caller.

List connected companies

GET /companies

Returns the caller’s own company plus every directly connected child company.

Expandable parameters: user

cURLRequest
curl https://api.coggno.com/v2/companies -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "comp_1",
      "object": "company",
      "name": "Acme Training",
      "user": "user_1",
      "created_at": "2026-04-30T12:00:00Z"
    },
    {
      "id": "comp_42",
      "object": "company",
      "name": "Northwind LLC",
      "user": "user_88",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Create a connected company

POST /companies

Provisions a new LMS as a child of the calling account.

Parameters 6
name
Required
Display name of the new company.
first_name
Required
First name of the company’s owner user.
last_name
Required
Last name of the company’s owner user.
email
Required
Email of the owner user. Must be unique across Coggno.
username
Optional
Username for the owner. Defaults to email if omitted.
password
Optional
Initial password for the owner. If omitted, a passwordless account is created and the owner sets a password later.
cURLRequest
curl https://api.coggno.com/v2/companies -u API_KEY: \
  -d name="Northwind LLC" \
  -d first_name=Jane \
  -d last_name=Doe \
  -d [email protected] \
  -d username=jane.doe
JSONResponse
{
  "id": "comp_42",
  "object": "company",
  "name": "Northwind LLC",
  "user": "user_88",
  "created_at": "2026-04-30T12:00:00Z"
}
Resources

Groups

Groups partition users inside an LMS. Use groups to model departments, cohorts, or anything you assign training to in bulk.

List groups

GET /groups
cURLRequest
curl https://api.coggno.com/v2/groups -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "group_1",
      "object": "group",
      "name": "Sales",
      "description": "Sales department",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Create a group

POST /groups
Parameters 2
name
Required
Group name. Must be unique within the LMS.
description
Optional
Description of the group.
cURLRequest
curl https://api.coggno.com/v2/groups -u API_KEY: \
  -d name=Sales \
  -d description="Sales department"
JSONResponse
{
  "id": "group_1",
  "object": "group",
  "name": "Sales",
  "description": "Sales department",
  "created_at": "2026-04-30T12:00:00Z"
}

Retrieve a group

GET /groups/:id
cURLRequest
curl https://api.coggno.com/v2/groups/group_1 -u API_KEY:
JSONResponse
{
  "id": "group_1",
  "object": "group",
  "name": "Sales",
  "description": "Sales department",
  "created_at": "2026-04-30T12:00:00Z"
}

Update a group

PATCH /groups/:id
Parameters 2
name
Optional
Group name.
description
Optional
Description.
cURLRequest
curl -X PATCH https://api.coggno.com/v2/groups/group_1 -u API_KEY: \
  -d name=Managers \
  -d description="Managers department"
JSONResponse
{
  "id": "group_1",
  "object": "group",
  "name": "Managers",
  "description": "Managers department",
  "created_at": "2026-04-30T12:00:00Z"
}

Delete a group

DELETE /groups/:id

Group deletion is gated by a name confirmation: the caller must pass the group’s current name in the confirmation parameter. System-locked groups (e.g. the Administrators group) cannot be deleted and return 409 Conflict.

Parameters 1
confirmation
Required
Must equal the group’s current name.
cURLRequest
curl -X DELETE https://api.coggno.com/v2/groups/group_1 -u API_KEY: \
  -d confirmation=Sales
JSONResponse
{
  "id": "group_1",
  "object": "group",
  "deleted": true
}
Resources

Group users

Manage group membership. A user can belong to multiple groups within the same LMS.

List group members

GET /groups/:group_id/users
cURLRequest
curl https://api.coggno.com/v2/groups/group_1/users -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "user_1",
      "object": "user",
      "username": "jdoe",
      "first_name": "John",
      "last_name": "Doe",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Add a user to a group

POST /groups/:group_id/users

The user must already belong to the LMS (or to a connected child LMS). The user_id parameter accepts either a user id (user_123) or a username.

Parameters 2
user_id
Required
Either the user’s id (user_<n>) or their username.
send_notification
Optional
If true, the user receives an invitation email when added.
cURLRequest
curl https://api.coggno.com/v2/groups/group_1/users -u API_KEY: \
  -d user_id=user_1
JSONResponse
{
  "id": "user_1",
  "object": "user",
  "username": "jdoe",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2026-04-30T12:00:00Z"
}

Retrieve a group member

GET /groups/:group_id/users/:user_id

The :user_id segment accepts either a user id or a username, as on every users endpoint.

cURLRequest - id or username
# These two requests resolve to the same user
curl https://api.coggno.com/v2/groups/group_1/users/user_1 -u API_KEY:
curl https://api.coggno.com/v2/groups/group_1/users/jdoe -u API_KEY:
JSONResponse
{
  "id": "user_1",
  "object": "user",
  "username": "jdoe",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2026-04-30T12:00:00Z"
}

Remove a user from a group

DELETE /groups/:group_id/users/:user_id

Removes the user from the group. The user remains in the LMS.

cURLRequest
curl -X DELETE https://api.coggno.com/v2/groups/group_1/users/user_1 -u API_KEY:
JSONResponse
{
  "id": "user_1",
  "object": "user",
  "deleted": true
}
Resources

Group licenses

Distribute documents to a group. A distributed document becomes a group license available to current and future members.

Distribute a license to a group

POST /groups/:group_id/licenses

Distributes a single document to every member of the group and returns the created group license. The seat count is reported as amount, where -1 means unlimited. If your account owns the document it is distributed directly; otherwise your Coggno Prime subscription is used when it covers the document, and a license you hold for it after that. The deadline and renewal also apply to licenses your account already issued to current members for that document.

Parameters 4
document_id
Required
The id of the document to distribute (doc_<n>).
send_notification
Optional
If true, group members receive a distribution email. Defaults to false.
due_days
Optional
Rolling deadline in days (1-365), counted from when the user gets the course.
recert_interval
Optional
Turns on renewal - course (follow the course's own expiration) or a number of months (1-36).
cURLRequest
curl https://api.coggno.com/v2/groups/group_1/licenses -u API_KEY: \
  -d document_id=doc_17
JSONResponse
{
  "id": "group_lic_1_17",
  "object": "group_license",
  "document": "doc_17",
  "created_at": "2026-04-30T12:00:00Z",
  "amount": -1
}

Retrieve a group license

GET /groups/:group_id/licenses/:document_id

:document_id is the document id (doc_<n>). Returns the group license for that document in the group.

Expandable parameters: document, licenses

cURLRequest
curl https://api.coggno.com/v2/groups/group_1/licenses/doc_17 -u API_KEY:
JSONResponse
{
  "id": "group_lic_1_17",
  "object": "group_license",
  "document": "doc_17",
  "created_at": "2026-04-30T12:00:00Z",
  "amount": -1
}

Reset a group license

DELETE /groups/:group_id/licenses/:document_id

Resets the group license for the document: every member’s license for it is reset.

cURLRequest
curl -X DELETE https://api.coggno.com/v2/groups/group_1/licenses/doc_17 -u API_KEY:
JSONResponse
{
  "id": "group_lic_1_17",
  "object": "group_license",
  "deleted": true
}
Resources

Users

Manage the users that belong to an LMS. Every endpoint that takes a user identifier accepts either the prefixed id (user_123) or the user’s username.

Looking up users by username

Wherever the API identifies a user in a path segment, you may substitute the user’s username. This applies to GET /users/:id, DELETE /users/:id, every /groups/:group_id/users/:user_id endpoint, and /users/:user_id/licenses.

cURLRequest - id or username
# These two requests resolve to the same user
curl https://api.coggno.com/v2/users/user_1 -u API_KEY:
curl https://api.coggno.com/v2/users/jdoe -u API_KEY:

List users

GET /users
cURLRequest
curl https://api.coggno.com/v2/users -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "user_1",
      "object": "user",
      "username": "jdoe",
      "first_name": "John",
      "last_name": "Doe",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Create a user

POST /users

Creates a new user, adds them to the LMS, and optionally to a group. If the LMS has reached its licensed-user limit, returns 409 Conflict. If the email is already in use, returns 422 Unprocessable Entity.

Parameters 7
first_name
Required
User’s first name.
last_name
Required
User’s last name.
email
Required
Email address. Must be unique across Coggno.
username
Optional
Username for sign-in. Defaults to email if omitted.
password
Optional
Initial password. If omitted, a passwordless account is created and the user sets a password later.
group_id
Optional
Encoded group id (group_<n>). Adds the new user to this group on creation.
send_notification
Optional
If true, sends the new user an email notification. No email is sent by default.
cURLRequest
curl https://api.coggno.com/v2/users -u API_KEY: \
  -d first_name=John \
  -d last_name=Doe \
  -d [email protected] \
  -d username=jdoe \
  -d group_id=group_1
JSONResponse
{
  "id": "user_1",
  "object": "user",
  "username": "jdoe",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2026-04-30T12:00:00Z"
}

Retrieve a user

GET /users/:id
cURLRequest
curl https://api.coggno.com/v2/users/user_1 -u API_KEY:
JSONResponse
{
  "id": "user_1",
  "object": "user",
  "username": "jdoe",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2026-04-30T12:00:00Z"
}

Delete a user

DELETE /users/:id

Removes the user from the LMS and from every group. The underlying Coggno login is retained - licenses purchased through other channels remain accessible to the user.

cURLRequest
curl -X DELETE https://api.coggno.com/v2/users/jdoe -u API_KEY:
JSONResponse
{
  "id": "user_1",
  "object": "user",
  "deleted": true
}
Resources

Owned licenses

The licenses your account owns - the seat pools you distribute to users. amount is the number of seats, used is the number given out, including seats assigned to users who have not opened the course yet. A license can be distributed while used is less than amount.

List owned licenses

GET /licenses/owned

Returns the account’s top-level licenses with their seat counts. Documents created in your account need no license and are listed by GET /documents.

Expandable parameters: document

cURLRequest
curl https://api.coggno.com/v2/licenses/owned -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "lic_5_42",
      "object": "owned_license",
      "course_license": false,
      "document": "doc_42",
      "amount": 50,
      "used": 15,
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}
Resources

User licenses

A license attaches a user to a document. The list endpoint returns the user’s top-level licenses; for a license that points at a course (a collection of documents), retrieve it by id to see the individual child licenses.

List a user’s top-level licenses

GET /users/:user_id/licenses

Expandable parameters: document, module_licenses

cURLRequest
curl https://api.coggno.com/v2/users/user_1/licenses -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "lic_1_17",
      "object": "license",
      "course_license": false,
      "document": "doc_17",
      "amount": 1,
      "used": 0,
      "views": 0,
      "total_time": 0,
      "score": 0,
      "passed": false,
      "start_date": null,
      "complete_date": null,
      "enrollment_date": "2026-04-30T12:00:00Z",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Distribute a license

POST /users/:user_id/licenses

Distributes a single document to the user and returns the created license. If your account owns the document it is distributed directly; otherwise your Coggno Prime subscription is used when it covers the document, and a license you already hold for that document after that. Returns 422 if your Prime plan has no free seat for this user.

Parameters 4
document_id
Required
The id of the document to distribute (doc_<n>).
send_notification
Optional
If true, the user receives a distribution email. Defaults to false.
due_days
Optional
Rolling deadline in days (1-365), counted from when the user gets the course.
recert_interval
Optional
Turns on renewal - course (follow the course's own expiration) or a number of months (1-36).
cURLRequest
curl https://api.coggno.com/v2/users/user_1/licenses -u API_KEY: \
  -d document_id=doc_17
JSONResponse
{
  "id": "lic_1_17",
  "object": "license",
  "course_license": false,
  "document": "doc_17",
  "amount": 1,
  "used": 0,
  "views": 0,
  "total_time": 0,
  "score": 0,
  "passed": false,
  "start_date": null,
  "complete_date": null,
  "enrollment_date": "2026-04-30T12:00:00Z",
  "created_at": "2026-04-30T12:00:00Z"
}

Retrieve a license

GET /users/:user_id/licenses/:document_id

The :document_id segment is the document id the license targets.

Expandable parameters: document, module_licenses

cURLRequest
curl https://api.coggno.com/v2/users/user_1/licenses/doc_17 -u API_KEY:
JSONResponse
{
  "id": "lic_1_17",
  "object": "license",
  "course_license": false,
  "document": "doc_17",
  "amount": 1,
  "used": 0,
  "views": 0,
  "total_time": 0,
  "score": 0,
  "passed": false,
  "start_date": null,
  "complete_date": null,
  "enrollment_date": "2026-04-30T12:00:00Z",
  "created_at": "2026-04-30T12:00:00Z"
}

Get a launch URL

GET /users/:user_id/licenses/:document_id/launch_url

Mints a signed, time-limited URL that launches the licensed training in the user’s browser. The url expires 10 minutes after it is issued; embed it directly or redirect the user to it. Course licenses cannot be launched at the course level - launch each module license instead.

Expandable parameters: document

cURLRequest
curl https://api.coggno.com/v2/users/user_1/licenses/doc_17/launch_url -u API_KEY:
JSONResponse
{
  "id": "lic_1_17",
  "object": "url",
  "url": "https://coggno.com/v2/content/start_token/eyJhbGciOi...",
  "expires_at": "2026-05-15T15:00:00Z",
  "document": "doc_17"
}

Reset a license

DELETE /users/:user_id/licenses/:document_id

Resets the user’s license for the document, identified by its document id. A license the user received through a group cannot be removed here - reset it on the group instead.

cURLRequest
curl -X DELETE https://api.coggno.com/v2/users/user_1/licenses/doc_17 -u API_KEY:
JSONResponse
{
  "id": "lic_1_17",
  "object": "license",
  "deleted": true
}
Resources

User certificates

Certificates the user has been issued in your account. A certificate with downloadable false is still being generated, or its generation failed.

List a user’s certificates

GET /users/:user_id/certificates

Returns the user’s issued certificates, newest first.

cURLRequest
curl https://api.coggno.com/v2/users/user_1/certificates -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "course_cert_42",
      "object": "certificate",
      "type": "course",
      "name": "Workplace Safety",
      "document": "doc_17",
      "downloadable": true,
      "issue_date": "2026-04-30",
      "expires_at": "2027-04-30",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Retrieve a certificate

GET /users/:user_id/certificates/:id
cURLRequest
curl https://api.coggno.com/v2/users/user_1/certificates/course_cert_42 -u API_KEY:
JSONResponse
{
  "id": "course_cert_42",
  "object": "certificate",
  "type": "course",
  "name": "Workplace Safety",
  "document": "doc_17",
  "downloadable": true,
  "issue_date": "2026-04-30",
  "expires_at": "2027-04-30",
  "created_at": "2026-04-30T12:00:00Z"
}

Download a certificate

GET /users/:user_id/certificates/:id/download

Returns the PDF certificate file as an attachment, for every certificate type. The response body is the binary file itself, not JSON. Returns 409 while the certificate is still being generated; retry shortly. Returns 422 if its generation failed and 404 if its file is missing; retrying will not help either.

cURLRequest
curl https://api.coggno.com/v2/users/user_1/certificates/course_cert_42/download -u API_KEY: -o certificate.pdf
Resources

Documents

Documents are the training content created by an LMS admin. Supported types include VideoDocument, ScormDocument, AiccDocument, OfficeDocument, Exam, QuestionBank, and Course.

List documents

GET /documents
cURLRequest
curl https://api.coggno.com/v2/documents -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "doc_17",
      "object": "document",
      "title": "Workplace Safety 101",
      "type": "ScormDocument",
      "created_at": "2026-04-30T12:00:00Z"
    }
  ]
}

Retrieve a document

GET /documents/:id

Returns the document details.

Expandable parameters: category, sub_category, modules

cURLRequest
curl https://api.coggno.com/v2/documents/doc_17 -u API_KEY:
JSONResponse
{
  "id": "doc_17",
  "object": "document",
  "title": "Workplace Safety Course",
  "type": "Course",
  "created_at": "2026-04-30T12:00:00Z",
  "description": "An introduction to workplace safety best practices.",
  "category": "cat_3",
  "sub_category": "scat_9"
}
Resources

Document licenses

List every license held against an admin-created document, across all users in the LMS.

List licenses for a document

GET /documents/:document_id/licenses

Returns every license held against a document created by an admin, across all users in the LMS. This method does not return licenses for courses bought in the Coggno marketplace.

Expandable parameters: user, document, module_licenses

cURLRequest
curl https://api.coggno.com/v2/documents/doc_17/licenses -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "lic_1_17",
      "object": "license",
      "course_license": false,
      "document": "doc_17",
      "amount": 1,
      "used": 1,
      "views": 3,
      "total_time": 1820,
      "score": 87.5,
      "passed": true,
      "start_date": "2026-05-01T10:00:00Z",
      "complete_date": "2026-05-15T14:30:00Z",
      "enrollment_date": "2026-04-30T12:00:00Z",
      "created_at": "2026-04-30T12:00:00Z",
      "user": "user_1"
    }
  ]
}
Resources

Marketplace

Courses published in the Coggno marketplace and the categories they are organized in. Use it to get details of the courses your licenses point at - a license’s document id is the course id.

Retrieve a course

GET /marketplace/courses/:id

Returns a course published in the marketplace, or one your account holds a license for. duration is in minutes and may be null.

Expandable parameters: category, sub_category

cURLRequest
curl https://api.coggno.com/v2/marketplace/courses/doc_42 -u API_KEY:
JSONResponse
{
  "id": "doc_42",
  "object": "course",
  "title": "Sexual Harassment Prevention for Employees",
  "author_name": "Acme Training",
  "description": "Learn how to recognize and prevent harassment in the workplace.",
  "icon_url": "https://cdn.example.com/42.jpg",
  "duration": 60,
  "category": "cat_3",
  "sub_category": "scat_9"
}

Retrieve a category

GET /marketplace/categories/:id

Returns a category. Any category id found on a course or sub-category resolves here, including categories no longer shown in the marketplace. Expanded sub_categories include only those shown in the marketplace.

Expandable parameters: sub_categories

cURLRequest
curl https://api.coggno.com/v2/marketplace/categories/cat_3 -u API_KEY:
JSONResponse
{
  "id": "cat_3",
  "object": "category",
  "title": "Human Resources"
}

Retrieve a sub-category

GET /marketplace/sub_categories/:id

Returns a sub-category. Any sub-category id found on a course resolves here, including sub-categories no longer shown in the marketplace.

Expandable parameters: category

cURLRequest
curl https://api.coggno.com/v2/marketplace/sub_categories/scat_9 -u API_KEY:
JSONResponse
{
  "id": "scat_9",
  "object": "sub_category",
  "name": "Harassment Prevention",
  "category": "cat_3"
}
Resources

Webhooks

Webhooks deliver license lifecycle events to a URL you control. Subscribe by creating a webhook endpoint against a company; Coggno POSTs a JSON payload to your URL each time a subscribed event fires for that company.

The endpoint object

secret_preview is the last few characters of the signing secret, shown for your reference. The full secret is only ever returned once - in the response to the create call. Store it then. The secret can also be viewed on the Settings → Webhooks page.

JSONWebhook endpoint
{
  "id": "we_5",
  "object": "webhook",
  "url": "https://example.com/coggno/webhook",
  "events": ["license.completed", "license.failed"],
  "enabled": true,
  "secret_preview": "…a91f",
  "last_attempt_at": "2026-05-15T14:30:00Z",
  "last_success_at": "2026-05-15T14:30:00Z",
  "consecutive_failures": 0,
  "created_at": "2026-05-01T10:00:00Z",
  "updated_at": "2026-05-15T14:30:00Z"
}

List webhook endpoints

GET /companies/:company_id/webhooks
cURLRequest
curl https://api.coggno.com/v2/companies/comp_42/webhooks -u API_KEY:
JSONResponse
{
  "object": "list",
  "data": [
    {
      "id": "we_5",
      "object": "webhook",
      "url": "https://example.com/coggno/webhook",
      "events": ["license.completed"],
      "enabled": true,
      "secret_preview": "…a91f",
      "last_attempt_at": "2026-05-15T14:30:00Z",
      "last_success_at": "2026-05-15T14:30:00Z",
      "consecutive_failures": 0,
      "created_at": "2026-05-01T10:00:00Z",
      "updated_at": "2026-05-15T14:30:00Z"
    }
  ]
}

Create a webhook endpoint

POST /companies/:company_id/webhooks

The signing secret is returned only by this call - store it. Subsequent retrievals return only secret_preview.

Parameters 2
url
Required
HTTPS URL Coggno will POST events to.
events
Optional
Array of event types this endpoint should receive. Omit to subscribe to all events.
cURLRequest
curl https://api.coggno.com/v2/companies/comp_42/webhooks -u API_KEY: \
  -d url=https://example.com/coggno/webhook \
  -d events[]=license.completed \
  -d events[]=license.failed
JSONResponse
{
  "id": "we_5",
  "object": "webhook",
  "url": "https://example.com/coggno/webhook",
  "events": ["license.completed", "license.failed"],
  "enabled": true,
  "secret_preview": "…a91f",
  "last_attempt_at": null,
  "last_success_at": null,
  "consecutive_failures": 0,
  "created_at": "2026-05-15T14:30:00Z",
  "updated_at": "2026-05-15T14:30:00Z",
  "secret": "whsec_5e8b9f1c0d2a4e6f8a91f"
}

Retrieve a webhook endpoint

GET /companies/:company_id/webhooks/:id
cURLRequest
curl https://api.coggno.com/v2/companies/comp_42/webhooks/we_5 -u API_KEY:

Update a webhook endpoint

PATCH /companies/:company_id/webhooks/:id

Only the fields you pass are changed. Re-enabling a previously-disabled endpoint immediately dispatches any deliveries that were queued while it was disabled.

Parameters 3
url
Optional
New target URL.
events
Optional
Replacement events array (full replace, not merge).
enabled
Optional
Boolean. Set false to pause deliveries, true to resume.
cURLRequest
curl -X PATCH https://api.coggno.com/v2/companies/comp_42/webhooks/we_5 -u API_KEY: \
  -d enabled=true

Delete a webhook endpoint

DELETE /companies/:company_id/webhooks/:id
cURLRequest
curl -X DELETE https://api.coggno.com/v2/companies/comp_42/webhooks/we_5 -u API_KEY:
JSONResponse
{
  "id": "we_5",
  "object": "webhook",
  "deleted": true
}

Webhook events

Subscribe by listing event types in the events array when creating or updating an endpoint. If events is empty or omitted on create, the endpoint receives every type. Coggno only fires top-level license events.

EventWhen it fires
license.issuedA license is created for a user (e.g. after a purchase or admin assignment).
license.startedThe first time the user opens the training and the license’s start_date is set.
license.completedThe user passes the training. The payload’s passed flag is true.
license.failedThe user fails the training (e.g. fails an exam).

Webhook payload

Every delivery has the same envelope: a set of X-Coggno-* headers plus a JSON body. Your endpoint must respond with any 2xx status to acknowledge receipt - any non-2xx response, or a network error, counts as a failed delivery.

JSONDelivery
POST /coggno/webhook HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: Coggno-Webhooks/1.0
X-Coggno-Event: license.completed
X-Coggno-Delivery-Id: <uuid>
X-Coggno-Signature: t=1747322400,v1=5d3b9a7c…

{
  "id": "<uuid>",
  "type": "license.completed",
  "created": "2026-05-15T14:30:00Z",
  "data": {
    "user": {
      "id": "user_12345",
      "first_name": "John",
      "last_name": "Doe",
      "username": "jdoe"
    },
    "license": {
      "id": "lic_12345_17",
      "object": "license",
      "document": {
        "id": "doc_17",
        "object": "document",
        "title": "Workplace Safety 101",
        "type": "ScormDocument"
      },
      "amount": 1,
      "used": 1,
      "views": 3,
      "total_time": 1820,
      "score": 87.5,
      "passed": true,
      "start_date": "2026-05-01T10:00:00Z",
      "complete_date": "2026-05-15T14:30:00Z",
      "enrollment_date": "2026-04-30T12:00:00Z",
      "created_at": "2026-04-30T12:00:00Z"
    }
  }
}

Verifying a webhook

Every request carries an X-Coggno-Signature header of the form t=<unix_timestamp>,v1=<hex_hmac_sha256>. The signed string is the timestamp, a literal period, and the raw request body: signed = "<timestamp>.<raw_body>".

To verify: parse t and v1 out of the header; reject if t is more than 5 minutes (300 seconds) off your clock; recompute the HMAC-SHA256 using the endpoint’s signing secret; compare to v1 in constant time. Reject if anything fails.

PythonExample - Python
import hmac, hashlib, time

def verify_coggno_webhook(secret, raw_body, header, tolerance=300):
    parts = dict(p.split('=', 1) for p in header.split(',') if '=' in p)
    t = int(parts.get('t', '0'))
    v1 = parts.get('v1', '')
    if t == 0 or not v1:
        return False
    if abs(int(time.time()) - t) > tolerance:
        return False
    signed = f"{t}.{raw_body}".encode()
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, v1)

Retries

If your endpoint returns a non-2xx response or times out, Coggno retries the delivery up to 8 times total (the initial attempt plus 7 retries) with polynomial backoff. After the 8th failed attempt the delivery is marked failed. The consecutive_failures counter increments on failure; a single successful delivery resets it to zero.

RetryTime interval
1~3 s
2~18 s
3~1.5 min
4~4 min
5~10 min
6~20 min
7~40 min

Auto-disabling on persistent failure

Coggno automatically disables an endpoint that has been failing for an extended period - specifically when consecutive_failures has reached 64 and the endpoint has not had a successful delivery in the last 3 days (or has never had one). When auto-disabled, deliveries stop and Coggno notifies the account owner by email.

Note
To resume deliveries, fix the receiver and PATCH the endpoint with enabled=true (or update it on the Settings page). Any deliveries queued while it was disabled are dispatched immediately on re-enable.
Reference

Changelog

Versions

VersionDateChanges
2.32026-11-12Added user certificates - GET /users/:user_id/certificates, GET /users/:user_id/certificates/:id and GET /users/:user_id/certificates/:id/download. POST /users/:user_id/licenses and POST /groups/:group_id/licenses use your Coggno Prime subscription as a source and accept due_days and recert_interval.
2.22026-10-23Added GET /licenses/owned (the account’s licenses with seat counts), GET /marketplace/courses/:id (marketplace course details), GET /marketplace/categories/:id and GET /marketplace/sub_categories/:id.
2.12026-06-11Added license distribution and reset - POST /users/:user_id/licenses, DELETE /users/:user_id/licenses/:document_id, POST /groups/:group_id/licenses, GET and DELETE /groups/:group_id/licenses/:document_id. Users can be created without a password. Responses include created_at. GET /users/:user_id/licenses/:document_id returns a single license instead of a list.
2.02026-05-20First release of API v2 - companies, webhooks, groups, group users, users, user licenses (list, retrieve, launch URL), documents and document licenses.