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

# Quickstart

> Start building with the Fifteenth Partner API in under 10 minutes

## Get Your API Key

Email [partners@fifteenth.com](mailto:partners@fifteenth.com) to request API access for your organization.

## Test Your Connection

<CodeGroup>
  ```python Python theme={null}
  import requests

  api_key = "your_api_key_here"
  base_url = "https://api.fifteenth.com/v1beta"

  headers = {
      "Authorization": f"Bearer {api_key}",
      "Content-Type": "application/json"
  }

  response = requests.get(f"{base_url}/health", headers=headers)
  print(f"Status: {response.status_code}")
  ```

  ```javascript JavaScript theme={null}
  const apiKey = 'your_api_key_here';
  const baseURL = 'https://api.fifteenth.com/v1beta';

  const response = await fetch(`${baseURL}/health`, {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    }
  });

  console.log('Status:', response.status);
  ```

  ```bash cURL theme={null}
  curl -X GET "https://api.fifteenth.com/v1beta/health" \
    -H "Authorization: Bearer your_api_key_here"
  ```
</CodeGroup>

## Create a Client Account

<CodeGroup>
  ```python Python theme={null}
  account_data = {
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe"
  }

  response = requests.post(
    f"{base_url}/accounts",
    headers=headers,
    json=account_data
  )

  account = response.json()
  print(f"Account ID: {account['id']}")
  ```

  ```javascript JavaScript theme={null}
  const accountData = {
    email: 'john.doe@example.com',
    first_name: 'John',
    last_name: 'Doe'
  };

  const response = await fetch(`${baseURL}/accounts`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(accountData)
  });

  const account = await response.json();
  console.log('Account ID:', account.id);
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.fifteenth.com/v1beta/accounts" \
    -H "Authorization: Bearer your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "john.doe@example.com",
      "first_name": "John",
      "last_name": "Doe"
    }'
  ```
</CodeGroup>

## Upload a Tax Document

<CodeGroup>
  ```python Python theme={null}
  account_id = "12345"  # From previous response

  files = {'file': open('w2_form.pdf', 'rb')}
  data = {
      'tax_year': '2024',
      'description': 'W-2 from employer'
  }

  response = requests.post(
      f"{base_url}/accounts/{account_id}/documents",
      headers={"Authorization": f"Bearer {api_key}"},
      files=files,
      data=data
  )

  document = response.json()
  print(f"Document ID: {document['id']}")
  ```

  ```javascript JavaScript theme={null}
  const accountId = '12345';

  const formData = new FormData();
  formData.append('file', fileInput.files[0]);
  formData.append('tax_year', '2024');
  formData.append('description', 'W-2 from employer');

  const response = await fetch(`${baseURL}/accounts/${accountId}/documents`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`
    },
    body: formData
  });

  const document = await response.json();
  console.log('Document ID:', document.id);
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.fifteenth.com/v1beta/accounts/12345/documents" \
    -H "Authorization: Bearer your_api_key_here" \
    -F "file=@w2_form.pdf" \
    -F "tax_year=2024" \
    -F "description=W-2 from employer"
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    API keys and security
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference">
    All available endpoints
  </Card>
</CardGroup>

Need help? Email [partners@fifteenth.com](mailto:partners@fifteenth.com)
