Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
Formflow
https://formflow.stoplight.io/docs/
Admin
Formflow is a project whose official documentation has been relocated to a new URL.
Tokens:
11,787
Snippets:
35
Trust Score:
10
Update:
1 year ago
Context
Chat
Benchmark
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Webhook Subscription Response Example Source: https://formflow.stoplight.io/docs/api/cf0070ce8d379-get-webhook-subscription-by-id This is an example of a successful JSON response when retrieving webhook subscription details. It includes the subscription ID, event type, notification URL, organization ID, and timestamps for creation and update. ```JSON { "id": "123e4567-e89b-12d3-a456-426614174000", "event": "form.submitted", "url": "https://example.com/webhook-endpoint", "orgId": "org_123456", "createdAt": "2023-01-01T12:00:00Z", "updatedAt": "2023-01-01T13:30:00Z" } ``` -------------------------------- ### Get All Templates (cURL) Source: https://formflow.stoplight.io/docs/api/ee7d0d2df1422-get-a-template This snippet demonstrates how to fetch a paginated list of templates using a cURL request to the FormFlow API. It includes the necessary GET request, URL, and authorization header. ```shell curl --request GET \ --url https://main.formflow-dev.net/api/template \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### FormFlow JSON Payload Example Source: https://formflow.stoplight.io/docs/api/6c6kszxtyfv5v-terminology An example of a JSON payload structure that can be generated from a FormFlow template. This structure defines how extracted data will be organized, including nested objects and arrays. ```json { "customer": { "firstName": "John", "surname": "Wick" }, "risk": { "zip": "12345", "street": "Main Street", "city": "New York", "country": "USA", "county": "New York" }, "valueableItems": [ { "name": "Gold", "value": "10000" }, { "name": "Diamonds", "value": "I think about 4000$" }, { "name": "Fake Rolex", "value": "100 - more sentimental value" } ] } ``` -------------------------------- ### Get Templates Source: https://formflow.stoplight.io/docs/api/no0pg87h7w95z-introduction Retrieve a list of available templates. This is typically polled regularly to sync metadata. ```bash GET template ``` -------------------------------- ### Get Submission Events (Shell/cURL) Source: https://formflow.stoplight.io/docs/api/d18e9a24568f0-get-all-events-for-a-submission This snippet demonstrates how to retrieve all events for a given submission ID using a cURL command. It specifies the GET request method, the API endpoint, and includes necessary headers for authentication and content type. ```Shell curl --request GET \ --url https://main.formflow-dev.net/api/submission/{id}/events \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### Submission Events Response Example (JSON) Source: https://formflow.stoplight.io/docs/api/d18e9a24568f0-get-all-events-for-a-submission This JSON structure represents a successful response when fetching submission events. It includes an array of event objects, each containing an ID, submission ID, event type, state, creation timestamp, and update timestamp. ```JSON [ { "id": "123e4567-e89b-12d3-a456-426614174000", "submissionId": "123e4567-e89b-12d3-a456-426614174001", "type": "upload", "state": "pending", "createdAt": "2023-01-01T12:00:00.000Z", "updatedAt": "2023-01-01T12:30:00.000Z" } ] ``` -------------------------------- ### Get Template Submissions (cURL) Source: https://formflow.stoplight.io/docs/api/e4b0ffea2373c-list-template-submissions Fetches a paginated list of submissions for a given template ID. Requires a Bearer token for authentication and allows specifying page and perPage query parameters. ```shell curl --request GET \ --url https://main.formflow-dev.net/api/template/{id}/submissions \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### Get Submission References (cURL) Source: https://formflow.stoplight.io/docs/api/cc0f88d061425-get-references-for-submission This snippet demonstrates how to fetch references for a specific submission using a GET request via cURL. It requires an authorization token and the submission ID as a path parameter. ```shell curl --request GET \ --url https://main.formflow-dev.net/api/submission/{id}/references \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### Get Submission via cURL Source: https://formflow.stoplight.io/docs/api/a36af34a6ea92-get-submission This snippet demonstrates how to fetch a submission using the cURL command-line tool. It requires the submission ID and an authorization token. ```shell curl --request GET \ --url https://main.formflow-dev.net/api/submission/{id} \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### Get Webhook Subscription by ID (cURL) Source: https://formflow.stoplight.io/docs/api/cf0070ce8d379-get-webhook-subscription-by-id This snippet demonstrates how to retrieve a webhook subscription by its ID using cURL. It includes the GET request method, the API endpoint with a placeholder for the ID, and the necessary Authorization header. ```Shell curl --request GET \ --url https://main.formflow-dev.net/api/webhook/subscription/{id} \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### Initiate Processing (POST /api/processing) Source: https://formflow.stoplight.io/docs/api/e786eaa30dd93-processing-a-submission-via-api Starts the processing of a submission. Requires the submission ID. Returns an event ID to track the processing status. ```JSON { "submissionId": "string" } ``` -------------------------------- ### Get Submissions Source: https://formflow.stoplight.io/docs/api/no0pg87h7w95z-introduction Retrieve a list of submissions since a specified time. Used to compare with local data stores. ```bash GET submission ``` -------------------------------- ### Get Submission Details Source: https://formflow.stoplight.io/docs/api/no0pg87h7w95z-introduction Fetch the details of a specific submission by its ID. Used for submissions in 'completed' status. ```bash GET submission/{id} ``` -------------------------------- ### Retrieve Submission Details (GET /api/submission/{id}) Source: https://formflow.stoplight.io/docs/api/e786eaa30dd93-processing-a-submission-via-api Fetches the details of a specific submission, including its status and any extracted payload. Requires the submission ID. ```HTTP GET /api/submission/{id} ``` -------------------------------- ### Get File Upload URL (POST /api/submission/{id}/upload) Source: https://formflow.stoplight.io/docs/api/e786eaa30dd93-processing-a-submission-via-api Obtains a secure URL for uploading files to an AWS S3 bucket associated with a submission. Requires the submission ID and file details. ```JSON { "fileName": "file-name-here.pdf", "contentType": "content/type" } ``` -------------------------------- ### Check Processing Status (GET /api/processing/{id}) Source: https://formflow.stoplight.io/docs/api/e786eaa30dd93-processing-a-submission-via-api Retrieves the current status of a processing event using its event ID. Possible states include pending, succeed, and fail. ```HTTP GET /api/processing/{id} ``` -------------------------------- ### Create Webhook Subscription (cURL Request) Source: https://formflow.stoplight.io/docs/api/f782647e5c703-create-webhook-subscription This cURL command demonstrates how to send a POST request to create a webhook subscription. It includes the necessary headers for authorization and content type, along with the JSON request body. ```shell curl --request POST \ --url https://main.formflow-dev.net/api/webhook/subscription \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123' \ --header 'Content-Type: application/json' \ --data '{ \ "url": "https://example.com/webhook-endpoint", \ "event": "form.submitted" \ }' ``` -------------------------------- ### Create Template API Request Source: https://formflow.stoplight.io/docs/api/feb68945cfde0-create-a-template This snippet demonstrates how to create a new template using the FormFlow API. It includes the endpoint, HTTP method, and a JSON payload with all possible fields. ```json { "name": "string", "description": "string", "version": 0, "schema": {}, "aiGenerated": true, "vendorSchemaName": "string", "vendorSchemaVersion": 0, "vendorSchema": {}, "emailAlias": "string", "state": "published" } ``` -------------------------------- ### Subscribe to Webhooks Source: https://formflow.stoplight.io/docs/api/no0pg87h7w95z-introduction Subscribe to receive event notifications from FormFlow in real-time. ```bash POST webhooks/subscribe ``` -------------------------------- ### Generate API Token using cURL Source: https://formflow.stoplight.io/docs/api/9d89d64c7c0e8-create-a-token This snippet demonstrates how to generate an API token using a cURL command. It specifies the POST request to the token endpoint, includes necessary headers for authorization and content type, and sends an empty JSON body. ```cURL curl --request POST \ --url https://main.formflow-dev.net/api/token \ --header 'Authorization: Bearer 123' \ --header 'Content-Type: application/json' \ --data '{}' ``` -------------------------------- ### Create Template cURL Request Source: https://formflow.stoplight.io/docs/api/feb68945cfde0-create-a-template A cURL command to send a POST request to the FormFlow API for creating a new template. It specifies the URL, authorization header, content type, and the JSON data payload. ```shell curl --request POST \ --url https://main.formflow-dev.net/api/template \ --header 'Authorization: Bearer 123' \ --header 'Content-Type: application/json' \ --data '{ \ "name": "string", \ "description": "string", \ "version": 0, \ "schema": {}, \ "aiGenerated": true, \ "vendorSchemaName": "string", \ "vendorSchemaVersion": 0, \ "vendorSchema": {}, \ "emailAlias": "string", \ "state": "published" \ }' ``` -------------------------------- ### Create Webhook Subscription (JSON Response) Source: https://formflow.stoplight.io/docs/api/f782647e5c703-create-webhook-subscription This snippet shows a successful response when creating a webhook subscription. It includes the unique ID of the subscription, the event type, the provided URL, organization ID, and timestamps for creation and update. ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "event": "form.submitted", "url": "https://example.com/webhook-endpoint", "orgId": "org_123456", "createdAt": "2023-01-01T12:00:00Z", "updatedAt": "2023-01-01T13:30:00Z" } ``` -------------------------------- ### Create Webhook Subscription (JSON Request Body) Source: https://formflow.stoplight.io/docs/api/f782647e5c703-create-webhook-subscription This snippet shows the JSON payload required to create a webhook subscription. It includes the URL for receiving notifications and the event type that triggers them. ```json { "url": "https://example.com/webhook-endpoint", "event": "form.submitted" } ``` -------------------------------- ### Obtain FormFlow API Token Source: https://formflow.stoplight.io/docs/api/cutizyk2a4u58-authentication-and-limits This snippet shows how to request an API token by sending a POST request to the /api/token endpoint with your client credentials and organization ID. ```JSON { "clientId": "2mvc4Ev4qpU8Y0FbADRq4xpZOhf", "clientSecret": "{zPYnGM$c&p+NLH0JNm-xdD'6+VHVuE`1R/xe(7+*eSAIOW^C~)M:8H_32Vd#{J", "organizationId": "2nHy8pbeoD5CM9WbjvyGj1VKoUu" } ``` -------------------------------- ### Create Empty Submission (POST /api/submission) Source: https://formflow.stoplight.io/docs/api/e786eaa30dd93-processing-a-submission-via-api Creates an empty submission record. Requires a name and template ID. Returns submission details including a unique ID. ```JSON { "name": "string", "templateId": "number" } ``` -------------------------------- ### Authenticate FormFlow API Requests Source: https://formflow.stoplight.io/docs/api/cutizyk2a4u58-authentication-and-limits This snippet demonstrates how to include the obtained Bearer token in the Authorization header for subsequent API requests to authenticate your application. ```text Authorization: Bearer <your_token> ``` -------------------------------- ### Update Template via API (cURL) Source: https://formflow.stoplight.io/docs/api/86b02ff46bc13-update-template This snippet demonstrates how to update a template using a PATCH request to the FormFlow API. It includes the necessary headers for authorization and content type, along with the JSON payload for the template update. ```shell curl --request PATCH \ --url https://main.formflow-dev.net/api/template/{id} \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123' \ --header 'Content-Type: application/json' \ --data '{ \ "name": "string", \ "description": "string", \ "version": 0, \ "schema": {}, \ "vendorSchemaName": "string", \ "vendorSchemaVersion": 0, \ "vendorSchema": {}, \ "emailAlias": "string", \ "state": "draft" \ }' ``` -------------------------------- ### FormFlow API Token Response Source: https://formflow.stoplight.io/docs/api/cutizyk2a4u58-authentication-and-limits This snippet illustrates a successful 200 response from the token endpoint, containing the Bearer token, its type, and its expiration time. ```JSON { "token": "eyJhbGciOiJSUzI1NiIsImNhdCI6ImNsX0I3ZDRQRDIyMkFBQSIsImtpZCI6Imluc18ya3AwcDdvWVF3VDZ2OHdxVHNURnJsYnFFY2YiLCJ0eXAiOiJKV1QifQ.eyJhenAiOiJodHRwOi8vMTI3LjAuMC4xOjMwMDAiLCJleHAiOjIwNTI4MTE2MzYsImlhdCI6MTczNzQ1MTYzNiwiaXNzIjoiaHR0cHM6Ly9sb3lhbC13b3JtLTM4LmNsZXJrLmFjY291bnRzLmRldiIsImp0aSI6ImRiZmU5MGViNzQyNzkxNzZmNzg3IiwibmJmIjoxNzM3NDUxNjMxLCJvcmdfaWQiOiJvcmdfMm5IeThwYmVvRDVDTTlXYmp2eUdqMVZLb1V1Iiwic3ViIjoidXNlcl8ybXlNM1ZVVWt2ODRDRWw0Y1RlbWprQUZRbUIifQ.NpHUDQa45oAqmR3VH_fGtTp8reJHILnDGv0nmxRFBDpMCIfnZUfZABxGm-2KuLYt4fxbewx_0MeuqLKAvYq3ZiXjdtRgcL3skbo3jqUzkmnbt30oItMrfbyWNLmWRlrzsn8L_WC7ZRamQY8Nkn0_j08QY5ZQQB8xwAr81o8UVCvEa7MBvw5GjsY1JwTDM8sZlRKVneTi5vZDw0Bs-qo1tKgfEfz10ylsmAiMATnzDuJt7SOTZ8jaoDaOyA8_oNtiGNrycp_nJj4xfnLRg3u6G5A_UPPzF4ghUPUbuGlulhr712rcFzEbd2_nlMJRk4Ud6SRU4WcNblnrRCe7EdUsAw", "expires_in": 3600, "token_type": "Bearer" } ``` -------------------------------- ### Upload File via PUT Request Source: https://formflow.stoplight.io/docs/api/e786eaa30dd93-processing-a-submission-via-api Uploads a file to the provided secure URL using a PUT request. The Content-Type header must match the file's content type. ```HTTP PUT /upload-url-from-previous-step Content-Type: application/pdf // File content here ``` -------------------------------- ### Delete Template via cURL Source: https://formflow.stoplight.io/docs/api/eef31dc89cb9f-delete-a-template This snippet demonstrates how to delete a template using the cURL command-line tool. It specifies the DELETE request method, the API endpoint, and includes an Authorization header with a Bearer token. ```shell curl --request DELETE \ --url https://main.formflow-dev.net/api/template/{id} \ --header 'Authorization: Bearer 123' ``` -------------------------------- ### Update Webhook Subscription (cURL) Source: https://formflow.stoplight.io/docs/api/a4a51b9f5fbc6-update-webhook-subscription This snippet demonstrates how to update an existing webhook subscription using cURL. It includes the PUT request to the specific subscription ID, authentication headers, and the JSON payload containing the updated URL and event. ```Shell curl --request PUT \ --url https://main.formflow-dev.net/api/webhook/subscription/{id} \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123' \ --header 'Content-Type: application/json' \ --data '{ \ "url": "https://example.com/webhook-endpoint", \ "event": "form.submitted" \ }' ``` -------------------------------- ### Template Update Request Body (JSON) Source: https://formflow.stoplight.io/docs/api/86b02ff46bc13-update-template This JSON object represents the structure of the request body used to update a template in the FormFlow API. It includes fields for the template's name, description, version, schema details, and state. ```json { "name": "string", "description": "string", "version": 0, "schema": {}, "vendorSchemaName": "string", "vendorSchemaVersion": 0, "vendorSchema": {}, "emailAlias": "string", "state": "draft" } ``` -------------------------------- ### Template Update Response Body (JSON) Source: https://formflow.stoplight.io/docs/api/86b02ff46bc13-update-template This JSON object shows a successful response when updating a template via the FormFlow API. It mirrors the structure of the request body, confirming the updated template details. ```json { "name": "string", "description": "string", "version": 0, "schema": {}, "vendorSchemaName": "string", "vendorSchemaVersion": 0, "vendorSchema": {}, "emailAlias": "string", "state": "draft" } ``` -------------------------------- ### Update Webhook Subscription Request Body (JSON) Source: https://formflow.stoplight.io/docs/api/a4a51b9f5fbc6-update-webhook-subscription This JSON object represents the request body for updating a webhook subscription. It specifies the 'url' for receiving notifications and the 'event' type that will trigger these notifications. ```JSON { "url": "https://example.com/webhook-endpoint", "event": "form.submitted" } ``` -------------------------------- ### Update Webhook Subscription Response Body (JSON) Source: https://formflow.stoplight.io/docs/api/a4a51b9f5fbc6-update-webhook-subscription This JSON object shows a successful response after updating a webhook subscription. It includes the subscription's ID, event type, URL, organization ID (if applicable), and timestamps for creation and last update. ```JSON { "id": "123e4567-e89b-12d3-a456-426614174000", "event": "form.submitted", "url": "https://example.com/webhook-endpoint", "orgId": "org_123456", "createdAt": "2023-01-01T12:00:00Z", "updatedAt": "2023-01-01T13:30:00Z" } ```