> ## 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.

# Student Portfolio Pages

> Allow students to create a public page showcasing their earned certificates.

# Student Portfolio Pages

Students can curate a public portfolio page that displays selected certificates. Portfolio pages have a unique `slug` (e.g., `maria-silva`) and can be toggled public or private.

***

## The portfolio page object

```json theme={null}
{
  "uuid": "a1b2c3d4-e5f6-7890-abcd-000000000001",
  "slug": "maria-fernanda-silva",
  "is_public": true,
  "bio": "Computer science graduate passionate about AI and open source.",
  "student": {
    "uuid": "f6a7b8c9-d0e1-2345-fghi-456789012345",
    "name": "Maria Fernanda Silva"
  },
  "items": [
    {
      "uuid": "b2c3d4e5-f6a7-8901-bcde-000000000002",
      "sort_order": 1,
      "is_visible": true,
      "certificate": {
        "uuid": "a1b2c3d4-...",
        "public_verification_url": "https://verificar.dokstamp.eu/a1b2c3d4"
      }
    }
  ]
}
```

***

## List student pages

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

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.dokstamp.com/students/f6a7b8c9-d0e1-2345-fghi-456789012345/pages" \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "X-Tenant: {TENANT}"
  ```
</CodeGroup>

***

## Create a portfolio page

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

| Parameter   | Type    | Required | Description                       |
| ----------- | ------- | -------- | --------------------------------- |
| `slug`      | string  | Yes      | URL-friendly unique identifier    |
| `is_public` | boolean | No       | Default: `false`                  |
| `bio`       | string  | No       | Student bio displayed on the page |

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.dokstamp.com/students/f6a7b8c9-d0e1-2345-fghi-456789012345/pages" \
    -H "Authorization: Bearer {TOKEN}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -H "X-Tenant: {TENANT}" \
    -d '{
      "slug": "maria-fernanda-silva",
      "is_public": true,
      "bio": "Computer science graduate passionate about AI and open source."
    }'
  ```
</CodeGroup>

***

## Manage page items (certificates)

### Add a certificate to the portfolio

```http theme={null}
POST /students/{student_uuid}/pages/{page_uuid}/items
```

| Parameter          | Type    | Required | Description                    |
| ------------------ | ------- | -------- | ------------------------------ |
| `certificate_uuid` | string  | Yes      | UUID of the certificate to add |
| `sort_order`       | integer | No       | Position in the portfolio      |
| `is_visible`       | boolean | No       | Default: `true`                |

### List page items

```http theme={null}
GET /students/{student_uuid}/pages/{page_uuid}/items
```

### Update item visibility or order

```http theme={null}
PATCH /students/{student_uuid}/pages/{page_uuid}/items/{item_uuid}
```

### Remove a certificate from the portfolio

```http theme={null}
DELETE /students/{student_uuid}/pages/{page_uuid}/items/{item_uuid}
DELETE /students/{student_uuid}/pages/{page_uuid}/items/batch/destroy
```

***

## Get, update, delete a portfolio page

```http theme={null}
GET    /students/{student_uuid}/pages/{page_uuid}
PATCH  /students/{student_uuid}/pages/{page_uuid}
PUT    /students/{student_uuid}/pages/{page_uuid}
DELETE /students/{student_uuid}/pages
```
