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

# Submit A New Application Via The API

## Submit A New Application Via The API

Users can use [Create Application Using Workflow Builder](/api-reference/workflow-management/create-application-using-workflow-builder) (`POST /api/applications/workflow`) to submit a new application, which requires three inputs:

1. A Bearer token or Integration Token for authentication
2. Deal payload: This contains the application information
3. Workflow Template ID: A Workflow Template ID (Lendflow global template or [custom template](/lendflow-external/docs/what-is-the-workflow-builder#create-a-workflow-template) ) is used to match the submitted application to the Workflow Template of your choice

## 1. Choose an Authentication Token

Lendflow supports either authentication option:

* **Bearer Token endpoint:** Call [Get Bearer Token](/api-reference/authentication/get-bearer-token) using the email and password registered with Lendflow.
* **Integration Token:** Create a scoped token from **Profile → Integration Tokens** in the Lendflow Dashboard. See [Integration Tokens](/lendflow-external/docs/integration-tokens) for creation, permissions, storage, expiration, and revocation.

Send either token in the `Authorization: Bearer <token>` request header. Treat both token types like passwords and store them securely.

## 2. Creating a Sample Deal Payload

The payload is where your application information goes. The example below includes the **minimal data required** to create an application and can be used as a starter.

Some fields accept only specific IDs or values. Before building your payload, review [Lendflow Validations For Data Collection](/api-docs/reference/lendflow-validations-for-application-stage) for available field input options and accepted values.

Before submitting:

* Replace the sample values with your actual application data
* Set `workflow_template_id` to a Lendflow global template ID or a [custom template](/lendflow-external/docs/what-is-the-workflow-builder#create-a-workflow-template) ID.

```json JSON theme={"system"}
{
  "workflow_template_id": "YOUR_WORKFLOW_TEMPLATE_ID",
  "business": {
    "business_legal_name": "Acme Services LLC",
    "business_dba": "Acme Services",
    "business_ein": "12-3456789",
    "business_entity_type": 1,
    "business_start_date": "2018-11-28",
    "business_state_of_incorporation": "CA",
    "business_addresses": [
      {
        "address_line": "123 Main St",
        "city": "San Jose",
        "state": "CA",
        "country": "US",
        "zip": "95116",
        "is_primary": true
      }
    ],
    "business_phone_numbers": [
      {
        "phone_number": "4085550100",
        "is_primary": true
      }
    ]
  },
  "personal": [
    {
      "personal_first_name": "Jane",
      "personal_last_name": "Owner",
      "personal_date_of_birth": "1980-09-20",
      "personal_is_primary": true,
      "personal_ownership_percentage": 100,
      "personal_telephone": {
        "telephone": "4085550100"
      },
      "personal_email_address": {
        "email_address": "jane.owner@example.com"
      },
      "personal_ssn_itin": {
        "ssn": "123456789"
      },
      "personal_addresses": [
        {
          "address_line": "123 Main St",
          "city": "San Jose",
          "state": "CA",
          "country": "US",
          "zip": "95116",
          "is_primary": true
        }
      ]
    }
  ],
  "funding": {
    "funding_amount_requested": 50000,
    "funding_actual_average_monthly_revenue": 25000,
    "funding_use_of_funds": 12
  },
  "prequal": {
    "prequal_requested_amount": 50000,
    "prequal_time_in_business": "time_in_business_5"
  }
}
```

## 3. Workflow Template ID

The [Workflow Builder](/lendflow-external/docs/what-is-the-workflow-builder) allows users to customize their workflow templates when submitting deals via the API. The template ID matches the application to the selected template. Users can specify a global or client workflow template. List the templates available to your account with [List Workflow Templates](/api-reference/workflow-templates/list-workflow-templates) (`GET /api/workflow_templates`).

### Global Workflow Template IDs

To use a Lendflow global template, set `workflow_template_id` to that template’s ID from [List Workflow Templates](/api-reference/workflow-templates/list-workflow-templates). Your customer success manager can also provide the global template IDs for your account.

### Client Workflow Template ID

Users are also able to use their [own Workflow Template ID](/lendflow-external/docs/what-is-the-workflow-builder#create-a-workflow-template) and input it in the `workflow_template_id` field.

## Creating the Application via API

Once the user has their sample payload and Workflow Template ID for the `workflow_template_id` field, they can send the information to [Create Application Using Workflow Builder](/api-reference/workflow-management/create-application-using-workflow-builder) (`POST /api/applications/workflow`). All other fields are optional.

When using a non-global WFB template, required fields can be customized in the template. The ‘with\_validation’ field allows the user to choose whether to validate the required fields set in the template.

* If ‘with\_validation’ is set to ‘true’, the endpoint will return any required fields which have no values. All required fields must have values filled out before the application submission is successful.
* If ‘with\_validation’ is set to ‘false’, the application submission will be successful even if required fields have no value set. However, the user will not be able to move the deal to the next stage until all the required fields have a value filled out.

## Track an application via Webhooks

Lendflow has different webhooks for users to track their applications and progress through the different stages. Users can set up notifications for [Global Workflows](/lendflow-external/docs/global-workflows-webhooks) or [Custom Workflows](/lendflow-external/docs/custom-workflows-webhooks).

Webhook signature verification is optional but recommended. If your organization wants to verify webhook signatures, request its webhook secret from Lendflow's Customer Success team and follow [Verifying Webhook Authenticity](/lendflow-external/docs/verifying-webhook-authenticity). Treat the secret like a password.

## Update an Application

After creating the application, follow [Manage an Application via the API](/api-docs/docs/manage-an-application-via-the-api) for the full post-creation flow. Use [Update Application Workflow Data](/api-reference/workflow-management/update-application-workflow-data) (`PUT /api/applications/{application_id}/workflow`) when application fields change.

## FAQ

<AccordionGroup>
  <Accordion title="What do I need to submit an application?">
    You need three inputs: a Bearer token or Integration Token, a deal payload with the application information, and a `workflow_template_id` for a Lendflow global template or a [custom template](/lendflow-external/docs/what-is-the-workflow-builder#create-a-workflow-template).
  </Accordion>

  <Accordion title="What does with_validation do?">
    On a non-global workflow template, required fields come from the template. If `with_validation` is `true`, the endpoint returns any required fields that have no value, and submission fails until those fields are filled. If `with_validation` is `false`, submission succeeds even when required fields are empty, and you cannot move the deal to the next stage until those fields have values.
  </Accordion>

  <Accordion title="How do I choose a workflow template ID?">
    Set `workflow_template_id` to a Lendflow global template ID or to your own custom workflow template ID. List available templates with [List Workflow Templates](/api-reference/workflow-templates/list-workflow-templates).
  </Accordion>

  <Accordion title="How do I update an application after I submit it?">
    Follow [Manage an Application via the API](/api-docs/docs/manage-an-application-via-the-api) for application updates, document uploads, stage transitions, underwriting, offers, closing, and funding.
  </Accordion>
</AccordionGroup>

## Next steps

<Card title="Manage an Application via the API" icon="diagram-project" href="/api-docs/docs/manage-an-application-via-the-api" horizontal>
  Continue from application creation through underwriting, offers, closing, and funding.
</Card>

<Card title="Lendflow Validations For Data Collection" icon="table" href="/api-docs/reference/lendflow-validations-for-application-stage" horizontal>
  Look up field IDs and allowed values for the deal payload.
</Card>

<Card title="Verifying Webhook Authenticity" icon="shield-halved" href="/lendflow-external/docs/verifying-webhook-authenticity" horizontal>
  Confirm that webhook requests were sent by Lendflow.
</Card>
