> ## Documentation Index
> Fetch the complete documentation index at: https://www.help.creatora.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Give a Student access to a Course

> Grant an existing Student direct access to an existing Course in a controlled Administrator workflow.

This workflow grants Course access directly. It does not register a sale or create an Order. Use it for a controlled Administrator action, including an integration operated with review of the target account and Course.

## Get the two IDs

1. [Find the Student](/en/api/recipes/find-student) and keep the returned `studentId`. Confirm the account has the `student` role.
2. [List Courses](/en/api/recipes/list-courses) or [Get the Course](/en/api/recipes/get-course) and keep its `courseId`.
3. If needed, [read the Student's current Courses](/en/api/recipes/get-student-courses) before granting access.

```text theme={null}
Find Student → studentId
List/Get Course → courseId
grantCourseOwnershipToStudent(courseId, studentId)
```

## Grant access

Send your [Administrator headers](/en/api/api-conventions#requests-and-access-mode):

```graphql theme={null}
mutation GiveStudentCourseAccess($courseId: UUID!, $studentId: UUID!) {
  grantCourseOwnershipToStudent(courseId: $courseId, studentId: $studentId)
}
```

```json theme={null}
{ "courseId": "<COURSE_ID>", "studentId": "<STUDENT_ID>" }
```

The mutation returns `Unit` rather than a grant receipt. A repeated direct grant can fail. After a timeout or ambiguous result, [check the Student's current Course access](/en/api/recipes/get-student-courses) before considering another call. If the Course already appears, stop and reconcile the result; current ownership alone does not identify which grant source created access. Do not retry automatically.

See the [`grantCourseOwnershipToStudent` mutation reference](/en/api/reference/mutations/grantCourseOwnershipToStudent) for its supported arguments and return scalar.
