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

# Students

> Create and manage student records. Students are independent of courses and institutions.

# Students

Students are the recipients of certificates. Unlike institutions and courses, students are registered at the **tenant level** — they are not tied to a specific institution or course when created. A student can be enrolled in multiple courses and receive multiple certificates.

***

## The student object

```json theme={null}
{
  "uuid": "f6a7b8c9-d0e1-2345-fghi-456789012345",
  "name": "Maria Fernanda Silva",
  "email": "maria@email.com",
  "date_of_birth": "1998-05-20",
  "gender": "female",
  "social_name": null,
  "created_at": "2024-01-20T14:30:00.000000Z"
}
```

| Field           | Type         | Description                                         |
| --------------- | ------------ | --------------------------------------------------- |
| `uuid`          | string       | Unique identifier                                   |
| `name`          | string       | Full legal name                                     |
| `email`         | string       | Email address                                       |
| `date_of_birth` | date         | Date of birth (ISO 8601: `YYYY-MM-DD`)              |
| `gender`        | string       | Gender identity                                     |
| `social_name`   | string\|null | Social/preferred name (used in certificates if set) |

***

## List students

```http theme={null}
GET /students
```

<CodeGroup>
  ```bash cURL theme={null}
  # Search by email to avoid duplicate registration
  curl "https://api.dokstamp.com/students?where[user][email]=maria@email.com" \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "X-Tenant: {TENANT}"
  ```
</CodeGroup>

<Tip>
  Always search by email before creating a new student to prevent duplicates. Use `GET /students?where[user][email]=student@email.com`.
</Tip>

***

## Create a student

```http theme={null}
POST /students
```

| Parameter       | Type   | Required | Description                                      |
| --------------- | ------ | -------- | ------------------------------------------------ |
| `name`          | string | Yes      | Full legal name                                  |
| `email`         | string | Yes      | Email address (must be unique within the tenant) |
| `date_of_birth` | date   | Yes      | Date of birth (`YYYY-MM-DD`)                     |
| `gender`        | string | No       | Gender identity                                  |
| `social_name`   | string | No       | Preferred/social name                            |

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.dokstamp.com/students \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "X-Tenant: {TENANT}" \
    -d '{
      "name": "Maria Fernanda Silva",
      "email": "maria@email.com",
      "date_of_birth": "1998-05-20",
      "gender": "female"
    }'
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch('https://api.dokstamp.com/students', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${TOKEN}`,
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      'X-Tenant': TENANT,
    },
    body: JSON.stringify({
      name: 'Maria Fernanda Silva',
      email: 'maria@email.com',
      date_of_birth: '1998-05-20',
      gender: 'female',
    }),
  });
  const { data: student } = await res.json();
  // student.uuid is needed for enrollment and certificate creation
  ```
</CodeGroup>

**Response `201`:**

```json theme={null}
{
  "data": {
    "uuid": "f6a7b8c9-d0e1-2345-fghi-456789012345",
    "name": "Maria Fernanda Silva",
    "email": "maria@email.com",
    "date_of_birth": "1998-05-20",
    "gender": "female",
    "social_name": null
  }
}
```

***

## Get a student

```http theme={null}
GET /students/{uuid}
```

Use `includes` to load related data:

```bash theme={null}
GET /students/{uuid}?includes[enrollments]=1&includes[certificates]=1
```

***

## Update a student

```http theme={null}
PATCH /students/{uuid}
```

Send only the fields to change. Updating a student's name after a certificate has been issued does **not** change the name on existing certificates — the credential subject snapshot captured at issuance time is immutable.

***

## Delete a student

```http theme={null}
DELETE /students/{uuid}
DELETE /students/batch/destroy
```

Soft delete. Certificates issued to the student remain in the system.

***

## Related resources

* [Student Portfolio Pages](/en/api-reference/students/portfolio-pages) — allow students to create a public portfolio
* [Enrollments](/en/api-reference/enrollments) — link students to courses
* [Certificates](/en/api-reference/certificates/overview) — issue credentials to students
