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

# Create firm

> Creates a firm for the current authenticated client and registers an existing user as a staff member and firm owner.



## OpenAPI

````yaml /openapi.json post /firm
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /firm:
    post:
      tags:
        - Firm
      summary: Create firm
      description: >-
        Creates a firm for the current authenticated client and registers an
        existing user as a staff member and firm owner.
      operationId: CreateFirm
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateFirmDto'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateFirmDto'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateFirmDto'
      responses:
        '202':
          description: >-
            When request is accepted. Returns a hypermedia 'Link' object of the
            firm to be created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: >-
            When staff user does not exist or is already associated with another
            firm.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    CreateFirmDto:
      type: object
      properties:
        productId:
          type: string
          description: "The product/tier the firm is subscribed to. Must be set when creating the firm and is optional when updating the firm.\r\n\r\nThe supported products are listed in order below, the identifier (in brackets) must be used.\r\n\r\n* Bill (SMK001)\r\n\r\n* Boost (SMK004)\r\n\r\n* Grow (SMK002)\r\n\r\n* Prosper + (SMK003)\r\n\r\nPossible values: SMK001, SMK004, SMK002, SMK003"
          nullable: true
          example: SMK001
        addOnIds:
          uniqueItems: true
          type: array
          items:
            type: string
          description: "The optional add-ons the firm is subscribed to. Must be specified with an accompanying productId.\r\n\r\nThe supported add-ons are listed below, the identifier (listed in brackets) must be used.\r\n\r\n* Intake (ADD001)\r\n\r\n* AutoTime (ADD003)\r\n\r\n* FamilyPro (ADD004)\r\n\r\n* Api (ADD005)\r\n\r\n* Workflows (ADD006)\r\n\r\n* PowerBI (ADD007)\r\n\r\n* Archie (ADD008)\r\n\r\n* SSO (ADD010)\r\n\r\nPossible values: ADD01, ADD003, ADD004, ADD005, ADD006, ADD007, ADD008, ADD010"
          nullable: true
          example:
            - ADD01
            - ADD003
        name:
          type: string
          description: The name of the firm.
          nullable: true
          example: Brown LLC
        email:
          type: string
          description: "The email of the firm.\r\n\r\nOnly supported in AU."
          nullable: true
          example: john.smith@law.com
        abn:
          type: string
          description: "Represents a different field depending on the region.\r\n\r\n* For AU: Australian Business Number (ABN) of the firm.\r\n\r\n* For UK: Value-added Tax Number (VAT) of the firm.\r\n\r\nOnly supported in AU and UK."
          nullable: true
          example: '1234567890'
        acn:
          type: string
          description: "Represents a different field depending on the region.\r\n\r\n* For AU: Australian Company Number (ACN) of the firm.\r\n\r\n* For UK: Company Registration Number (CRN) of the firm.\r\n\r\nOnly supported in AU and UK."
          nullable: true
          example: '1234567890'
        streetAddress:
          allOf:
            - $ref: '#/components/schemas/FirmAddressDto'
          description: Street address of the firm.
          nullable: true
        mailingAddress:
          allOf:
            - $ref: '#/components/schemas/FirmAddressDto'
          description: Mailing address of the firm.
          nullable: true
        dxAddress:
          allOf:
            - $ref: '#/components/schemas/FirmDxAddressDto'
          description: "DX address of the firm.\r\n\r\nOnly supported in AU."
          nullable: true
        phone:
          allOf:
            - $ref: '#/components/schemas/PhoneNumberDto'
          description: Phone number of the firm.
          nullable: true
        fax:
          allOf:
            - $ref: '#/components/schemas/PhoneNumberDto'
          description: Fax number of the firm.
          nullable: true
        isInternal:
          type: boolean
          description: >-
            Whether firm is being created for internal use. Internal firms will
            not be subscribed for payment processing and will not be charged.
          example: false
        staff:
          allOf:
            - $ref: '#/components/schemas/StaffDto'
          description: >-
            The staff member that will be created with the firm. This staff
            member will become the firm owner.
          nullable: true
        subscription:
          allOf:
            - $ref: '#/components/schemas/FirmSubscriptionDto'
          description: >-
            Optional subscription details that will be used when creating the
            firm.
          nullable: true
      additionalProperties: false
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    FirmAddressDto:
      type: object
      properties:
        buildingLevel:
          type: string
          description: Building level in address (if applicable).
          nullable: true
          example: Level 1
        unitNumber:
          type: string
          description: Unit number in address (if applicable).
          nullable: true
          example: '10'
        unitType:
          type: string
          description: >-
            Unit type (e.g. Unit,Flat,Villa,Suite,etc.) in address (if
            applicable).
          nullable: true
          example: Suite
        streetNumber:
          type: string
          description: Street number in address.
          nullable: true
          example: '100'
        streetName:
          type: string
          description: Street name in address.
          nullable: true
          example: Broad
        streetType:
          type: string
          description: Street type (e.g. Street,Road,Avenue,Lane,etc.) in address.
          nullable: true
          example: Street
        addressLine1:
          type: string
          description: First line of address.
          nullable: true
          example: Level 1/10
        addressLine2:
          type: string
          description: Second line of address (if applicable).
          nullable: true
          example: 100 Broad Street
        city:
          type: string
          description: City, district, suburb, town, or village.
          nullable: true
          example: Chicago
        state:
          type: string
          description: State, province, or region (if applicable).
          nullable: true
          example: IL
        zipCode:
          type: string
          description: Zip or post code.
          nullable: true
          example: '60606'
        county:
          type: string
          description: County (if applicable).
          nullable: true
          example: ''
        locality:
          type: string
          description: Locality (if applicable).
          nullable: true
          example: ''
        country:
          type: string
          description: Country.
          nullable: true
          example: United States
        careOf:
          type: string
          description: Care of the addressee (if applicable).
          nullable: true
          example: ''
        poBoxType:
          type: string
          description: PO box type in address (if applicable).
          nullable: true
          example: ''
        poBoxNumber:
          type: string
          description: PO box Number in address (if applicable).
          nullable: true
          example: ''
      additionalProperties: false
    FirmDxAddressDto:
      type: object
      properties:
        number:
          type: string
          description: Direct Exchange number (if applicable).
          nullable: true
          example: '376'
        exchange:
          type: string
          description: Direct Exchange name.
          nullable: true
          example: DX
        state:
          type: string
          description: State, province, or region.
          nullable: true
          example: NSW
      additionalProperties: false
    PhoneNumberDto:
      type: object
      properties:
        areaCode:
          type: string
          description: Phone area code.
          nullable: true
          example: '555'
        number:
          type: string
          description: Phone number (excluding area code).
          nullable: true
          example: '1234567'
      additionalProperties: false
    StaffDto:
      type: object
      properties:
        userId:
          type: string
          description: "Unique identifier of the associated user. Used to map staff member to the specified user id and ignored if left blank.\r\nUse the FirmUsers API to remove a staff/user mapping."
          nullable: true
          example: b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2
        title:
          type: string
          description: Staff member's title.
          nullable: true
          example: Mr
        firstName:
          type: string
          description: Staff member's first name.
          nullable: true
          example: John
        middleName:
          type: string
          description: Staff member's middle name (if applicable).
          nullable: true
          example: ''
        lastName:
          type: string
          description: Staff member's last name.
          nullable: true
          example: Smith
        initials:
          type: string
          description: Staff member's initials.
          nullable: true
          example: JS
        phone:
          allOf:
            - $ref: '#/components/schemas/PhoneNumberDto'
          description: Staff member's phone number.
          nullable: true
        cell:
          allOf:
            - $ref: '#/components/schemas/PhoneNumberDto'
          description: Staff member's cell number.
          nullable: true
        email:
          type: string
          description: Staff member's email address.
          nullable: true
          example: john.smith@brown.com
        role:
          type: string
          description: Staff member's role.
          nullable: true
          example: Bookkeeper
        avatar:
          type: string
          description: Staff member's avatar.
          nullable: true
          example: https://example-avatar-url.com/image
        former:
          type: boolean
          description: "Whether he/she is a former member. \r\n\r\nCaution: Setting a staff member to former staff will also deregister them from the firm."
          nullable: true
          example: false
        colorFill:
          type: string
          description: Staff member's fill color hex code.
          nullable: true
          example: '#797d85'
        colorStroke:
          type: string
          description: Staff member's stroke color hex code.
          nullable: true
          example: '#64666a'
      additionalProperties: false
    FirmSubscriptionDto:
      type: object
      properties:
        productSuite:
          type: string
          description: "Optional product suite to use when creating the firm.\r\n\r\nUse 'SMOKEBALL' to use the new product suite."
          nullable: true
        promotionId:
          type: string
          description: Optional promotion ID that will be used when the firm is subscribed.
          nullable: true
        interval:
          type: string
          description: "Optional interval to register the account subscription with.\r\n\r\nPossible values: Monthly, Yearly"
          nullable: true
      additionalProperties: false
      description: The subscription details for the firm.
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````