> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TheMembers as a data source

> Bring data from TheMembers to your Lakehouse.

TheMembers is a Brazilian membership-area platform for online courses and communities. The connector extracts data from the TheMembers API v1 (`api.themembers.com.br`), so you can centralize your students, subscriptions, products, and course-consumption data in your Lakehouse.

## Configuring TheMembers as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the TheMembers option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

You'll need to provide a TheMembers API token so Nekt can access your data. It is sent as a bearer token on every request.

To generate it, sign in to the [TheMembers dashboard](https://dashboard.themembers.com.br) as a platform administrator and go to **Plataforma > Configurações > Tokens**. Two kinds of token are listed there:

* **Token legado** — used by the older user-management API. It does **not** work with this connector.
* **API Token v1** — the one this connector uses.

Generate an **API Token v1** and copy it right away.

<Warning>For security reasons, TheMembers only shows the token once, at creation. If you lose it, revoke it and generate a new one.</Warning>

The following configuration is available:

* **API token**: Your TheMembers API Token v1, generated as described above.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.

> Tip: The stream can be found more easily by typing its name.

<Note>The **Student scores** stream reads the community points of one student per request, so it takes about as long as your platform has students. Select it only if you need the gamification numbers.</Note>

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: the TheMembers API exposes no date filter on any of its list endpoints, so every stream of this connector replicates in **FULL\_TABLE** mode — each run brings the current state of the data.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/get-started/core-concepts/triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can define some additional settings:

* Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control).

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

## Rate limits

TheMembers allows up to **300 requests per minute** per token. When the limit is reached, the API answers with the number of seconds to wait and the connector honors it, retrying with backoff — the extraction slows down but no data is lost. If you need a higher limit, contact TheMembers support.

## Good to know

* **Access status and subscription status are different things.** In the Subscriptions stream, `active` tells you whether the student can currently open the product's content, while `status` carries the commercial state of the subscription (active, inactive, refunded, cancel, or chargeback). A refunded subscription can still show released access until it is blocked on the platform.
* **The course tree comes in three shapes.** Courses carries the whole tree as a JSON string in `modules`, while Course modules and Course lessons publish the same data as flat tables. They are extracted from the same API response, so selecting all three costs no extra requests.
* **Course accesses is per course, not per student.** It brings one row per student and course, including the completion date, from a single request per course.

# Streams and Fields

Below you'll find all available data streams from TheMembers and their corresponding fields:

