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

# Quickstart

> Get started with the Carbon Business API by generating your API key, making your first request, and exploring the API.

<Steps>
  <Step title="Get Your API Keys">
    Before you can start using the Carbon Business API, you need to obtain your API credentials:

    1. Log in to the [Carbon Business developer portal](https://carbon-business-client-staging.getcarbon.co/)
    2. Navigate to the Developer menu (Top right dropdown > Developer)
    3. Generate your `CARBON_API_KEY` or use an existing one
    4. Contact our [integration team](mailto:sme@getcarbon.co) to obtain your `apikey`

    <Note>
      You'll need both keys for authentication: `apikey` (provided by our team) and `x-carbon-key` (generated from your dashboard).
    </Note>
  </Step>

  <Step title="Make Your First Request">
    Test your integration with the health check endpoint to ensure everything is working correctly.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X GET https://carbonapistagingsecure.getcarbon.co/baas/api/health_check \
        -H "apikey: YOUR_API_KEY" \
        -H "x-carbon-key: YOUR_CARBON_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const response = await fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/health_check', {
        headers: {
          'apikey': 'YOUR_API_KEY',
          'x-carbon-key': 'YOUR_CARBON_API_KEY'
        }
      });

      const data = await response.json();
      console.log(data);
      ```

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

      url = 'https://carbonapistagingsecure.getcarbon.co/baas/api/health_check'
      headers = {
          'apikey': 'YOUR_API_KEY',
          'x-carbon-key': 'YOUR_CARBON_API_KEY'
      }

      response = requests.get(url, headers=headers)
      print(response.json())
      ```
    </CodeGroup>

    **Expected Response:**

    ```json theme={null}
    {
      "message": "OK"
    }
    ```
  </Step>

  <Step title="Create Your First Customer">
    Before creating accounts, you need to create a customer record:

    <CodeGroup>
      ```javascript JavaScript theme={null}
      const customer = await fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/customers', {
        method: 'POST',
        headers: {
          'apikey': 'YOUR_API_KEY',
          'x-carbon-key': 'YOUR_CARBON_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          first_name: 'John',
          last_name: 'Doe',
          email: 'john.doe@example.com',
          phone: '08012345678',
          dob: '1990-01-01',
          gender: 'male',
          street: '123 Main St',
          city: 'Lagos',
          state: 'Lagos',
          country: 'Nigeria',
          bvn: '12345678901',
          nin: '12345678901'
        })
      });
      ```

      ```python Python theme={null}
      customer_data = {
          'first_name': 'John',
          'last_name': 'Doe',
          'email': 'john.doe@example.com',
          'phone': '08012345678',
          'dob': '1990-01-01',
          'gender': 'male',
          'street': '123 Main St',
          'city': 'Lagos',
          'state': 'Lagos',
          'country': 'Nigeria',
          'bvn': '12345678901',
          'nin': '12345678901'
      }

      response = requests.post(url + '/v1/customers', headers=headers, json=customer_data)
      customer = response.json()
      ```
    </CodeGroup>
  </Step>

  <Step title="Create a Virtual Account">
    Now create a virtual account for your customer:

    <CodeGroup>
      ```javascript JavaScript theme={null}
      const account = await fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts', {
        method: 'POST',
        headers: {
          'apikey': 'YOUR_API_KEY',
          'x-carbon-key': 'YOUR_CARBON_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          account_type: 'static',
          third_party: true,
          customer_id: 'customer-uuid-from-step-3'
        })
      });

      const accountData = await account.json();
      console.log('Virtual account created:', accountData);
      ```

      ```python Python theme={null}
      account_data = {
          'account_type': 'static',
          'third_party': True,
          'customer_id': 'customer-uuid-from-step-3'
      }

      response = requests.post(url + '/v1/accounts', headers=headers, json=account_data)
      account = response.json()
      print('Virtual account created:', account)
      ```
    </CodeGroup>
  </Step>
</Steps>

## What's Next?

<CardGroup cols={2}>
  <Card title="Set Up Webhooks" icon="bell" href="/webhooks/introduction">
    Configure webhook endpoints to receive real-time transaction notifications.
  </Card>

  <Card title="Explore API Reference" icon="book" href="/api-reference/introduction">
    Dive deeper into our comprehensive API documentation.
  </Card>

  <Card title="Test Payouts" icon="paper-plane" href="/api-reference/payouts/create-payout">
    Learn how to initiate payouts to beneficiary accounts.
  </Card>

  <Card title="Manage Transactions" icon="money-bill-transfer" href="/api-reference/transactions/verify-transaction">
    Understand how to verify and fetch transaction details.
  </Card>
</CardGroup>
