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

# Quick Start

> Issue your first certificate in under 10 minutes with a real API walkthrough.

# Quick Start

This guide walks you through issuing a digital certificate end-to-end using real API calls. You'll create the minimum required entities and issue a certificate in a single session.

<Note>
  All entities must belong to the same tenant. Obtain your credentials from the DokStamp dashboard before starting.
</Note>

***

## Prerequisites

* Integration credentials (`client_id` and `client_secret`) — provided by your DokStamp account manager
* Your `X-Tenant` identifier
* A PDF file of the certificate to issue

***

## Step 1 — Obtain a Service Token

```bash theme={null}
curl -X POST https://api.dokstamp.com/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"
```

Save the `access_token` from the response. It is valid for **12 hours**. Use it in every subsequent request.

***

## Step 2 — Create an Institution

An institution is the issuing body. It must exist before courses or certificates.

```bash theme={null}
curl -X POST https://api.dokstamp.com/institutions \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d '{
    "name": "My University",
    "legal_name": "My University Foundation",
    "tax_id": "00.000.000/0001-00",
    "country": "Brazil",
    "website": "https://myuniversity.edu.br",
    "status": "active"
  }'
```

Save the `uuid` from the response — you'll need it as `institution_uuid`.

***

## Step 3 — Create a Course

```bash theme={null}
curl -X POST https://api.dokstamp.com/courses \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d '{
    "name": "Bachelor of Computer Science",
    "code": "BCS-2024",
    "description": "4-year undergraduate program in computer science.",
    "workload_hours": 3200,
    "status": "active",
    "institution_uuid": "{INSTITUTION_UUID}"
  }'
```

Save the `uuid` as `course_uuid`.

***

## Step 4 — Create a Student

```bash 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"
  }'
```

Save the `uuid` as `student_uuid`.

***

## Step 5 — Upload the PDF

Upload the signed certificate PDF file:

```bash theme={null}
curl -X POST https://api.dokstamp.com/files \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "X-Tenant: {TENANT}" \
  -F "files[]=@/path/to/certificate.pdf"
```

The response returns an array. Save the first item's `uuid` as `file_uuid`.

***

## Step 6 — Issue the Certificate

Now combine everything into a certificate:

```bash theme={null}
curl -X POST https://api.dokstamp.com/certificates \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d '{
    "institution_uuid": "{INSTITUTION_UUID}",
    "course_uuid": "{COURSE_UUID}",
    "student_uuid": "{STUDENT_UUID}",
    "file_uuid": "{FILE_UUID}",
    "finish": true
  }'
```

**Response:**

```json theme={null}
{
  "data": {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "issued",
    "issued_at": "2024-12-01T00:00:00.000000Z",
    "public_verification_url": "https://verificar.dokstamp.eu/a1b2c3d4",
    "student": { "name": "Maria Fernanda Silva" },
    "course": { "name": "Bachelor of Computer Science" },
    "institution": { "name": "My University" }
  }
}
```

The `public_verification_url` is the shareable link for credential verification.

***

## What's next?

<CardGroup cols={2}>
  <Card title="Entity Registration Order" icon="list-ol" href="/en/core-concepts/entity-registration-order">
    See the full dependency map before building integrations.
  </Card>

  <Card title="Certificate Lifecycle" icon="arrow-right-arrow-left" href="/en/core-concepts/certificate-lifecycle">
    Learn how certificates move from draft to issued, revoked, and expired.
  </Card>

  <Card title="Issue Certificate Guide" icon="graduation-cap" href="/en/guides/issue-first-certificate">
    A longer guide with modules, cohorts, enrollments, and templates.
  </Card>

  <Card title="API Reference" icon="code" href="/en/api-reference/authentication/login">
    Full parameter reference for every endpoint.
  </Card>
</CardGroup>
