> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/managebac/public-rest-apis/v2/unit-class-assignments.md).

# Unit Class Assignments

A Unit-Class Assignment is the link between a unit and a class, recording whether the unit is published (`active`) or in draft within that class.

## List Unit-Class Assignments

> Returns a paginated list of unit-class assignment records for the authenticated school. Each record describes a single unit's status (\`active\` or \`draft\`) within a single class. Designed for incremental sync: pass \`modified\_since\` to receive only assignments created or updated after a given time, or pass \`deleted\_since\` to receive only assignments soft-deleted after a given time. The two parameters are mutually exclusive.

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Unit-Class Assignments","description":"A Unit-Class Assignment is the link between a unit and a class, recording whether the unit is published (`active`) or in draft within that class."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"UnitClassAssignment":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID of the assignment record in ManageBac."},"unit_id":{"type":"integer","description":"ID of the unit (matches `id` in `GET /v2/units`)."},"class_id":{"type":"integer","description":"ID of the class this unit is assigned to."},"status":{"type":"string","description":"Whether the unit is published (`active`) or in a provisional state (`draft`) within this class. Omitted when the response was filtered by `deleted_since`.","enum":["active","draft"]},"created_at":{"type":"string","description":"ISO 8601 timestamp — when the assignment was first created."},"updated_at":{"type":"string","description":"ISO 8601 timestamp — when the assignment was last modified. Omitted when the response was filtered by `deleted_since`."},"deleted_at":{"type":"string","description":"ISO 8601 timestamp — when the assignment was removed. Only present in responses filtered by `deleted_since`."}}},"Meta":{"type":"object","description":"Pagination metadata included in all list (index) responses.","properties":{"current_page":{"type":"integer","description":"The page number of the current result set, starting from 1."},"total_pages":{"type":"integer","description":"The total number of pages available for this query."},"total_count":{"type":"integer","description":"The total number of records matching the query across all pages."},"per_page":{"type":"integer","description":"The number of records returned per page. Defaults to 100; can be overridden with the per_page query parameter (max 200)."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2/unit-class-assignments":{"get":{"summary":"List Unit-Class Assignments","operationId":"listUnitClassAssignments","tags":["Unit-Class Assignments"],"description":"Returns a paginated list of unit-class assignment records for the authenticated school. Each record describes a single unit's status (`active` or `draft`) within a single class. Designed for incremental sync: pass `modified_since` to receive only assignments created or updated after a given time, or pass `deleted_since` to receive only assignments soft-deleted after a given time. The two parameters are mutually exclusive.","parameters":[{"name":"modified_since","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 timestamp; returns only assignments updated strictly after this time. Mutually exclusive with `deleted_since`."},{"name":"deleted_since","in":"query","required":false,"schema":{"type":"string"},"description":"ISO 8601 timestamp; returns only assignments deleted strictly after this time. Mutually exclusive with `modified_since`. Records returned in this mode include `deleted_at` and omit `status` / `updated_at`."},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, returns assignments tied to archived units; when false or omitted, returns assignments tied to non-archived units. Mirrors the same parameter on `GET /v2/units`. **Applies to `modified_since` mode only** — `deleted_since` always returns every soft-deleted assignment (including orphans whose underlying unit was hard-deleted) regardless of this parameter, so clients can clean up local storage."},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"Page number (default 1)."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer"},"description":"Items per page (default 100, min 1, max 500)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"unit_class_assignments":{"type":"array","items":{"$ref":"#/components/schemas/UnitClassAssignment"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}}}}}}
```
