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

# Create a business

> Create a new business



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/businesses
openapi: 3.0.1
info:
  title: Slant Public API V1
  version: v1
  description: Public API for creating and managing resources in Slant
  contact:
    name: Slant API Support
    email: api@slant.com
servers:
  - url: https://api.slant.app
security:
  - bearer: []
paths:
  /v1/businesses:
    post:
      tags:
        - Businesses
      summary: Create a business
      description: Create a new business
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >-
            Unique key to ensure idempotent request handling. If a request with
            the same key was already processed, the original response will be
            returned.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - book_id
                - name
              properties:
                book_id:
                  type: string
                  description: The book ID
                  example: abc123xyz
                name:
                  type: string
                  description: Business name
                  example: Acme Corp
                industry:
                  type: string
                  description: Industry
                  example: Technology
                website_url:
                  type: string
                  description: Website URL
                  example: https://acme.com
                tax_id:
                  type: string
                  description: Tax ID
                  example: 12-3456789
                additional_info:
                  type: string
                  description: Additional information
                email_addresses:
                  type: array
                  description: Array of email addresses
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                        example: info@acme.com
                      email_type:
                        type: string
                        enum:
                          - personal
                          - business
                          - school
                          - other
                        example: business
                      is_primary:
                        type: boolean
                        example: true
                phone_numbers:
                  type: array
                  description: Array of phone numbers
                  items:
                    type: object
                    properties:
                      phone_number:
                        type: string
                        example: '+15555551234'
                      phone_type:
                        type: string
                        enum:
                          - mobile
                          - work
                          - home
                          - fax
                          - other
                        example: work
                      is_primary:
                        type: boolean
                        example: true
                addresses:
                  type: array
                  description: Array of addresses
                  items:
                    type: object
                    properties:
                      line1:
                        type: string
                        example: 123 Main St
                      line2:
                        type: string
                        example: Suite 100
                      city:
                        type: string
                        example: New York
                      state:
                        type: string
                        example: NY
                      zip:
                        type: string
                        example: '10001'
                      country_code:
                        type: string
                        example: US
                      address_type:
                        type: string
                        enum:
                          - home
                          - work
                          - mailing
                          - other
                        example: work
                      is_primary:
                        type: boolean
                        example: true
                tag_ids:
                  type: array
                  items:
                    type: string
                  description: Array of tag IDs to associate
        required: true
      responses:
        '201':
          description: business created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Business'
        '400':
          description: bad request - invalid JSON
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - detail
                properties:
                  error:
                    type: string
                    description: Error code
                    enum:
                      - invalid_json
                  detail:
                    oneOf:
                      - type: string
                        description: Human-readable error description
                      - type: array
                        items:
                          type: string
                        description: Array of validation error messages
        '401':
          description: unauthorized - missing or invalid token
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - detail
                properties:
                  error:
                    type: string
                    description: Error code
                    enum:
                      - token_missing
                      - token_invalid
                  detail:
                    oneOf:
                      - type: string
                        description: Human-readable error description
                      - type: array
                        items:
                          type: string
                        description: Array of validation error messages
        '403':
          description: forbidden
        '422':
          description: unprocessable entity - invalid payload
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - detail
                properties:
                  error:
                    type: string
                    description: Error code
                    enum:
                      - invalid_payload
                      - record_invalid
                      - parameter_missing
                  detail:
                    oneOf:
                      - type: string
                        description: Human-readable error description
                      - type: array
                        items:
                          type: string
                        description: Array of validation error messages
      security:
        - bearer: []
components:
  schemas:
    Business:
      type: object
      required:
        - id
        - book_id
        - name
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: The business ID
          example: abc123xyz
        book_id:
          type: string
          description: The book ID
          example: book123xyz
        name:
          type: string
          description: Business name
          example: Acme Corp
        industry:
          type: string
          description: Industry
          example: Technology
          nullable: true
        website_url:
          type: string
          description: Website URL
          example: https://acme.com
          nullable: true
        tax_id:
          type: string
          description: Tax ID
          example: 12-3456789
          nullable: true
        additional_info:
          type: string
          description: Additional information
          nullable: true
        created_at:
          type: string
          format: date-time
          description: When the business was created
        updated_at:
          type: string
          format: date-time
          description: When the business was last updated
        email_addresses:
          type: array
          items:
            $ref: '#/components/schemas/Email'
          description: Array of email addresses
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
          description: Array of phone numbers
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Array of addresses
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
          description: Array of tags
    Email:
      type: object
      required:
        - email
        - email_type
        - is_primary
      properties:
        email:
          type: string
          format: email
          example: john.doe@example.com
        email_type:
          type: string
          enum:
            - personal
            - business
            - school
            - other
          example: personal
        is_primary:
          type: boolean
          example: true
    PhoneNumber:
      type: object
      required:
        - phone_number
        - phone_type
        - is_primary
      properties:
        phone_number:
          type: string
          example: '+15555551234'
        extension:
          type: string
          nullable: true
          example: '1234'
        phone_type:
          type: string
          enum:
            - mobile
            - work
            - home
            - fax
            - other
          example: mobile
        is_primary:
          type: boolean
          example: true
    Address:
      type: object
      required:
        - address_type
        - is_primary
      properties:
        line1:
          type: string
          example: 123 Main St
          nullable: true
        line2:
          type: string
          example: Apt 4B
          nullable: true
        city:
          type: string
          example: New York
          nullable: true
        state:
          type: string
          example: NY
          nullable: true
        zip:
          type: string
          example: '10001'
          nullable: true
        country_code:
          type: string
          example: US
          nullable: true
        address_type:
          type: string
          enum:
            - home
            - work
            - mailing
            - other
          example: home
        is_primary:
          type: boolean
          example: true
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: OAuth
      description: OAuth 2.0 Bearer Token from Clerk authentication

````