openapi: "3.1.0"
info:
  title: "Firm App API"
  description: "The API for client applications hosted on *.firm.app"
  version: "1"
schemes:
  - "https"
servers:
  - url: "https://api.firm.app"
    description: "The main production API server used for both production and demo sites."
paths:
  /createListItems:
    post:
      summary: "Create or update data list items."
      operationId: "createListItems"
      description: "Creates or updates an item for each submitted entry in the specified data list. Items with a `code` are matched by code: a match has its title updated, otherwise a new item is created with that code. Items without a code are matched by title (case-insensitive): a match is returned as-is with `created: false`, otherwise a new item is created. This endpoint is transactional. If an error occurs, then no data was changed."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "listId"
                - "items"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                listId:
                  type: "string"
                  minLength: 1
                  example: "lsll3yi3cnizbmimndz8"
                  description: "The id of the data list to add the items to."
                items:
                  type: "array"
                  items:
                    type: "object"
                    required:
                      - "title"
                    properties:
                      title:
                        type: "string"
                        minLength: 1
                        example: "Texas"
                      code:
                        type: "string"
                        example: "TX"
                    example:
                      title: "Texas"
                      code: "TX"
                  minLength: 1
                  example:
                    - title: "Texas"
                      code: "TX"
                    - title: "Oklahoma"
                  description: "The items to create or update. When `code` is provided, the item is looked up by code: if found its title is updated, otherwise a new item is created. Without a code, the item is looked up by title (case-insensitive) and created only if no match exists."
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                listId: "lsll3yi3cnizbmimndz8"
                items:
                  - title: "Texas"
                    code: "TX"
                  - title: "Oklahoma"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "items"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  items:
                    type: "array"
                    items:
                      type: "object"
                      required:
                        - "id"
                        - "title"
                        - "created"
                      properties:
                        id:
                          type: "string"
                          example: "itll3yi3cnizbmimndz8"
                        title:
                          type: "string"
                          example: "Texas"
                        created:
                          type: "boolean"
                          example: true
                      example:
                        id: "itll3yi3cnizbmimndz8"
                        title: "Texas"
                        created: true
                    description: "The resulting items (in the same order as the submitted items). `created` is false when the item already existed (including when its title was updated by code)."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /downloadFile:
    post:
      summary: "Download the file represented by the given key. Note: keys are immutable, so the contents will never change."
      operationId: "downloadFile"
      description: "Download a file such as a pdf, word doc, image, audio, etc."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "key"
              properties:
                key:
                  type: "string"
                  minLength: 1
              description: "The request body formatted as JSON."
              example:
      responses:
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getDocuments:
    post:
      summary: "Search for documents."
      operationId: "getDocuments"
      description: "Search documents by description, creator, associated users, tasks, issues, and more."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required: []
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                limit:
                  type: "integer"
                  description: "The maximum number of results to return per page. Default is 100. Maximum 1000."
                  example: 100
                cursor:
                  type: "string"
                  description: "Use for paging. Use the `nextCursor` from the previous response to fetch the next page."
                  example: "us7a8b86d57ee7f698s9"
                sort:
                  type: "string"
                  enum:
                    - "oldest"
                    - "newest"
                    - "updated"
                  description: "Choose the sort direction - `oldest` first, `newest` first, or most recently `updated` first. Defaults to `newest`."
                  default: "newest"
                  example: "oldest"
                updatedAfter:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated since this timestamp. ISO Date String or milliseconds since 1970."
                  example: 176400612676
                updatedBefore:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated before this timestamp. ISO Date String or milliseconds since 1970."
                  example: "1975-08-04T16:13:08.888Z"
                fields:
                  type: "array"
                  items:
                    type: "string"
                    enum:
                      - "id"
                      - "key"
                      - "bytes"
                      - "uploadedDateNumber"
                      - "updatedDate"
                      - "description"
                      - "sourceUrl"
                      - "creatorId"
                      - "userIds"
                      - "taskId"
                      - "taskRecordId"
                      - "issueId"
                      - "interestAccountIds"
                  minLength: 1
                  description: "Choose which fields to fetch. Defaults to all fields."
                  example:
                    - "id"
                    - "description"
                creatorIds:
                  type: "array"
                  items:
                    type: "string"
                  minLength: 1
                  description: "Search specifically for documents created by a certain user or users."
                  example:
                    - "us7a8b86d57ee7f698s9"
                    - "us7a8b86d57ee7f6aabb"
                userIds:
                  type: "array"
                  items:
                    type: "string"
                  minLength: 1
                  description: "Search specifically for documents associated with specific users."
                  example:
                    - "us7a8b86d57ee7f698s9"
                    - "us7a8b86d57ee7f6aabb"
                taskId:
                  type: "string"
                  description: "Search for documents associated with a specific task."
                  example: "taoll3yi3cnizbmimndz8"
                issueId:
                  type: "string"
                  description: "Search for documents associated with a specific issue."
                  example: "isoll3yi3cnizbmimndz8"
                interestAccountIds:
                  type: "array"
                  items:
                    type: "string"
                  minLength: 1
                  description: "Search for documents associated with specific interest accounts."
                  example:
                    - "iall3yi3cnizbmimndz8"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                limit: 100
                cursor: "us7a8b86d57ee7f698s9"
                sort: "oldest"
                updatedAfter: 176400612676
                updatedBefore: "1975-08-04T16:13:08.888Z"
                fields:
                  - "id"
                  - "description"
                creatorIds:
                  - "us7a8b86d57ee7f698s9"
                  - "us7a8b86d57ee7f6aabb"
                userIds:
                  - "us7a8b86d57ee7f698s9"
                  - "us7a8b86d57ee7f6aabb"
                taskId: "taoll3yi3cnizbmimndz8"
                issueId: "isoll3yi3cnizbmimndz8"
                interestAccountIds:
                  - "iall3yi3cnizbmimndz8"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "hasMore"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  hasMore:
                    type: "boolean"
                    description: "Whether there are more matches available on the next page."
                  nextCursor:
                    type: "string"
                    description: "If more results are available, this field includes the cursor to be used."
                  items:
                    type: "array"
                    items:
                      $ref: "#/components/schemas/Document"
                    description: "The matching rows."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getInterestAccounts:
    post:
      summary: "Search for interest accounts (aka owner accounts)."
      operationId: "getInterestAccounts"
      description: "Search interest accounts by owner number and email."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required: []
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                limit:
                  type: "integer"
                  description: "The maximum number of results to return per page. Default is 100. Maximum 1000."
                  example: 100
                cursor:
                  type: "string"
                  description: "Use for paging. Use the `nextCursor` from the previous response to fetch the next page."
                  example: "us7a8b86d57ee7f698s9"
                sort:
                  type: "string"
                  enum:
                    - "oldest"
                    - "newest"
                    - "updated"
                  description: "Choose the sort direction - `oldest` first, `newest` first, or most recently `updated` first. Defaults to `newest`."
                  default: "newest"
                  example: "oldest"
                updatedAfter:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated since this timestamp. ISO Date String or milliseconds since 1970."
                  example: 176400612676
                updatedBefore:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated before this timestamp. ISO Date String or milliseconds since 1970."
                  example: "1975-08-04T16:13:08.888Z"
                fields:
                  type: "array"
                  items:
                    type: "string"
                    enum:
                      - "id"
                      - "name"
                      - "ownerNumber"
                      - "email"
                      - "phone"
                      - "paymentType"
                      - "address"
                      - "createdDate"
                      - "updatedDate"
                      - "customFields"
                      - "discussion"
                  minLength: 1
                  description: "Choose which fields to fetch. Defaults to all fields except \"customFields\" and \"discussion\"."
                  example:
                    - "id"
                    - "name"
                    - "ownerNumber"
                ownerNumber:
                  type: "string"
                  description: "Search by owner number."
                  example: "12345"
                email:
                  type: "string"
                  description: "Search by email address."
                  example: "john.doe@example.com"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                limit: 100
                cursor: "us7a8b86d57ee7f698s9"
                sort: "oldest"
                updatedAfter: 176400612676
                updatedBefore: "1975-08-04T16:13:08.888Z"
                fields:
                  - "id"
                  - "name"
                  - "ownerNumber"
                ownerNumber: "12345"
                email: "john.doe@example.com"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "hasMore"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  hasMore:
                    type: "boolean"
                    description: "Whether there are more matches available on the next page."
                  nextCursor:
                    type: "string"
                    description: "If more results are available, this field includes the cursor to be used."
                  items:
                    type: "array"
                    items:
                      $ref: "#/components/schemas/Interest Account"
                    description: "The matching rows."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getIssue:
    post:
      summary: "Get the specified issue by id."
      operationId: "getIssue"
      description: "The specified issue object. If the issue is not found then a `not_found` error will be returned."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "id"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                id:
                  type: "string"
                  minLength: 1
                  example: "isll3yi3cnizbmimndz8"
                  description: "The issue id to fetch"
                fields:
                  type: "array"
                  items:
                    type: "string"
                    enum:
                      - "id"
                      - "identifier"
                      - "updatedDate"
                      - "title"
                      - "open"
                      - "openedDate"
                      - "dueDate"
                      - "closedDate"
                      - "requesterId"
                      - "ownerNumbers"
                      - "actions"
                      - "customFields"
                      - "discussion"
                      - "action.snapshots"
                  minLength: 1
                  description: "Choose which fields to fetch. Defaults to all fields except \"actions\", \"action.snapshots\", and \"customFields\"."
                  example:
                    - "id"
                    - "identifier"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                id: "isll3yi3cnizbmimndz8"
                fields:
                  - "id"
                  - "identifier"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required: []
                properties:
                  issue:
                    $ref: "#/components/schemas/Issue"
                description: "The response body formatted as JSON."
                example:
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getIssues:
    post:
      summary: "Search for issues."
      operationId: "getIssues"
      description: "Search issues by dates, status, assignee, requester, and more."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required: []
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                limit:
                  type: "integer"
                  description: "The maximum number of results to return per page. Default is 100. Maximum 1000."
                  example: 100
                cursor:
                  type: "string"
                  description: "Use for paging. Use the `nextCursor` from the previous response to fetch the next page."
                  example: "us7a8b86d57ee7f698s9"
                sort:
                  type: "string"
                  enum:
                    - "oldest"
                    - "newest"
                    - "updated"
                  description: "Choose the sort direction - `oldest` first, `newest` first, or most recently `updated` first. Defaults to `newest`."
                  default: "newest"
                  example: "oldest"
                updatedAfter:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated since this timestamp. ISO Date String or milliseconds since 1970."
                  example: 176400612676
                updatedBefore:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated before this timestamp. ISO Date String or milliseconds since 1970."
                  example: "1975-08-04T16:13:08.888Z"
                fields:
                  type: "array"
                  items:
                    type: "string"
                    enum:
                      - "id"
                      - "identifier"
                      - "updatedDate"
                      - "title"
                      - "open"
                      - "openedDate"
                      - "dueDate"
                      - "closedDate"
                      - "requesterId"
                      - "ownerNumbers"
                      - "actions"
                      - "customFields"
                      - "discussion"
                      - "action.snapshots"
                  minLength: 1
                  description: "Choose which fields to fetch. Defaults to all fields except \"actions\", \"action.snapshots\", and \"customFields\"."
                  example:
                    - "id"
                    - "identifier"
                open:
                  type: "boolean"
                  description: "Limit the results to only show open or closed issues specifically"
                  example: true
                q:
                  type: "string"
                  description: "Query the issue identifier, title, and client discussion."
                  example: "foo"
                requesterIds:
                  type: "array"
                  items:
                    type: "string"
                  minLength: 1
                  description: "Search specifically for issues from a certain requester or requesters."
                  example:
                    - "us7a8b86d57ee7f698s9"
                    - "us7a8b86d57ee7f6aabb"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                limit: 100
                cursor: "us7a8b86d57ee7f698s9"
                sort: "oldest"
                updatedAfter: 176400612676
                updatedBefore: "1975-08-04T16:13:08.888Z"
                fields:
                  - "id"
                  - "identifier"
                open: true
                q: "foo"
                requesterIds:
                  - "us7a8b86d57ee7f698s9"
                  - "us7a8b86d57ee7f6aabb"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "hasMore"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  hasMore:
                    type: "boolean"
                    description: "Whether there are more matches available on the next page."
                  nextCursor:
                    type: "string"
                    description: "If more results are available, this field includes the cursor to be used."
                  items:
                    type: "array"
                    items:
                      $ref: "#/components/schemas/Issue"
                    description: "The matching rows."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getRoles:
    post:
      summary: "Fetch all roles."
      operationId: "getRoles"
      description: "Get all roles for your organization which can be assigned to a professional's roleIds field."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required: []
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "roles"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  roles:
                    type: "array"
                    items:
                      $ref: "#/components/schemas/Role"
                    description: "All roles (no paging)."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getResponses:
    post:
      summary: "Fetch form responses for a given form (aka template)."
      operationId: "getResponses"
      description: "Fetch paginated responses for a specific template. Each response includes the rendered form field values."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "templateId"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                limit:
                  type: "integer"
                  description: "The maximum number of results to return per page. Default is 100. Maximum 1000."
                  example: 100
                cursor:
                  type: "string"
                  description: "Use for paging. Use the `nextCursor` from the previous response to fetch the next page."
                  example: "us7a8b86d57ee7f698s9"
                sort:
                  type: "string"
                  enum:
                    - "oldest"
                    - "newest"
                    - "updated"
                  description: "Choose the sort direction - `oldest` first, `newest` first, or most recently `updated` first. Defaults to `newest`."
                  default: "newest"
                  example: "oldest"
                updatedAfter:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated since this timestamp. ISO Date String or milliseconds since 1970."
                  example: 176400612676
                updatedBefore:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated before this timestamp. ISO Date String or milliseconds since 1970."
                  example: "1975-08-04T16:13:08.888Z"
                templateId:
                  type: "string"
                  minLength: 1
                  description: "The template id to fetch responses for."
                  example: "tpll3yi3cnizbmimndz8"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                limit: 100
                cursor: "us7a8b86d57ee7f698s9"
                sort: "oldest"
                updatedAfter: 176400612676
                updatedBefore: "1975-08-04T16:13:08.888Z"
                templateId: "tpll3yi3cnizbmimndz8"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "hasMore"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  hasMore:
                    type: "boolean"
                    description: "Whether there are more matches available on the next page."
                  nextCursor:
                    type: "string"
                    description: "If more results are available, this field includes the cursor to be used."
                  items:
                    type: "array"
                    items:
                      $ref: "#/components/schemas/Template Response"
                    description: "The matching rows."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getUser:
    post:
      summary: "Get the specified user by id."
      operationId: "getUser"
      description: "The specified user object. If the user is not found then a `not_found` error will be returned."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "id"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                id:
                  type: "string"
                  minLength: 1
                  example: "usll3yi3cnizbmimndz8"
                  description: "The user id to fetch"
                fields:
                  type: "array"
                  items:
                    type: "string"
                    enum:
                      - "id"
                      - "name"
                      - "email"
                      - "username"
                      - "timezone"
                      - "langCode"
                      - "homePhone"
                      - "cellPhone"
                      - "workPhone"
                      - "userType"
                      - "isSuspended"
                      - "lastContactDate"
                      - "firstContactDate"
                      - "deleted"
                      - "roleIds"
                      - "record"
                      - "messageSettings"
                      - "privateDiscussion"
                      - "createdDate"
                      - "updatedDate"
                  minLength: 1
                  description: "Choose which fields to fetch. Defaults to all fields."
                  example:
                    - "id"
                    - "email"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                id: "usll3yi3cnizbmimndz8"
                fields:
                  - "id"
                  - "email"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  user:
                    $ref: "#/components/schemas/User"
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /getUsers:
    post:
      summary: "Search for users by name, email, type, and more."
      operationId: "getUsers"
      description: "Search for users by name, email, phone number, user type, verification status, and more. For large number of search results, make use of the page limits and cursors."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required: []
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                limit:
                  type: "integer"
                  description: "The maximum number of results to return per page. Default is 100. Maximum 1000."
                  example: 100
                cursor:
                  type: "string"
                  description: "Use for paging. Use the `nextCursor` from the previous response to fetch the next page."
                  example: "us7a8b86d57ee7f698s9"
                sort:
                  type: "string"
                  enum:
                    - "oldest"
                    - "newest"
                    - "updated"
                  description: "Choose the sort direction - `oldest` first, `newest` first, or most recently `updated` first. Defaults to `newest`."
                  default: "newest"
                  example: "oldest"
                updatedAfter:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated since this timestamp. ISO Date String or milliseconds since 1970."
                  example: 176400612676
                updatedBefore:
                  oneOf:
                    - type: "string"
                    - type: "integer"
                    - type: "date"
                      format: "date-time"
                      description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                  description: "Only select records that were updated before this timestamp. ISO Date String or milliseconds since 1970."
                  example: "1975-08-04T16:13:08.888Z"
                fields:
                  type: "array"
                  items:
                    type: "string"
                    enum:
                      - "id"
                      - "name"
                      - "email"
                      - "username"
                      - "timezone"
                      - "langCode"
                      - "homePhone"
                      - "cellPhone"
                      - "workPhone"
                      - "userType"
                      - "isSuspended"
                      - "lastContactDate"
                      - "firstContactDate"
                      - "deleted"
                      - "roleIds"
                      - "record"
                      - "messageSettings"
                      - "privateDiscussion"
                      - "createdDate"
                      - "updatedDate"
                  minLength: 1
                  description: "Choose which fields to fetch. Defaults to all fields."
                  example:
                    - "id"
                    - "email"
                userType:
                  type: "string"
                  enum:
                    - "client"
                    - "professional"
                  description: "Limit the results by user type"
                  example: "client"
                q:
                  type: "string"
                  description: "Query the user name, email, and phone number."
                  example: "ron"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
                limit: 100
                cursor: "us7a8b86d57ee7f698s9"
                sort: "oldest"
                updatedAfter: 176400612676
                updatedBefore: "1975-08-04T16:13:08.888Z"
                fields:
                  - "id"
                  - "email"
                userType: "client"
                q: "ron"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "hasMore"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  hasMore:
                    type: "boolean"
                    description: "Whether there are more matches available on the next page."
                  nextCursor:
                    type: "string"
                    description: "If more results are available, this field includes the cursor to be used."
                  items:
                    type: "array"
                    items:
                      $ref: "#/components/schemas/User"
                    description: "The matching rows."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /import:
    post:
      summary: "Create, update, or delete data."
      operationId: "import"
      description: "The recordSets that will be validated and applied to the system data."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "recordSets"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                dryRun:
                  type: "boolean"
                wait:
                  type: "boolean"
                filename:
                  type: "string"
                successNotificationEmails:
                  type: "array"
                  items:
                    type: "string"
                    format: "email"
                failureNotificationEmails:
                  type: "array"
                  items:
                    type: "string"
                    format: "email"
                recordSets:
                  type: "array"
                  items:
                    type: "object"
                    required:
                      - "schema"
                      - "lookup"
                      - "records"
                    properties:
                      schema:
                        type: "string"
                        minLength: 1
                      lookup:
                        type: "string"
                        minLength: 1
                      records:
                        type: "array"
                        items:
                          type: "object"
                          required: []
                          properties: {}
                        minLength: 1
                    example:
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "importId"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  importId:
                    type: "string"
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
  /importStatus:
    post:
      summary: "Get the status of an import."
      operationId: "importStatus"
      description: "Provide the importId and get the status, preview, errors, etc from a specific import."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "importId"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                importId:
                  type: "string"
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "importStatus"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  importStatus:
                    type: "object"
                    required:
                      - "importId"
                      - "status"
                      - "success"
                      - "error"
                      - "done"
                      - "createdDate"
                    properties:
                      importId:
                        type: "string"
                        minLength: 1
                      status:
                        type: "string"
                        enum:
                          - "new"
                          - "validating"
                          - "invalid"
                          - "valid"
                          - "running"
                          - "error"
                          - "success"
                          - "reverting"
                          - "reverted"
                      success:
                        type: "boolean"
                      error:
                        type: "boolean"
                      done:
                        type: "boolean"
                      errorMessage:
                        type: "string"
                      duration:
                        type: "integer"
                      preview:
                        type: "string"
                      createdDate:
                        type: "date"
                        format: "date-time"
                        description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                      ranDate:
                        type: "date"
                        format: "date-time"
                        description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                    example:
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
                  importStatus:
        default:
          $ref: "#/components/responses/ErrorResponse"
  /saveUsers:
    post:
      summary: "Create or update user profiles."
      operationId: "saveUsers"
      description: "This endpoint is transactional. If an error occurs, then no data was created or updated.\n\nAlternatively, use the [Data Import](https://my.firm.app/imports/docs) module for a more spreadsheet-friendly method of managing user profiles."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              required:
                - "users"
              properties:
                apiKey:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API KEY from your Firm App control panel. May also be sent via the `X-API-Key` header."
                  example: "YOUR_API_KEY"
                apiSecret:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Secret from your Firm App control panel. *Keep this private!* May also be sent via the `X-API-Secret` header."
                  example: "YOUR_API_SECRET"
                apiVersion:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: "The API Version. Defaults to 1. May also be sent via the `X-API-Version` header."
                  example: "1"
                endpointId:
                  type: "string"
                  minLength: 1
                  x-common-field: true
                  description: " May also be sent via the `X-Endpoint-Id` header."
                  example: "getUser"
                users:
                  type: "array"
                  items:
                    $ref: "#/components/schemas/User"
                  minLength: 1
                  description: "The users to create or update. Provide a user Id to update existing records."
              description: "The request body formatted as JSON."
              example:
                apiKey: "YOUR_API_KEY"
                apiSecret: "YOUR_API_SECRET"
                apiVersion: "1"
                endpointId: "getUser"
      responses:
        200:
          content:
            application/json:
              schema:
                type: "object"
                required:
                  - "ok"
                  - "meta"
                  - "users"
                properties:
                  ok:
                    type: "boolean"
                    description: "Whether an error occurred handling the request"
                    example: true
                    x-common-field: true
                  meta:
                    type: "object"
                    required:
                      - "requestId"
                      - "duration"
                      - "rateLimitRemaining"
                      - "rateLimitLimit"
                    properties:
                      requestId:
                        type: "string"
                        description: "The request ID assigned by the Firm App API."
                        example: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration:
                        type: "integer"
                        description: "The processing duration by the Firm App API (in milliseconds)."
                        example: 25
                      rateLimitRemaining:
                        type: "integer"
                        description: "The remaining rate limit."
                        example: 97
                      rateLimitLimit:
                        type: "integer"
                        description: "The maximum rate limit units, not accounting for current usage."
                        example: 100
                    description: "Info about the request such as the response id, duration, etc."
                    x-common-field: true
                    example:
                      requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                      duration: 25
                      rateLimitRemaining: 97
                      rateLimitLimit: 100
                  error:
                    type: "object"
                    required:
                      - "code"
                      - "status"
                    properties:
                      code:
                        type: "string"
                        enum:
                          - "unauthorized"
                          - "invalid_request"
                          - "not_found"
                          - "too_many_requests"
                          - "server_error"
                        description: "An api error code"
                        example: "not_found"
                      message:
                        type: "string"
                        description: "A message giving details on the error."
                        example: "The specified user was not found."
                      status:
                        type: "number"
                        description: "The related HTTP status code."
                        example: 404
                    description: "If an error occurred, this object includes the message, error code, etc."
                    x-common-field: true
                    example:
                      code: "not_found"
                      message: "The specified user was not found."
                      status: 404
                  users:
                    type: "array"
                    items:
                      type: "object"
                      required:
                        - "id"
                        - "updatedDate"
                      properties:
                        id:
                          type: "string"
                          example: "usll3yi3cnizbmimndz8"
                        updatedDate:
                          type: "date"
                          format: "date-time"
                          example: "2026-06-13T17:07:31.491Z"
                          description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
                      example:
                        id: "usll3yi3cnizbmimndz8"
                        updatedDate: "2026-06-13T17:07:31.491Z"
                    description: "The resulting users (in the same order) including their id and update timestamp."
                description: "The response body formatted as JSON."
                example:
                  ok: true
                  meta:
                    requestId: "v9uumk6y1j2l4tn8flp0qtjkmuhghnod"
                    duration: 25
                    rateLimitRemaining: 97
                    rateLimitLimit: 100
                  error:
                    code: "not_found"
                    message: "The specified user was not found."
                    status: 404
        default:
          $ref: "#/components/responses/ErrorResponse"
