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

# Quick Start Guide

> Get up and running with TimeLockData API in under 5 minutes

This guide walks you through your first API calls: creating a category, an evidence record, and verifying it on the blockchain.

## Prerequisites

* A TimeLockData account
* Your API key (`X-API-Key`)
* A tool for making HTTP requests (curl, Postman, or any HTTP client)

## Step 1: Get Your API Key

Log in to the [TimeLockData Dashboard](https://app.timelockdata.com) and navigate to **Administration > Source Systems** to create a new source system and generate an API key.

<Note>
  Keep your API key secure and never expose it in client-side code or public repositories.
</Note>

## Step 2: Test the Connection

Verify the API is reachable with a health check:

<CodeGroup>
  ```bash curl theme={null}
  curl -X GET "https://api.timelockdata.com/api/v1/test"
  ```

  ```javascript fetch theme={null}
  const response = await fetch('https://api.timelockdata.com/api/v1/test');
  const data = await response.json();
  console.log(data);
  ```

  ```python requests theme={null}
  import requests

  response = requests.get('https://api.timelockdata.com/api/v1/test')
  print(response.json())
  ```
</CodeGroup>

Expected response:

```json theme={null}
{
  "status": "OK"
}
```

## Step 3: Create a Category

Categories organize your evidences. Replace `{COMPANY_ID}` with your company identifier.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://api.timelockdata.com/api/v1/evidences/{COMPANY_ID}/category" \
    -H "X-API-Key: your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Equipment",
      "description": "Industrial equipment tracking"
    }'
  ```

  ```javascript fetch theme={null}
  const response = await fetch(
    `https://api.timelockdata.com/api/v1/evidences/${companyId}/category`,
    {
      method: 'POST',
      headers: {
        'X-API-Key': 'your-api-key',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        name: 'Equipment',
        description: 'Industrial equipment tracking'
      })
    }
  );
  const category = await response.json();
  console.log('Category created:', category);
  ```
</CodeGroup>

Response:

```json theme={null}
{
  "id": "cat-uuid-here"
}
```

## Step 4: Create a Subcategory

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://api.timelockdata.com/api/v1/evidences/{COMPANY_ID}/category/{CATEGORY_ID}/subcategory" \
    -H "X-API-Key: your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Forklifts",
      "description": "Forklift fleet"
    }'
  ```
</CodeGroup>

## Step 5: Create an Evidence

Register a digital event as an evidence record within your category and subcategory:

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://api.timelockdata.com/api/v1/evidences/{COMPANY_ID}/category/{CATEGORY_ID}/subcategory/{SUBCATEGORY_ID}/evidence" \
    -H "X-API-Key: your-api-key" \
    -F "externalId=FORKLIFT-001" \
    -F "name=Forklift Unit 1" \
    -F "owner=Warehouse A" \
    -F "description=Toyota 8FGU25 forklift"
  ```

  ```javascript fetch theme={null}
  const formData = new FormData();
  formData.append('externalId', 'FORKLIFT-001');
  formData.append('name', 'Forklift Unit 1');
  formData.append('owner', 'Warehouse A');
  formData.append('description', 'Toyota 8FGU25 forklift');

  const response = await fetch(
    `https://api.timelockdata.com/api/v1/evidences/${companyId}/category/${categoryId}/subcategory/${subcategoryId}/evidence`,
    {
      method: 'POST',
      headers: { 'X-API-Key': 'your-api-key' },
      body: formData
    }
  );
  const evidence = await response.json();
  console.log('Evidence created:', evidence);
  ```
</CodeGroup>

Response:

```json theme={null}
{
  "id": "dt-uuid-here"
}
```

The evidence is now being anchored on the blockchain. This process is asynchronous.

## Step 6: Verify on the Blockchain

Once the evidence is confirmed on the blockchain, you can verify its existence using the public verification endpoint (no authentication required):

```bash theme={null}
curl -X GET "https://api.timelockdata.com/api/v1/merkle/verify/FORKLIFT-001"
```

This returns blockchain proof including the transaction ID, block number, Merkle proof, and TSA timestamp -- proving that **specific data existed in a specific state at a specific time**.

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="shield-halved" href="/authentication">
    Learn about API Key authentication
  </Card>

  <Card title="API Reference" icon="book-open" href="/api-reference/overview">
    Explore all available endpoints
  </Card>

  <Card title="Upload Files" icon="file-arrow-up" href="/api-reference/files/upload">
    Attach documents and images to evidences
  </Card>

  <Card title="Verification" icon="circle-check" href="/api-reference/merkle/verify-evidence">
    Verify data integrity with blockchain proofs
  </Card>
</CardGroup>

## Troubleshooting

**401 Unauthorized** -- Verify your API key is correct and included in the `X-API-Key` header.

**400 Bad Request** -- Check that required fields (`name`, `externalId`, `owner`) are present.

**Need help?** Contact us at [info@timelockdata.com](mailto:info@timelockdata.com).
