# hackU API ## Guides ### Get started - [Introduction](https://api-docs.hacku.com/en/introduction.md): Connect your HR system, LMS or data warehouse to hackU. - [Quickstart](https://api-docs.hacku.com/en/quickstart.md): From an API key to a learner taking a course, in a few calls. - [Authentication](https://api-docs.hacku.com/en/authentication.md): Every request carries your company's API key in the Authorization header. - [Environments](https://api-docs.hacku.com/en/environments.md): Production and test base URLs. - [Conventions](https://api-docs.hacku.com/en/conventions.md): Pagination, dates, errors and identifiers. ### Guides - [Enrollment](https://api-docs.hacku.com/en/guides/enrollment.md): Assign pensums and courses, and activate users. - [Communications](https://api-docs.hacku.com/en/guides/communications.md): Send WhatsApp and email messages to your learners from your own systems. ### Updates - [Changelog](https://api-docs.hacku.com/en/changelog.md): New endpoints and changes to the hackU API. ## API reference ### Overview - [API reference](https://api-docs.hacku.com/en/api-reference.md): Every endpoint of the hackU client API, grouped by what you want to do. ### Endpoints #### Users - [List users](https://api-docs.hacku.com/api-reference/users/list-users.md): Lists non-staff users with an active membership in the API key's company, ordered by `-created, last_login` by default. Supports free-text search, date-range filters and ordering. - [Create or get a user](https://api-docs.hacku.com/api-reference/users/create-or-get-a-user.md): Get-or-create by email for the API key's company. Returns `201` when the user is created and `200` when an account for that email already exists in this company; the body is the same in both cases. On creation (unless `silent_creation`) a membership is created and, if `send_welcome_message` is true,… - [Get a user](https://api-docs.hacku.com/api-reference/users/get-a-user.md): Returns one user of the company, including profile, active modules and extra fields. - [Update a user (PUT)](https://api-docs.hacku.com/api-reference/users/update-a-user-put.md): Same as `PATCH /clients/users/{user_id}/`; every field is optional, so it is not a full replacement. - [Update a user](https://api-docs.hacku.com/api-reference/users/update-a-user.md): Updates name, email, flags, profile fields and extra fields. All fields are optional; empty strings and nulls are ignored. Returns the full updated user. `PUT` to the same path is also accepted and behaves identically. - [Update profile](https://api-docs.hacku.com/api-reference/users/update-profile.md): Partially updates friendly name, delivery hour and first/last name. Changing `hour` also moves the hour of every calendar day. Name changes are recorded in the company's change log. - [Replace delivery days](https://api-docs.hacku.com/api-reference/users/replace-delivery-days.md): Replaces the user's content-delivery calendar with the given days, at the profile's current hour. All previous days are deleted first. Days must use the Spanish names (`lunes` … `domingo`); this endpoint does not accept English names. - [Set extra field values](https://api-docs.hacku.com/api-reference/users/set-extra-field-values.md): Creates or updates the user's values for the given extra fields, matched by `slug_name` (the extra field's `name`). An extra field that does not exist yet is created on the company as a hidden text field titled with `name`. - [Activate or deactivate a user](https://api-docs.hacku.com/api-reference/users/activate-or-deactivate-a-user.md): `active: true` creates a membership and makes the user a client again (the user must have an active module); a WhatsApp welcome message is sent unless `avoid_send_welcome` is true. `active: false` marks the user as non-client and expires all memberships. - [Get a login link](https://api-docs.hacku.com/api-reference/users/get-a-login-link.md): Returns a URL that logs the user in. With `redirect` = `feed` or `eme-report` it generates a magic link to that page (shortened with Bitly unless `bitly=false`). Otherwise it returns the user's profile URL (optionally at `path`) with an auth token. Treat the URL as a credential. - [Get a login link (POST)](https://api-docs.hacku.com/api-reference/users/get-a-login-link-post.md): Same as the GET variant, but `redirect` and `bitly` are read from the JSON body. `path` is still read from the query string. - [Get gamification points](https://api-docs.hacku.com/api-reference/users/get-gamification-points.md): Returns the user's 20 most recent point entries, a per-category total and a pre-formatted summary text. Not paginated. - [Export users report](https://api-docs.hacku.com/api-reference/users/export-users-report.md): Downloads the company's students report (general information and course progress) as a file. Search and filter parameters of the user list do not apply. #### Enrollment - [Set active course and module](https://api-docs.hacku.com/api-reference/enrollment/set-active-course-and-module.md): Makes the given course (route) and module the user's single active ones: all of the user's other routes and modules are deactivated first. If a pensum slug is given and the course belongs to it, the user is also enrolled in that pensum. - [Assign a pensum](https://api-docs.hacku.com/api-reference/enrollment/assign-a-pensum.md): Enrolls the user in a pensum of the company and assigns the first course of the pensum the user has not completed. With `is_active` true (default) the user's other pensums are deactivated. Repeating the call is safe: the enrollment is updated, not duplicated. #### Progress - [Get a user's course](https://api-docs.hacku.com/api-reference/progress/get-a-users-course.md): Returns the user's enrollment in one course, with every module of the course and the user's progress and active flag in each. - [Get a user's pensum](https://api-docs.hacku.com/api-reference/progress/get-a-users-pensum.md): Returns the user's enrollment in one pensum with the pensum's courses in order. - [List a user's courses](https://api-docs.hacku.com/api-reference/progress/list-a-users-courses.md): Lists the user's current (non-removed) course enrollments with progress. - [List a user's modules in a course](https://api-docs.hacku.com/api-reference/progress/list-a-users-modules-in-a-course.md): Lists the modules of the course the user has started, with progress and dates. - [Get a user's module](https://api-docs.hacku.com/api-reference/progress/get-a-users-module.md): Returns the user's progress in one module of a course, including every content scheduled to the user in that module. - [List a user's modules](https://api-docs.hacku.com/api-reference/progress/list-a-users-modules.md): Lists every module the user has in the company's courses (active or not), with progress and minutes spent. - [List a user's pensums](https://api-docs.hacku.com/api-reference/progress/list-a-users-pensums.md): Lists the user's current (non-removed) pensum enrollments with progress. - [List a user's evaluations](https://api-docs.hacku.com/api-reference/progress/list-a-users-evaluations.md): Lists the user's latest attempt of each evaluation in courses that were not removed, with the grade (0-5) and the number of attempts. - [List a user's surveys](https://api-docs.hacku.com/api-reference/progress/list-a-users-surveys.md): Lists the user's survey responses in courses that were not removed, with every answered question. - [List a user's certificates](https://api-docs.hacku.com/api-reference/progress/list-a-users-certificates.md): Lists the certificates generated for the user, newest first. - [Get a content's status](https://api-docs.hacku.com/api-reference/progress/get-a-contents-status.md): Returns delivery and consumption data for one content scheduled to the user, identified by slug. If the delivery has no short URL yet it is generated (side effect). #### Catalog - [List courses](https://api-docs.hacku.com/api-reference/catalog/list-courses.md): Lists the company's courses (routes) with their modules in order. - [Get a course](https://api-docs.hacku.com/api-reference/catalog/get-a-course.md): Returns one of the company's courses with its modules in order. - [List a course's modules](https://api-docs.hacku.com/api-reference/catalog/list-a-courses-modules.md): Lists the modules of a company course, each with its contents (distributions) in order. #### Extra fields - [List extra field definitions](https://api-docs.hacku.com/api-reference/extra-fields/list-extra-field-definitions.md): Lists the company's custom user fields with their type and options. Not paginated. - [Validate an extra field value](https://api-docs.hacku.com/api-reference/extra-fields/validate-an-extra-field-value.md): Checks a value against an extra field's rules (non-empty, numeric for number fields, not already used for unique fields) without saving anything. #### Communications - [Upload media](https://api-docs.hacku.com/api-reference/communications/upload-media.md): Uploads an image, video or PDF to attach to a later `send` call. Returns the `url_pk` to reference it. Files are stored for the API key's company. - [Send a communication](https://api-docs.hacku.com/api-reference/communications/send-a-communication.md): Sends an approved template to up to 500 phone numbers (WhatsApp) or email addresses, through the company's WhatsApp line. Up to 100 valid recipients are queued during the request; above that the send is processed in the background and `status` is `PENDING`. Send an `Idempotency-Key` header to make r… ## OpenAPI Specs - [openapi](/es/openapi.yaml) - [openapi](/openapi.yaml) - [openapi](/pt/openapi.yaml) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Spanish (42 pages)](https://api-docs.hacku.com/_llms/es.txt): Guías, Referencia de la API. - [Brazilian Portuguese (41 pages)](https://api-docs.hacku.com/_llms/pt-br.txt): Guias, Referência da API. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.