nCino Mortgage API

REST API for the nCino Mortgage platform (formerly SimpleNexus) covering loans, loan applications, borrowers, loan officers, team members, partners, organizations (companies, regions, branches), state licenses, roles and permissions, documents, milestones, verifications and webhook subscriptions. OAuth 2.0 client-credentials with a five-minute access token; versioned by the X-Api-Version request/response header; page/page_size pagination; JSON error envelope with an errors[] array.

OpenAPI Specification

ncino-mortgage-openapi.yml Raw ↑
---
info:
  title: nCino Mortgage API
  description: API framework built from the ground up to be more a robust, forward
    thinking solution with tools to support our developer community
  version: '1.0'
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.ncinomortgage.com
  description: Production server
security:
- OAuth2: []
openapi: 3.0.0
paths:
  "/oauth/token":
    post:
      tags:
      - Authentication
      operationId: authentication-create
      parameters:
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthToken"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthError"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthError"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: Initiate the <<glossary:authentication workflow>> using supported
        grant types.
      summary: Initiate authentication workflow
      security: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/OAuthTokenClientBody"
              - "$ref": "#/components/schemas/OAuthTokenRefreshBody"
              - "$ref": "#/components/schemas/OAuthTokenCodeBody"
              discriminator:
                propertyName: grant_type
                mapping:
                  client_credentials: "#/components/schemas/OAuthTokenClientBody"
                  refresh_token: "#/components/schemas/OAuthTokenRefreshBody"
                  authorization_code: "#/components/schemas/OAuthTokenCodeBody"
    get:
      tags:
      - Authentication
      operationId: authentication-show
      parameters:
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthTokenInfo"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will retrieve <<glossary:access token>> information.
      summary: Retrieve access token information
  "/oauth/token/actions":
    post:
      tags:
      - Authentication
      operationId: authentication-actions
      parameters:
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthTokenIntrospect"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthError"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OAuthError"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: "This endpoint will perform an action on an <<glossary:access token>>.\n\n>
        \U0001F4CC Available actions\n  **REVOKE** - Revoke an existing access token\n
        \ **INTROSPECT** - Introspect an access token"
      summary: Perform an action on access token
      security: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/OAuthActionBody"
              discriminator:
                propertyName: action
                mapping:
                  REVOKE: "#/components/schemas/OAuthActionBody"
                  INTROSPECT: "#/components/schemas/OAuthActionBody"
  "/webhooks":
    post:
      tags:
      - Webhooks
      operationId: webhooks-create
      parameters:
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '201':
          description: Created webhook
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ResourceCreated"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '409':
          description: Webhook already exists for the given URL
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorSet"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will create a new <<glossary:webhook>> record.
      summary: Create a new webhook record
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/WebhookPostBody"
    get:
      tags:
      - Webhooks
      operationId: webhooks-index
      parameters:
      - "$ref": "#/components/parameters/Page"
      - "$ref": "#/components/parameters/PageSize"
      - "$ref": "#/components/parameters/CreatedAfter"
      - "$ref": "#/components/parameters/CreatedBefore"
      - "$ref": "#/components/parameters/UpdatedAfter"
      - "$ref": "#/components/parameters/UpdatedBefore"
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WebhookPagination"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will retrieve all <<glossary:webhook>> records.
      summary: Retrieve all webhook records
  "/webhooks/{webhook_id}":
    get:
      tags:
      - Webhooks
      operationId: webhooks-show
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Webhook.Detail"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will retrieve a <<glossary:webhook>> record.
      summary: Retrieve a webhook record
    patch:
      tags:
      - Webhooks
      operationId: webhooks-update
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '204':
          description: Updated webhook
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NoContent"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will update a <<glossary:webhook>> record.
      summary: Update a webhook record
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/WebhookPatchBody"
    delete:
      tags:
      - Webhooks
      operationId: webhooks-destroy
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '204':
          description: Deleted webhook
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NoContent"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will delete a <<glossary:webhook>> record.
      summary: Delete a webhook record
  "/webhooks/{webhook_id}/test_events":
    post:
      tags:
      - Webhooks
      operationId: webhooks-test_events
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Successfully sent webhook request
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WebhookTestResponse"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: Use this endpoint to test events being sent to your <<glossary:webhook>>.
      summary: Perform test event on a webhook
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/JobStatusChangedTestEvent0"
              - "$ref": "#/components/schemas/LoanAppStartedTestEvent0"
              - "$ref": "#/components/schemas/LoanAppUpdatedTestEvent0"
              - "$ref": "#/components/schemas/LoanAppSubmittedTestEvent0"
              - "$ref": "#/components/schemas/LoanAppImportedTestEvent0"
              - "$ref": "#/components/schemas/LoanAppAbandonedTestEvent0"
              - "$ref": "#/components/schemas/DocumentUploadedTestEvent0"
              - "$ref": "#/components/schemas/DocumentCreatedTestEvent0"
              - "$ref": "#/components/schemas/DocumentUpdatedTestEvent0"
              - "$ref": "#/components/schemas/LoanMilestoneUpdatedTestEvent0"
              - "$ref": "#/components/schemas/LoanMilestoneCompletedTestEvent0"
              - "$ref": "#/components/schemas/LoanCreatedTestEvent0"
              - "$ref": "#/components/schemas/LoanUpdatedTestEvent0"
              - "$ref": "#/components/schemas/LoanDeletedTestEvent0"
              - "$ref": "#/components/schemas/LoanActivatedTestEvent0"
              - "$ref": "#/components/schemas/LoanDeactivatedTestEvent0"
              - "$ref": "#/components/schemas/MilestonesReorderedTestEvent0"
              - "$ref": "#/components/schemas/MilestoneCreatedTestEvent0"
              - "$ref": "#/components/schemas/MilestoneDeletedTestEvent0"
              - "$ref": "#/components/schemas/OrganizationCreatedTestEvent0"
              - "$ref": "#/components/schemas/OrganizationDeletedTestEvent0"
              - "$ref": "#/components/schemas/StateLicenseCreatedTestEvent0"
              - "$ref": "#/components/schemas/StateLicenseUpdatedTestEvent0"
              - "$ref": "#/components/schemas/StateLicenseDeletedTestEvent0"
              - "$ref": "#/components/schemas/AccountAssignmentCreatedTestEvent0"
              - "$ref": "#/components/schemas/AccountAssignmentDeletedTestEvent0"
              - "$ref": "#/components/schemas/LoanOfficerPromotedTestEvent0"
              - "$ref": "#/components/schemas/LoanOfficerDemotedTestEvent0"
              - "$ref": "#/components/schemas/UserCreatedTestEvent0"
              - "$ref": "#/components/schemas/UserUpdatedTestEvent0"
              - "$ref": "#/components/schemas/UserEnabledTestEvent0"
              - "$ref": "#/components/schemas/UserDisabledTestEvent0"
              - "$ref": "#/components/schemas/UserFirstLoginTestEvent0"
              - "$ref": "#/components/schemas/UserDeletedTestEvent0"
              - "$ref": "#/components/schemas/VerificationAvailableTestEvent0"
              discriminator:
                propertyName: event
                mapping:
                  job_status_changed: "#/components/schemas/JobStatusChangedTestEvent0"
                  loan_app_started: "#/components/schemas/LoanAppStartedTestEvent0"
                  loan_app_updated: "#/components/schemas/LoanAppUpdatedTestEvent0"
                  loan_app_submitted: "#/components/schemas/LoanAppSubmittedTestEvent0"
                  loan_app_imported: "#/components/schemas/LoanAppImportedTestEvent0"
                  loan_app_abandoned: "#/components/schemas/LoanAppAbandonedTestEvent0"
                  document_uploaded: "#/components/schemas/DocumentUploadedTestEvent0"
                  document_created: "#/components/schemas/DocumentCreatedTestEvent0"
                  document_updated: "#/components/schemas/DocumentUpdatedTestEvent0"
                  loan_milestone_updated: "#/components/schemas/LoanMilestoneUpdatedTestEvent0"
                  loan_milestone_completed: "#/components/schemas/LoanMilestoneCompletedTestEvent0"
                  loan_created: "#/components/schemas/LoanCreatedTestEvent0"
                  loan_updated: "#/components/schemas/LoanUpdatedTestEvent0"
                  loan_deleted: "#/components/schemas/LoanDeletedTestEvent0"
                  loan_activated: "#/components/schemas/LoanActivatedTestEvent0"
                  loan_deactivated: "#/components/schemas/LoanDeactivatedTestEvent0"
                  milestones_reordered: "#/components/schemas/MilestonesReorderedTestEvent0"
                  milestone_created: "#/components/schemas/MilestoneCreatedTestEvent0"
                  milestone_deleted: "#/components/schemas/MilestoneDeletedTestEvent0"
                  organization_created: "#/components/schemas/OrganizationCreatedTestEvent0"
                  organization_deleted: "#/components/schemas/OrganizationDeletedTestEvent0"
                  state_license_created: "#/components/schemas/StateLicenseCreatedTestEvent0"
                  state_license_updated: "#/components/schemas/StateLicenseUpdatedTestEvent0"
                  state_license_deleted: "#/components/schemas/StateLicenseDeletedTestEvent0"
                  account_assignment_created: "#/components/schemas/AccountAssignmentCreatedTestEvent0"
                  account_assignment_deleted: "#/components/schemas/AccountAssignmentDeletedTestEvent0"
                  loan_officer_promoted: "#/components/schemas/LoanOfficerPromotedTestEvent0"
                  loan_officer_demoted: "#/components/schemas/LoanOfficerDemotedTestEvent0"
                  user_created: "#/components/schemas/UserCreatedTestEvent0"
                  user_updated: "#/components/schemas/UserUpdatedTestEvent0"
                  user_enabled: "#/components/schemas/UserEnabledTestEvent0"
                  user_disabled: "#/components/schemas/UserDisabledTestEvent0"
                  user_first_login: "#/components/schemas/UserFirstLoginTestEvent0"
                  user_deleted: "#/components/schemas/UserDeletedTestEvent0"
                  verification_available: "#/components/schemas/VerificationAvailableTestEvent0"
  "/webhooks/{webhook_id}/actions":
    post:
      tags:
      - Webhooks
      operationId: webhooks-actions
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '204':
          description: No content
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NoContent"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '201':
          description: Created <<glossary:asynchronous job>> to process action
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ResourceCreated"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '409':
          description: Webhook already exists for the given URL
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorSet"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '412':
          description: Resource is in an invalid state
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorSet"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: "> \U0001F4CC Available actions\n  **ENABLE** - Activate webhook\n
        \ **DISABLE** - Deactivate webhook\n  **TEST** - Test webhook connection to
        URL\n  **CHANGE_URL** - Change URL for webhook"
      summary: Perform action on a webhook
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              oneOf:
              - "$ref": "#/components/schemas/WebhookAction"
              discriminator:
                propertyName: action
                mapping:
                  ENABLE: "#/components/schemas/WebhookAction"
                  DISABLE: "#/components/schemas/WebhookAction"
                  TEST: "#/components/schemas/WebhookAction"
                  CHANGE_URL: "#/components/schemas/ChangeUrlAction"
  "/webhooks/{webhook_id}/subscriptions":
    post:
      tags:
      - Subscriptions
      operationId: subscriptions-create
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '201':
          description: Subscription created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ResourceCreated"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '409':
          description: Webhook is already subscribed to event
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorSet"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: Create a subscription for a <<glossary:webhook>>
      summary: Create a subscription for a webhook
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/WebhookSubscriptionSaveBody"
    get:
      tags:
      - Subscriptions
      operationId: subscriptions-index
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/Page"
      - "$ref": "#/components/parameters/PageSize"
      - "$ref": "#/components/parameters/CreatedAfter"
      - "$ref": "#/components/parameters/CreatedBefore"
      - "$ref": "#/components/parameters/UpdatedAfter"
      - "$ref": "#/components/parameters/UpdatedBefore"
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WebhookSubscriptionPagination"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will retrieve all of a <<glossary:webhook>>'s subscription
        records.
      summary: Retrieve all of a webhook's subscription records
  "/webhooks/{webhook_id}/subscriptions/{webhook_subscription_id}":
    get:
      tags:
      - Subscriptions
      operationId: subscriptions-show
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - name: webhook_subscription_id
        description: Subscription ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WebhookSubscription"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will retrieve a <<glossary:webhook>>'s subscription
        record.
      summary: Retrieve a webhook's subscription record
    patch:
      tags:
      - Subscriptions
      operationId: subscriptions-update
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - name: webhook_subscription_id
        description: Subscription ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '204':
          description: Subscription updated
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NoContent"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '409':
          description: Webhook is already subscribed to event
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorSet"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will update a <<glossary:webhook>>'s subscription
        record.
      summary: Update a webhook's subscription record
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/WebhookSubscriptionSaveBody"
    delete:
      tags:
      - Subscriptions
      operationId: subscriptions-destroy
      parameters:
      - name: webhook_id
        description: Webhook ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - name: webhook_subscription_id
        description: Subscription ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '204':
          description: Subscription removed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NoContent"
          headers:
            X-Api-Version:
              "$ref": "#/components/headers/ApiVersionResponseHeader"
            X-Api-Supported-Versions:
              "$ref": "#/components/headers/ApiSupportedVersionsResponseHeader"
        '400':
          "$ref": "#/components/responses/BadRequestError"
        '401':
          "$ref": "#/components/responses/UnauthorizedError"
        '403':
          "$ref": "#/components/responses/ForbiddenError"
        '404':
          "$ref": "#/components/responses/NotFoundError"
        '500':
          "$ref": "#/components/responses/InternalServerError"
      description: This endpoint will delete a <<glossary:webhook>>'s subscription
        record (i.e. unsubscribes a webhook from an event).
      summary: Delete a webhook's subscription record
  "/branches/{branch_id}/images/{image_key}":
    put:
      tags:
      - Branch Images
      operationId: branch_images-update
      parameters:
      - name: branch_id
        description: Branch ID.
        required: true
        in: path
        schema:
          type: string
          format: uuid
      - name: image_key
        description: Image to be updated.
        required: true
        in: path
        schema:
          type: string
          enum:
          - logo
          - app_icon
          - app_homepage_logo
      - "$ref": "#/components/parameters/ApiVersionHeader"
      responses:
        '204':
          description: Successfully updated branch image
         

# --- truncated at 32 KB (839 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ncino/refs/heads/main/openapi/ncino-mortgage-openapi.yml