<AccordionGroup>
  <Accordion title="Students">
    Every student registered on the platform, with or without an active subscription. One row per student.

    **Primary key:** `id` · **Sync type:** full table

    | Field          | Type     | Description                                                                                                                        |
    | :------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------- |
    | `id`           | String   | Unique identifier of the student.                                                                                                  |
    | `first_name`   | String   | First name of the student.                                                                                                         |
    | `last_name`    | String   | Last name of the student.                                                                                                          |
    | `full_name`    | String   | Full name of the student, as displayed in the members area.                                                                        |
    | `email`        | String   | Email address the student signs in with.                                                                                           |
    | `photo_url`    | String   | URL of the student's profile picture.                                                                                              |
    | `phone`        | String   | Phone number registered for the student.                                                                                           |
    | `genre`        | String   | Gender registered for the student.                                                                                                 |
    | `birth`        | DateTime | Date of birth of the student, returned by the API as a date (YYYY-MM-DD).                                                          |
    | `document`     | String   | Brazilian tax document of the student, CPF or CNPJ.                                                                                |
    | `reference_id` | String   | External identifier of the student, set by whichever system created them (used to match the student against an external platform). |
    | `created_at`   | DateTime | Timestamp when the student was registered on the platform.                                                                         |
    | `updated_at`   | DateTime | Timestamp when the student record was last updated.                                                                                |
  </Accordion>

  <Accordion title="Subscriptions">
    Every subscription of the platform: the link between a student and a product, with both the commercial status and the access flag. One row per student and product.

    **Primary key:** `student_id`, `product_id` · **Sync type:** full table

    | Field                 | Type     | Description                                                                                                                                                                                                        |
    | :-------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `id`                  | String   | Unique identifier of the subscription, when the API returns one.                                                                                                                                                   |
    | `active`              | Integer  | Access status: 1 when the student can currently open the product's content, 0 when the access is blocked. This is the flag that actually controls access, and it is not the same thing as the subscription status. |
    | `status`              | String   | Commercial status of the subscription: active, inactive, refunded, cancel or chargeback.                                                                                                                           |
    | `product_id`          | String   | Identifier of the subscribed product.                                                                                                                                                                              |
    | `product_title`       | String   | Title of the subscribed product.                                                                                                                                                                                   |
    | `product_description` | String   | Description of the subscribed product.                                                                                                                                                                             |
    | `product_created_at`  | DateTime | Timestamp when the subscribed product was created.                                                                                                                                                                 |
    | `product_updated_at`  | DateTime | Timestamp when the subscribed product was last updated.                                                                                                                                                            |
    | `student_id`          | String   | Identifier of the subscribed student.                                                                                                                                                                              |
    | `student_first_name`  | String   | First name of the student.                                                                                                                                                                                         |
    | `student_last_name`   | String   | Last name of the student.                                                                                                                                                                                          |
    | `student_full_name`   | String   | Full name of the student.                                                                                                                                                                                          |
    | `student_email`       | String   | Email address of the student.                                                                                                                                                                                      |
    | `payment_last_date`   | DateTime | Date of the last payment of this subscription (YYYY-MM-DD).                                                                                                                                                        |
    | `accession_date`      | DateTime | Date the student joined this product (YYYY-MM-DD).                                                                                                                                                                 |
    | `expiration_date`     | DateTime | Date the access to this product expires (YYYY-MM-DD).                                                                                                                                                              |
    | `cancel_date`         | DateTime | Date the subscription was cancelled (YYYY-MM-DD), empty while it is not.                                                                                                                                           |
    | `created_at`          | DateTime | Timestamp when the subscription was created.                                                                                                                                                                       |
    | `updated_at`          | DateTime | Timestamp when the subscription was last updated.                                                                                                                                                                  |
  </Accordion>

  <Accordion title="Products">
    Products sold by the platform, with the number of subscriptions whose access is released or blocked.

    **Primary key:** `id` · **Sync type:** full table

    | Field                       | Type     | Description                                                                                            |
    | :-------------------------- | :------- | :----------------------------------------------------------------------------------------------------- |
    | `id`                        | String   | Unique identifier of the product.                                                                      |
    | `title`                     | String   | Title of the product.                                                                                  |
    | `description`               | String   | Description of the product.                                                                            |
    | `period`                    | Integer  | Length of the access period granted by the product, in months.                                         |
    | `external_checkout_product` | String   | Identifier of the product in the external checkout platform, when the sale happens outside TheMembers. |
    | `lifetime`                  | Boolean  | Whether the product grants lifetime access instead of expiring.                                        |
    | `status`                    | String   | Status of the product: active or canceled.                                                             |
    | `type`                      | String   | Sales model of the product: recurring or one\_time.                                                    |
    | `sales_page_url`            | String   | URL of the product's sales page.                                                                       |
    | `support_email`             | String   | Email address students should contact for support on this product.                                     |
    | `trial`                     | String   | Trial period offered by the product.                                                                   |
    | `upsell`                    | String   | Upsell text shown for this product.                                                                    |
    | `upsell_url`                | String   | URL the product's upsell points to.                                                                    |
    | `subscribers_active`        | Integer  | Number of subscriptions of this product whose access is currently released.                            |
    | `subscribers_inactive`      | Integer  | Number of subscriptions of this product whose access is currently blocked.                             |
    | `created_at`                | DateTime | Timestamp when the product was created.                                                                |
    | `updated_at`                | DateTime | Timestamp when the product was last updated.                                                           |
  </Accordion>

  <Accordion title="Courses">
    Course catalogue of the members area. The full module tree comes in the `modules` column as a JSON string; the same data is available flattened in the Course modules and Course lessons streams.

    **Primary key:** `id` · **Sync type:** full table

    | Field         | Type    | Description                                                                                                                                                                        |
    | :------------ | :------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `id`          | String  | Unique identifier of the course.                                                                                                                                                   |
    | `title`       | String  | Title of the course.                                                                                                                                                               |
    | `description` | String  | Description of the course.                                                                                                                                                         |
    | `status`      | String  | Status of the course on the platform.                                                                                                                                              |
    | `slug`        | String  | URL slug of the course in the members area.                                                                                                                                        |
    | `blocked`     | Integer | Whether the course is blocked for students: 1 when blocked, 0 when open.                                                                                                           |
    | `published`   | Integer | Whether the course is published: 1 when visible to students, 0 when not.                                                                                                           |
    | `url_upsell`  | String  | URL the course's upsell points to.                                                                                                                                                 |
    | `text_upsell` | String  | Upsell text shown for this course.                                                                                                                                                 |
    | `modules`     | String  | Full content tree of the course as a JSON array of module objects, each with its lessons. The same data is available flattened in the course\_modules and course\_lessons streams. |
  </Accordion>

  <Accordion title="Course modules">
    Modules of every course, flattened out of the course listing. No extra request is made per course.

    **Primary key:** `course_id`, `id` · **Sync type:** full table

    | Field          | Type    | Description                                                                                                           |
    | :------------- | :------ | :-------------------------------------------------------------------------------------------------------------------- |
    | `course_id`    | String  | Identifier of the course the module belongs to.                                                                       |
    | `course_title` | String  | Title of the course the module belongs to.                                                                            |
    | `id`           | String  | Unique identifier of the module.                                                                                      |
    | `title`        | String  | Title of the module.                                                                                                  |
    | `description`  | String  | Description of the module.                                                                                            |
    | `slug`         | String  | URL slug of the module in the members area.                                                                           |
    | `blocked`      | Integer | Whether the module is blocked for students: 1 when blocked, 0 when open.                                              |
    | `published`    | Integer | Whether the module is published: 1 when visible to students, 0 when not.                                              |
    | `url_upsell`   | String  | URL the module's upsell points to.                                                                                    |
    | `text_upsell`  | String  | Upsell text shown for this module.                                                                                    |
    | `lessons`      | String  | Lessons of the module as a JSON array of objects. The same data is available flattened in the course\_lessons stream. |
  </Accordion>

  <Accordion title="Course lessons">
    Lessons of every module, flattened out of the course listing. No extra request is made per course or module.

    **Primary key:** `course_id`, `module_id`, `id` · **Sync type:** full table

    | Field          | Type    | Description                                                              |
    | :------------- | :------ | :----------------------------------------------------------------------- |
    | `course_id`    | String  | Identifier of the course the lesson belongs to.                          |
    | `course_title` | String  | Title of the course the lesson belongs to.                               |
    | `module_id`    | String  | Identifier of the module the lesson belongs to.                          |
    | `module_title` | String  | Title of the module the lesson belongs to.                               |
    | `id`           | String  | Unique identifier of the lesson.                                         |
    | `title`        | String  | Title of the lesson.                                                     |
    | `subtitle`     | String  | Subtitle of the lesson.                                                  |
    | `slug`         | String  | URL slug of the lesson in the members area.                              |
    | `blocked`      | Integer | Whether the lesson is blocked for students: 1 when blocked, 0 when open. |
    | `published`    | Integer | Whether the lesson is published: 1 when visible to students, 0 when not. |
    | `url_upsell`   | String  | URL the lesson's upsell points to.                                       |
    | `text_upsell`  | String  | Upsell text shown for this lesson.                                       |
  </Accordion>

  <Accordion title="Course accesses">
    Access history of each student on each course, including whether and when the course was completed. One request is made per course.

    **Primary key:** `id`, `course_id` · **Sync type:** full table

    | Field            | Type     | Description                                                             |
    | :--------------- | :------- | :---------------------------------------------------------------------- |
    | `id`             | String   | Unique identifier of the student.                                       |
    | `name`           | String   | Name of the student.                                                    |
    | `email`          | String   | Email address of the student.                                           |
    | `course_id`      | String   | Identifier of the course.                                               |
    | `course_name`    | String   | Name of the course.                                                     |
    | `last_access_at` | DateTime | Date the student last opened this course, empty when never opened.      |
    | `finished`       | Integer  | Whether the student completed the course: 1 when completed, 0 when not. |
    | `finished_at`    | DateTime | Date the student completed the course, empty while not completed.       |
  </Accordion>

  <Accordion title="Student scores">
    Community gamification points of each student. This stream reads one student per request, so it takes about as long as the platform has students.

    **Primary key:** `student_id` · **Sync type:** full table

    | Field        | Type    | Description                                                  |
    | :----------- | :------ | :----------------------------------------------------------- |
    | `student_id` | String  | Identifier of the student the score belongs to.              |
    | `score`      | Integer | Total number of community points accumulated by the student. |
    | `posts`      | Integer | Number of community posts written by the student.            |
    | `comments`   | Integer | Number of comments written by the student in the community.  |
    | `replies`    | Integer | Number of replies written by the student in the community.   |
  </Accordion>
</AccordionGroup>
