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

# Create a customer

> Create a customer record that scopes later Partner API calls.

Create a customer record that scopes later Partner API calls.

Save the returned `customer.id`. Use it as `{customerId}` when creating incorporations and when managing reusable Commenda OS resources such as people, business entities, and files.

```bash theme={null}
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/customers' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --data '{
    "email": "founder@example.com",
    "name": "Acme Holdings"
  }'
```

```json theme={null}
{
  "customer": {
    "id": 77,
    "name": "Acme Holdings",
    "createdAt": "2026-04-20T19:35:00.000Z",
    "updatedAt": "2026-04-20T19:35:00.000Z"
  }
}
```


## OpenAPI

````yaml POST /partner/customers
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /partner/customers:
    post:
      summary: Create a customer
      description: Create a customer record that scopes later Partner API calls.
      operationId: createPartnerCustomer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerCreateCustomerRequest'
      responses:
        '201':
          description: Customer created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerCreateCustomerResponse'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePublicError'
        '401':
          description: Missing or invalid partner API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliatePublicError'
      security:
        - xApiKeyAuth: []
      servers:
        - url: https://api.prod.commenda.io/api/v1
components:
  schemas:
    PartnerCreateCustomerRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
          description: Email address for the customer owner.
          example: founder@example.com
        name:
          type: string
          description: Optional display name for the customer record.
          example: Acme Holdings
    PartnerCreateCustomerResponse:
      type: object
      required:
        - customer
      properties:
        customer:
          $ref: '#/components/schemas/PartnerCustomer'
    AffiliatePublicError:
      type: object
      required:
        - statusCode
        - message
        - error
      properties:
        statusCode:
          type: integer
          example: 403
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Company does not belong to this affiliate firm
        error:
          type: string
          example: Forbidden
    PartnerCustomer:
      type: object
      required:
        - id
        - name
        - createdAt
        - updatedAt
      properties:
        id:
          type: integer
          description: Commenda customer identifier.
          example: 77
        name:
          type: string
          nullable: true
          description: Display name for the customer.
          example: Acme Holdings
        createdAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the customer record was created.
          example: '2026-04-20T19:35:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the customer record was last updated.
          example: '2026-04-20T19:40:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    xApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````