On This Page

API Overview

How to Make API Calls to ProcessMind

This guide provides examples and best practices for making API calls to ProcessMind’s services. Whether you’re looking to retrieve data, submit information, or automate workflows, understanding how to interact with our API is essential.

For complete endpoint documentation with request/response formats, see the API Reference.

For additional examples and client libraries, visit our API Documentation on GitHub.

API Base URL

All API requests should be made to:

https://api.processmind.com

Authentication

All API requests require your API key in the x-api-key header:

x-api-key: your-api-key-here

The API key can be obtained from your ProcessMind account settings. See Getting your API Key for instructions.

Key Concepts

  • apiKey – Your authentication token for all API requests.
  • tenantId – Identifies your workspace/organization context. Found in your account settings.
  • datatableId – Identifies a specific datatable for data operations. Available in the dataset settings menu [Get Data Table ID] within ProcessMind.

What You Can Do

The ProcessMind API enables you to:

  • Manage Tenants – Retrieve tenant info, update settings, view statistics
  • Manage Users – Add, update, or remove users from tenants and organizations
  • Manage Processes – Create processes, upload BPMN models, organize in folders
  • Connect Data – Map datatables to processes for analysis
  • Upload Data – Upload CSV/XLSX files directly to datatables
  • Manage Datasets – List, inspect, and delete datasets and datatables

Common Examples

Below are practical examples showing how to perform common operations with the ProcessMind API.

Getting a Presigned Upload URL

To upload a file to a datatable, first obtain a presigned URL:

const presignedUrl = await getPresignedUploadUrl({
	apiKey,
	tenantId: "tenant-123",
	datatableId: "table-456"
});
console.log(presignedUrl); // https://s3.amazonaws.com/…?X-Amz-Signature=…

Listing Datasets

Retrieve all datasets in your tenant:

const datasets = await getDatasets({
	apiKey,
	tenantId: "tenant-123"
});
console.log(datasets);

Getting Tenant Information

Retrieve details about your tenant:

const tenantInfo = await getTenant({
	apiKey,
	tenantId: "tenant-123"
});
console.log(tenantInfo);

Creating a Process

Create a new process in your tenant:

const process = await createProcess({
	apiKey,
	tenantId: "tenant-123",
	displayName: "Order to Cash"
});
console.log(process.id); // Use this ID for subsequent operations

Uploading a BPMN Model

Upload a BPMN file to define your process model:

const fs = require("fs");
const bpmnXml = fs.readFileSync("./my-process.bpmn", "utf8");

await uploadBpmn({
	apiKey,
	tenantId: "tenant-123",
	processId: "process-456",
	bpmnXml
});

Mapping Data to a Process

Connect a datatable to a process for analysis:

const mapping = await createProcessMapping({
	apiKey,
	tenantId: "tenant-123",
	processId: "process-456",
	dataTableId: "datatable-789",
	displayName: "Sales Data 2024",
	showByDefault: true
});

Adding a User to a Tenant

Add a user to your tenant:

const result = await addTenantUser({
	apiKey,
	tenantId: "tenant-123",
	id: "user-456",
	email: "colleague@example.com",
	isAdminInTenant: false,
	isActiveInTenant: true,
	sendInvitationEmail: true
});

Uploading Files

The general flow for uploading a file to ProcessMind is:

  1. Get a presigned URL using the getPresignedUploadUrl call.
  2. Perform a PUT request to that URL with the file contents.
  3. The presigned URL authorizes the upload directly to cloud storage – no additional credentials needed.

Here is a simplified example using fetch:

async function uploadFile({ apiKey, tenantId, datatableId, file }) {
	// Step 1: Obtain a presigned URL
	const uploadUrl = await getPresignedUploadUrl({ apiKey, tenantId, datatableId });
	
	// Step 2: Upload the file via PUT
	await fetch(uploadUrl, {
		method: "PUT",
		headers: {
			"Content-Type": file.type
		},
		body: file
	});
}

info

  • Presigned URLs expire after a set time (often minutes). Use the URL promptly after fetching it.
  • If an upload fails (e.g. network interruption), request a new presigned URL before retrying.
  • Always keep your apiKey secure and do not expose it on the client side (e.g. in a public front‑end).

Complete Examples

Below are complete, copy-paste ready examples in different languages.

Bash Example: Uploading a File

Minimal Bash script to upload a file to ProcessMind using two curl calls, with placeholders for all values

Download BASH Example

Node.js Example: Uploading a Local CSV File

Uploads a local CSV file to ProcessMind using a presigned URL.

Steps:

  1. Fetch a presigned upload URL from the API.
  2. Read the local file from disk.
  3. Upload the file to the presigned URL using HTTP PUT.

Configuration:

  • Provide your API key, tenantId, datatableId, and filePath when calling uploadFileToProcessMind().
  • The API base URL is set to https://api.processmind.com
Download NodeJS Example

Python Example: Uploading a Local CSV File

Uploads a local CSV file to a remote API using a presigned URL.

Steps:

  1. Fetch a presigned upload URL from the API.
  2. Read the local file from disk.
  3. Upload the file to the presigned URL using HTTP PUT.

Configuration:

  • Update api_key, tenant_id, datatable_id, file_path as needed.
Download Python Example

Next Steps

info

If you have any questions or need assistance with using the API, feel free to reach out to our support team or join our developer community forums.