Product guides
Workflow
How to Use the MindPal API (Beta)

How to Use the MindPal API (Beta)

Welcome to the MindPal API! Whether you're looking to automate your workflows or integrate MindPal's capabilities into your own applications, this guide will help you get started smoothly. Let's break down the steps to make things super easy!

Step 1: Generate Your MindPal API Key

First things first, you need an API key to authenticate and interact with the MindPal API.

  1. Visit the API Key Page: Go to MindPal API Settings (opens in a new tab).

  2. Generate API Key: Follow the instructions on the page to create your unique API Key. Keep this key safe as it's your access pass!

Step 2: Access the MindPal API

Now that you have your API key, you can start exploring what MindPal API offers.

  1. API Endpoint: Access the API through https://api.mindpal.io/ (opens in a new tab).

  2. Documentation: Check out the API Documentation (opens in a new tab) to understand the available endpoints and how they work.

Step 3: Trigger a Workflow Run on the API

To trigger a workflow, you'll need to make a POST request. Here’s how you can do it:

  1. Authenticate: Use your API key to authenticate your requests.

  2. Specify Workflow ID: Include the workflow ID you want to trigger in the request URL. You will find the workflow ID inside the link of the workflow on MindPal.

  3. Prepare Input Data: Format your input data as a JSON object. Each key should be the input name, and the corresponding value should be the field value.

  4. For Images or File Input: With file and image input, you need to upload them into the endpoint /api/file/upload and /api/image/upload. Then use the returned file content or image url to feed into your data object.

Example API Request

Here’s how a typical API request to trigger a workflow looks like:

    curl -X 'POST' \
      'https://api.mindpal.io/api/workflow/run?workflow_id=YOUR_WORKFLOW_ID' \
      -H 'accept: application/json' \
      -H 'x-api-key: YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
            "input_name": "input_value"
          }'

Replace YOUR_WORKFLOW_ID, YOUR_API_KEY, and the input data with your actual workflow ID, API key, and the data you want to process.

Need Help?

If you encounter any issues or have questions, don't hesitate to book a 30-minute consultation (opens in a new tab) with our team. We're here to help you make the most out of MindPal API!