components:
  headers:
    X-RateLimit-Limit:
      description: "Request limit per hour"
      schema:
        type: "integer"
        example: 100
    X-RateLimit-Remaining:
      description: "Request limit per hour"
      schema:
        type: "integer"
        example: 93
    X-Request-Id:
      description: "The request id. Refer to this value when speaking with the support team."
      schema:
        type: "string"
    X-Response-Duration:
      description: "The number of milliseconds it took for the server to respond."
      schema:
        type: "number"
        example: 25
  schemas:
    ErrorResponse:
      type: "object"
      required:
        - "error"
      properties:
        ok:
          type: "boolean"
          const: false
        error:
          description: ""
          required:
            - "code"
          type: "object"
          properties:
            code:
              type: "string"
              enum:
                - "unauthorized"
                - "invalid_request"
                - "not_found"
                - "too_many_requests"
                - "server_error"
            message:
              type: "string"
    Answer:
      type: "object"
      required:
        - "id"
        - "title"
        - "text"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The form field id."
          example: "fdll3yi3cnizbmimndz8"
        title:
          type: "string"
          description: "The field title."
          example: "Type of Question"
        text:
          type: "string"
          description: "The rendered text value."
          example: "Excessive Noise"
        value: null
      title: "Answer"
      description: "A form field answer"
      example:
        id: "fdll3yi3cnizbmimndz8"
        title: "Type of Question"
        text: "Excessive Noise"
    Custom Field:
      type: "object"
      required:
        - "id"
        - "title"
        - "text"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The database field id."
          example: "fdll3yi3cnizbmimndz8"
        title:
          type: "string"
          description: "The field title."
          example: "Department Number"
        text:
          type: "string"
          description: "The selected value."
          example: "Shipping"
      title: "Custom Field"
      description: "A custom field"
      example:
        id: "fdll3yi3cnizbmimndz8"
        title: "Department Number"
        text: "Shipping"
    Discussion:
      type: "object"
      required:
        - "messages"
      properties:
        messages:
          type: "array"
          description: "The messages for this discussion."
      title: "Discussion"
      description: "A discussion object containing a list of messages."
      example:
    Document:
      type: "object"
      required:
        - "id"
        - "key"
        - "uploadedDateNumber"
        - "updatedDate"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The documents Firm App database id."
          example: "dcll3yi3cnizbmimndz8"
        key:
          type: "string"
          description: "The s3 key (mainly used internally)."
          example: "foo/bar/document.pdf"
        bytes:
          type: "integer"
          description: "The size in bytes."
        uploadedDateNumber:
          type: "number"
          description: "The date the document was uploaded."
          example: 20231225
        updatedDate:
          type: "number"
          description: "The date the document was updated. (Note: documents are immutable)"
          example: "2026-06-13T17:07:31.065Z"
        description:
          type: "string"
          description: "The description of the document."
          example: "Important contract document"
        sourceUrl:
          type: "string"
          description: "The original source URL of the document if available."
          example: "https://example.com/document.pdf"
        creatorId:
          type: "string"
          description: "Optional. The user id of the person who uploaded this document."
          example: "ussdf76s67te4gwu6e"
        userIds:
          type: "array"
          items:
            type: "string"
          description: "Optional. The user ids this document is associated with."
          example:
            - "ussdf76s67te4gwu6e"
        taskId:
          type: "string"
          description: "Optional. The task id this document is associated with."
          example: "taoll3yi3cnizbmimndz8"
        taskRecordId:
          type: "string"
          description: "Optional. The task record id this document is associated with."
          example: "trll3yi3cnizbmimndz8"
        issueId:
          type: "string"
          description: "Optional. The issue id this document is associated with. Currently this includes documents added to the public and private message thread, but does not include documents such as email attachments, voicemail recordings, and form submissions."
          example: "isll3yi3cnizbmimndz8"
        interestAccountIds:
          type: "array"
          items:
            type: "string"
          description: "Optional. The interest account ids this document is associated with."
          example:
            - "iall3yi3cnizbmimndz8"
      title: "Document"
      description: "A document instance which represents an uploaded file such as a pdf, image, word doc, spreadsheet, etc."
      example:
        id: "dcll3yi3cnizbmimndz8"
        key: "foo/bar/document.pdf"
        uploadedDateNumber: 20231225
        updatedDate: "2026-06-13T17:07:31.065Z"
        description: "Important contract document"
        sourceUrl: "https://example.com/document.pdf"
        creatorId: "ussdf76s67te4gwu6e"
        userIds:
          - "ussdf76s67te4gwu6e"
        taskId: "taoll3yi3cnizbmimndz8"
        taskRecordId: "trll3yi3cnizbmimndz8"
        issueId: "isll3yi3cnizbmimndz8"
        interestAccountIds:
          - "iall3yi3cnizbmimndz8"
    Interest Account:
      type: "object"
      required:
        - "id"
        - "name"
        - "ownerNumber"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The interest account Firm App database id."
          example: "iall3yi3cnizbmimndz8"
        name:
          type: "string"
          description: "The interest account name."
          example: "John Doe Trust Account"
        ownerNumber:
          type: "string"
          description: "The owner number for this interest account."
          example: "12345"
        email:
          type: "string"
          description: "The email address associated with this interest account."
          example: "john.doe@example.com"
        phone:
          type: "string"
          description: "The phone number associated with this interest account."
          example: "+1-555-123-4567"
        paymentType:
          type: "string"
          enum:
            - "check"
            - "ach"
          description: "The payment type for this interest account."
          example: "check"
        address:
          type: "object"
          required: []
          properties: {}
          description: "The address associated with this interest account."
        createdDate:
          type: "string"
          description: "The date the interest account was created. Formatted as an ISO 8601 timestamp."
          example: "2025-06-13T05:00:00.000Z"
        updatedDate:
          type: "string"
          description: "The date the interest account was last updated. Formatted as an ISO 8601 timestamp."
          example: "2025-06-13T05:00:00.000Z"
        customFields:
          type: "array"
          items:
            $ref: "#/components/schemas/Custom Field"
        discussion:
          $ref: "#/components/schemas/Discussion"
      title: "Interest Account"
      description: "An interest account instance"
      example:
        id: "iall3yi3cnizbmimndz8"
        name: "John Doe Trust Account"
        ownerNumber: "12345"
        email: "john.doe@example.com"
        phone: "+1-555-123-4567"
        paymentType: "check"
        createdDate: "2025-06-13T05:00:00.000Z"
        updatedDate: "2025-06-13T05:00:00.000Z"
    Issue:
      type: "object"
      required:
        - "id"
        - "identifier"
        - "title"
        - "open"
        - "requesterId"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The issues Firm App database id."
          example: "usll3yi3cnizbmimndz8"
        identifier:
          type: "string"
          minLength: 6
          maxLength: 6
          description: "The issue identifier. Typically a 6 digit upper case string."
          example: "EG5HKW"
        updatedDate:
          type: "date"
          format: "date-time"
          description: "The last date of update, formatted as an ISO 8601 string. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
        title:
          type: "string"
          description: "The issue title."
          example: "Question from Sam on 5/21/22"
        open:
          type: "boolean"
          description: "Whether the issue is open or closed."
          example: true
        openedDate:
          type: "string"
          description: "The date the issue was assigned. Formatted as an ISO 8601 timestamp."
          example: "2025-06-13T05:00:00.000Z"
        dueDate:
          type: "string"
          description: "The date the issue is due. Formatted as `yyyy-MM-dd`."
          example: "2023-12-25"
        closedDate:
          type: "string"
          description: "The date the issue was closed. Formatted as an ISO 8601 timestamp."
          example: "2025-06-13T05:00:00.000Z"
        requesterId:
          type: "string"
          description: "The user id of the person who made the initial request."
          example: "ussdf76s67te4gwu6e"
        ownerNumbers:
          type: "array"
          items:
            type: "string"
          description: "An array of owner numbers tagged to this issue."
          example:
            - "2343"
            - "48848"
        actions:
          type: "array"
          items:
            $ref: "#/components/schemas/Issue Action"
        customFields:
          type: "array"
          items:
            $ref: "#/components/schemas/Custom Field"
        discussion:
          $ref: "#/components/schemas/Discussion"
      title: "Issue"
      description: "An issue instance"
      example:
        id: "usll3yi3cnizbmimndz8"
        identifier: "EG5HKW"
        title: "Question from Sam on 5/21/22"
        open: true
        openedDate: "2025-06-13T05:00:00.000Z"
        dueDate: "2023-12-25"
        closedDate: "2025-06-13T05:00:00.000Z"
        requesterId: "ussdf76s67te4gwu6e"
        ownerNumbers:
          - "2343"
          - "48848"
    Issue Action:
      type: "object"
      required:
        - "id"
        - "issueId"
        - "title"
        - "description"
        - "open"
        - "assigneeId"
        - "assignedGroup"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The issue actions Firm App database id."
          example: "ioll3yi3cnizbmimn555"
        issueId:
          type: "string"
          minLength: 1
          description: "The Firm App database id for the associated issue."
          example: "isll3yi3cnizbmimne6f"
        title:
          type: "string"
          description: "The issue action title."
          example: "Accounting Update"
        description:
          type: "string"
          description: "The issue action description."
          example: "Please update the NEI accounting system with the new address."
        open:
          type: "boolean"
          description: "Whether the issue action is open or closed."
          example: true
        openedDate:
          type: "string"
          description: "The date the action was opened. Formatted as `yyyy-MM-dd`."
          example: "2023-12-25"
        updatedDate:
          type: "date"
          format: "date-time"
          description: "The last date of update, formatted as an ISO 8601 string. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
        closedDate:
          type: "string"
          description: "The date the action was closed (if closed). Formatted as `yyyy-MM-dd`."
          example: "2023-12-25"
        assigneeId:
          type: "string"
          description: "The user id of the person who this action is currently assigned to."
          example: "ussdf76s67te4gwu6e"
        assignedGroup:
          type: "string"
          description: "If not assigned to an individual yet, this will be the title of the group this action is assigned to."
          example: "Technical Support Department"
        snapshots:
          type: "array"
          items:
            $ref: "#/components/schemas/Snapshot"
          description: "The history of changes for this action. Only included if you select both \"actions\" and \"action.snapshots\"."
      title: "Issue Action"
      description: "An action (aka step or task) for a particular issue. All issues have at least one action. "
      example:
        id: "ioll3yi3cnizbmimn555"
        issueId: "isll3yi3cnizbmimne6f"
        title: "Accounting Update"
        description: "Please update the NEI accounting system with the new address."
        open: true
        openedDate: "2023-12-25"
        closedDate: "2023-12-25"
        assigneeId: "ussdf76s67te4gwu6e"
        assignedGroup: "Technical Support Department"
    Role:
      type: "object"
      required: []
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The roles Firm App database id."
          example: "rlll3yi3cnizbmimndxx"
        title:
          type: "string"
          description: "The roles title."
          example: "Administrator"
      title: "Role"
      description: "A role that can be assigned to professionals (not clients)."
      example:
        id: "rlll3yi3cnizbmimndxx"
        title: "Administrator"
    Snapshot:
      type: "object"
      required:
        - "id"
        - "op"
        - "date"
        - "userId"
        - "data"
      properties:
        id:
          type: "integer"
          description: "The snapshot id (BigInt)"
          example: 12345678
        op:
          type: "string"
          enum:
            - "INSERT"
            - "UPDATE"
            - "DELETE"
          description: "The type of change. Note that soft deletes appear as UPDATE with data.deleted = true."
          example: "UPDATE"
        date:
          type: "date"
          format: "date-time"
          description: "The date of the change. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
          example: "2026-06-13T17:07:31.251Z"
        userId:
          type: "date"
          format: "date-time"
          description: "The user id of the person who made the change. Note that this may be null (e.g. data imports). Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
          example: "us2348de0a9fbb121a"
        data:
          type: "object"
          required: []
          properties: {}
          description: "The snapshot of the actual data (some fields may be omitted)."
          example:
            foo: "bar"
        diff:
          type: "object"
          required: []
          properties: {}
          description: "For UPDATE operations, the fields that changed with their from/to values. Null for INSERT/DELETE."
          example:
            name:
              from: "Acme"
              to: "Acme Corp"
      title: "Snapshot"
      description: "When a record (such as an Issue Action) is updated, the auditing process takes a snapshot and tracks the date and user account who made the change. Some fields (especially particularly large or transient) are omitted."
      example:
        id: 12345678
        op: "UPDATE"
        date: {}
        userId: "us2348de0a9fbb121a"
        data:
          foo: "bar"
        diff:
          name:
            from: "Acme"
            to: "Acme Corp"
    Template Response:
      type: "object"
      required:
        - "id"
        - "templateId"
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The response id."
          example: "rsll3yi3cnizbmimndz8"
        templateId:
          type: "string"
          minLength: 1
          description: "The template id this response belongs to."
          example: "tpll3yi3cnizbmimndz8"
        submitterId:
          type: "string"
          description: "The user id of the person who submitted this response."
          example: "usll3yi3cnizbmimndz8"
        entererId:
          type: "string"
          description: "The user id of the person who entered this response (may differ from submitter)."
          example: "usll3yi3cnizbmimndz8"
        answers:
          type: "array"
          items:
            $ref: "#/components/schemas/Answer"
          description: "The submitted answers for each form field. Each answer includes a rendered `text` value and the raw `value` object. The shape of `value` varies by field type."
        createdDate:
          type: "date"
          format: "date-time"
          description: "The date this response was created. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
          example: "2023-08-25T02:31:56.538Z"
        updatedDate:
          type: "date"
          format: "date-time"
          description: "The date this response was last updated. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
          example: "2023-08-25T02:31:56.538Z"
      title: "Template Response"
      description: "A response to a template (form)"
      example:
        id: "rsll3yi3cnizbmimndz8"
        templateId: "tpll3yi3cnizbmimndz8"
        submitterId: "usll3yi3cnizbmimndz8"
        entererId: "usll3yi3cnizbmimndz8"
        createdDate: {}
        updatedDate: {}
    User:
      type: "object"
      required: []
      properties:
        id:
          type: "string"
          minLength: 1
          description: "The users Firm App database id."
          example: "usll3yi3cnizbmimndz8"
        name:
          type: "string"
          description: "The users name."
          example: "Frank Smith"
        email:
          type: "string"
          format: "email"
          description: "The users email address."
          example: "frank@example.com"
        username:
          type: "string"
          description: "The users username. Not typically used except for demo sites."
          example: "frank_234"
        timezone:
          type: "string"
          description: "The users selected timezone."
          example: "America/Chicago"
        langCode:
          type: "string"
          description: "The users selected ISO_639-1 language code."
          example: "us"
        homePhone:
          type: "string"
          description: "The users home phone number."
          example: "5553211234"
        cellPhone:
          type: "string"
          description: "The users cell phone number."
          example: "5553211234"
        workPhone:
          type: "string"
          description: "The users work phone number."
          example: "5553211234"
        userType:
          type: "string"
          enum:
            - "client"
            - "professional"
          description: "The users profile type."
          example: "client"
        isSuspended:
          type: "boolean"
          description: "Whether the user is deactivated meaning they are unable to login."
          example: true
        lastContactDate:
          type: "date"
          format: "date-time"
          description: "The most recent date of contact by the user. Possibly null. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
          example: "2023-08-25T02:31:56.538Z"
        firstContactDate:
          type: "date"
          format: "date-time"
          description: "The first date of contact by the user. Possibly null. Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
          example: "2023-08-25T02:31:56.538Z"
        deleted:
          type: "boolean"
          description: "Whether or not this user is deleted. Used only for marking a user as deleted."
          example: false
        roleIds:
          type: "array"
          items:
            type: "string"
          description: "Whether or not this user is deleted. Used only for marking a user as deleted."
          example: false
        record:
          type: "object"
          required:
            - "id"
            - "answers"
          properties:
            id:
              type: "string"
            answers:
              type: "object"
              required: []
              properties: {}
              description: "An object containing the custom field values.  Custom fields come from the Form defined in Control Panel > User Settings. In this object, the keys are field ids and the values are the selected values for that respective form field."
          description: "Custom field values from the Control Panel > User Settings form."
          example:
            some-text-field:
              text: "Foo"
            some-select-field:
              ids:
                - "liaf84h3923hfifn3yrfg"
        messageSettings:
          type: "object"
          required: []
          properties: {}
          description: "An object where the key is a category id and the values are determine whether email/push notifications are enabled. Null values indicate that the company default value should be used."
          example:
            some-category-d:
              email: true
              push: false
        privateDiscussion:
          $ref: "#/components/schemas/Discussion"
        createdDate:
          type: "date"
          format: "date-time"
          description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
        updatedDate:
          type: "date"
          format: "date-time"
          description: "Dates are formatted as an ISO 8601 string: `YYYY-MM-DDTHH:mm:ss.sssZ`."
      title: "User"
      description: "A user object"
      example:
        id: "usll3yi3cnizbmimndz8"
        name: "Frank Smith"
        email: "frank@example.com"
        username: "frank_234"
        timezone: "America/Chicago"
        langCode: "us"
        homePhone: "5553211234"
        cellPhone: "5553211234"
        workPhone: "5553211234"
        userType: "client"
        isSuspended: true
        lastContactDate: {}
        firstContactDate: {}
        deleted: false
        roleIds: false
        record:
          some-text-field:
            text: "Foo"
          some-select-field:
            ids:
              - "liaf84h3923hfifn3yrfg"
        messageSettings:
          some-category-d:
            email: true
            push: false
  securitySchemes:
    apiKey:
      type: "apiKey"
      in: "header"
      name: "X-Api-Key"
    apiSecret:
      type: "apiKey"
      in: "header"
      name: "X-Api-Secret"
    apiVersion:
      type: "apiKey"
      in: "header"
      name: "X-Api-Version"
security:
  - apiKey: []
    apiSecret: []
    apiVersion: []
responses:
  ErrorResponse:
    description: "\n          All routes use this format for errors. Errors will include ok=false in the response body.\n          Here is a complete list of error codes:\n          \n          - `unauthorized` - Authentication failure or your credentials do not authorize you to perform the action.\n- `invalid_request` - The API request contains missing or invalid data.\n- `not_found` - The requested or inferred resource was not found.\n- `too_many_requests` - The credentials have exceeded the request limit in the given time period.\n- `server_error` - The request failed because of an internal error. Try back later or send the X-Request-Id to the support team.\n        "
    content:
      application/json:
        schema:
          $ref: "#/components/schemas/ErrorResponse"
