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

# Create Organization

> Creates a new organization under a reseller

## Path Parameters

<ParamField path="resellerId" type="string" required>
  The reseller ID to create the organization under
</ParamField>

## Request Body

<ParamField body="orgName" type="string" required>
  Name of the organization
</ParamField>

<ParamField body="external_id" type="string">
  External identifier for integration with your systems
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.telzino.com/v1/resellers/reseller-123/organizations" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "orgName": "Acme Solar",
      "external_id": "external-org-12345"
    }'
  ```

  ```javascript JavaScript theme={null}
  const resellerId = 'reseller-123';

  const response = await fetch(
    `https://api.telzino.com/v1/resellers/${resellerId}/organizations`,
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        orgName: 'Acme Solar',
        external_id: 'external-org-12345'
      })
    }
  );

  const organization = await response.json();
  ```

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

  reseller_id = 'reseller-123'

  response = requests.post(
      f'https://api.telzino.com/v1/resellers/{reseller_id}/organizations',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
      json={
          'orgName': 'Acme Solar',
          'external_id': 'external-org-12345'
      }
  )

  organization = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "org-abc12345-e89b-12d3-a456-426614174000",
    "reseller_id": "reseller-123",
    "name": "Acme Solar",
    "external_id": "external-org-12345",
    "created_at": "2024-01-15T10:30:00Z"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Invalid request data",
    "details": [
      {
        "code": "too_small",
        "minimum": 1,
        "type": "string",
        "inclusive": true,
        "exact": false,
        "message": "orgName is required",
        "path": ["orgName"]
      }
    ]
  }
  ```
</ResponseExample>
