{ "openapi": "3.0.3", "info": { "title": "Activepieces Documentation", "version": "0.3.6" }, "components": { "schemas": { "project": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "ownerId": { "type": "string" }, "displayName": { "type": "string" }, "notifyStatus": { "anyOf": [ { "type": "string", "enum": [ "NEVER" ] }, { "type": "string", "enum": [ "ALWAYS" ] } ] }, "type": { "anyOf": [ { "type": "string", "enum": [ "PLATFORM_MANAGED" ] }, { "type": "string", "enum": [ "STANDALONE" ] } ] }, "platformId": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "externalId": { "type": "string" }, "plan": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "projectId": { "type": "string" }, "stripeCustomerId": { "type": "string" }, "stripeSubscriptionId": { "type": "string" }, "subscriptionStartDatetime": { "type": "string" }, "flowPlanName": { "type": "string" }, "minimumPollingInterval": { "type": "number" }, "connections": { "type": "number" }, "teamMembers": { "type": "number" }, "tasks": { "type": "number" }, "tasksPerDay": { "type": "number" } }, "required": [ "id", "created", "updated", "projectId", "stripeCustomerId", "subscriptionStartDatetime", "flowPlanName", "minimumPollingInterval", "connections", "teamMembers", "tasks" ] }, "usage": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "projectId": { "type": "string" }, "consumedTasks": { "type": "number" }, "connections": { "type": "number" }, "teamMembers": { "type": "number" }, "consumedTasksToday": { "type": "number" }, "nextResetDatetime": { "type": "string" } }, "required": [ "id", "created", "updated", "projectId", "consumedTasks", "connections", "teamMembers", "consumedTasksToday", "nextResetDatetime" ] } }, "required": [ "id", "created", "updated", "ownerId", "displayName", "notifyStatus", "type", "plan", "usage" ] }, "flow": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "projectId": { "type": "string" }, "folderId": { "type": "string" }, "version": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "flowId": { "type": "string" }, "displayName": { "type": "string" }, "trigger": { "anyOf": [ { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "WEBHOOK" ] }, "settings": { "type": "object", "properties": { "inputUiInfo": { "additionalProperties": true, "type": "object", "properties": { "currentSelectedData": {}, "customizedInputs": { "type": "object", "additionalProperties": {} }, "lastTestDate": { "type": "string" } } } }, "required": [ "inputUiInfo" ] } }, "required": [ "name", "valid", "displayName", "type", "settings" ] }, { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "PIECE_TRIGGER" ] }, "settings": { "type": "object", "properties": { "pieceName": { "type": "string" }, "pieceVersion": { "type": "string", "pattern": "^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$" }, "pieceType": { "anyOf": [ { "type": "string", "enum": [ "CUSTOM" ] }, { "type": "string", "enum": [ "OFFICIAL" ] } ] }, "packageType": { "anyOf": [ { "type": "string", "enum": [ "ARCHIVE" ] }, { "type": "string", "enum": [ "REGISTRY" ] } ] }, "triggerName": { "type": "string" }, "input": { "type": "object", "additionalProperties": {} }, "inputUiInfo": { "additionalProperties": true, "type": "object", "properties": { "currentSelectedData": {}, "customizedInputs": { "type": "object", "additionalProperties": {} }, "lastTestDate": { "type": "string" } } } }, "required": [ "pieceName", "pieceVersion", "pieceType", "packageType", "triggerName", "input", "inputUiInfo" ] } }, "required": [ "name", "valid", "displayName", "type", "settings" ] }, { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "EMPTY" ] }, "settings": {} }, "required": [ "name", "valid", "displayName", "type", "settings" ] } ] }, "updatedBy": { "type": "string" }, "valid": { "type": "boolean" }, "state": { "anyOf": [ { "type": "string", "enum": [ "LOCKED" ] }, { "type": "string", "enum": [ "DRAFT" ] } ] } }, "required": [ "id", "created", "updated", "flowId", "displayName", "trigger", "updatedBy", "valid", "state" ] }, "status": { "anyOf": [ { "type": "string", "enum": [ "ENABLED" ] }, { "type": "string", "enum": [ "DISABLED" ] }, { "type": "string", "enum": [ "UNPUBLISHED" ] } ] }, "schedule": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "CRON_EXPRESSION" ] }, "cronExpression": { "type": "string" }, "timezone": { "type": "string" } }, "required": [ "type", "cronExpression", "timezone" ] } }, "required": [ "id", "created", "updated", "projectId", "version", "status" ] }, "app-connection": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "name": { "type": "string" }, "type": { "anyOf": [ { "type": "string", "enum": [ "OAUTH2" ] }, { "type": "string", "enum": [ "PLATFORM_OAUTH2" ] }, { "type": "string", "enum": [ "CLOUD_OAUTH2" ] }, { "type": "string", "enum": [ "SECRET_TEXT" ] }, { "type": "string", "enum": [ "BASIC_AUTH" ] }, { "type": "string", "enum": [ "CUSTOM_AUTH" ] } ] }, "appName": { "type": "string" }, "projectId": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "status": { "anyOf": [ { "type": "string", "enum": [ "ACTIVE" ] }, { "type": "string", "enum": [ "ERROR" ] } ] } }, "required": [ "id", "created", "updated", "name", "type", "appName", "projectId", "status" ] } } }, "paths": { "/v1/flows/": { "get": { "tags": [ "flows" ], "description": "List flows", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "folderId", "required": false }, { "schema": { "type": "number" }, "in": "query", "name": "limit", "required": false }, { "schema": { "type": "string" }, "in": "query", "name": "cursor", "required": false } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "projectId": { "type": "string" }, "folderId": { "type": "string" }, "version": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "flowId": { "type": "string" }, "displayName": { "type": "string" }, "trigger": { "anyOf": [ { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "WEBHOOK" ] }, "settings": { "type": "object", "properties": { "inputUiInfo": { "additionalProperties": true, "type": "object", "properties": { "currentSelectedData": {}, "customizedInputs": { "type": "object", "additionalProperties": {} }, "lastTestDate": { "type": "string" } } } }, "required": [ "inputUiInfo" ] } }, "required": [ "name", "valid", "displayName", "type", "settings" ] }, { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "PIECE_TRIGGER" ] }, "settings": { "type": "object", "properties": { "pieceName": { "type": "string" }, "pieceVersion": { "type": "string", "pattern": "^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$" }, "pieceType": { "anyOf": [ { "type": "string", "enum": [ "CUSTOM" ] }, { "type": "string", "enum": [ "OFFICIAL" ] } ] }, "packageType": { "anyOf": [ { "type": "string", "enum": [ "ARCHIVE" ] }, { "type": "string", "enum": [ "REGISTRY" ] } ] }, "triggerName": { "type": "string" }, "input": { "type": "object", "additionalProperties": {} }, "inputUiInfo": { "additionalProperties": true, "type": "object", "properties": { "currentSelectedData": {}, "customizedInputs": { "type": "object", "additionalProperties": {} }, "lastTestDate": { "type": "string" } } } }, "required": [ "pieceName", "pieceVersion", "pieceType", "packageType", "triggerName", "input", "inputUiInfo" ] } }, "required": [ "name", "valid", "displayName", "type", "settings" ] }, { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "EMPTY" ] }, "settings": {} }, "required": [ "name", "valid", "displayName", "type", "settings" ] } ] }, "updatedBy": { "type": "string" }, "valid": { "type": "boolean" }, "state": { "anyOf": [ { "type": "string", "enum": [ "LOCKED" ] }, { "type": "string", "enum": [ "DRAFT" ] } ] } }, "required": [ "id", "created", "updated", "flowId", "displayName", "trigger", "updatedBy", "valid", "state" ] }, "status": { "anyOf": [ { "type": "string", "enum": [ "ENABLED" ] }, { "type": "string", "enum": [ "DISABLED" ] }, { "type": "string", "enum": [ "UNPUBLISHED" ] } ] }, "schedule": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "CRON_EXPRESSION" ] }, "cronExpression": { "type": "string" }, "timezone": { "type": "string" } }, "required": [ "type", "cronExpression", "timezone" ] } }, "required": [ "id", "created", "updated", "projectId", "version", "status" ] } }, "next": { "description": "Cursor to the next page", "type": "string" }, "previous": { "description": "Cursor to the previous page", "type": "string" } }, "required": [ "data" ] } } } } } } }, "/v1/flows/{flowId}": { "get": { "tags": [ "flows" ], "description": "Get a flow by id", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "versionId", "required": false }, { "schema": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "in": "path", "name": "flowId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "projectId": { "type": "string" }, "folderId": { "type": "string" }, "version": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "flowId": { "type": "string" }, "displayName": { "type": "string" }, "trigger": { "anyOf": [ { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "WEBHOOK" ] }, "settings": { "type": "object", "properties": { "inputUiInfo": { "additionalProperties": true, "type": "object", "properties": { "currentSelectedData": {}, "customizedInputs": { "type": "object", "additionalProperties": {} }, "lastTestDate": { "type": "string" } } } }, "required": [ "inputUiInfo" ] } }, "required": [ "name", "valid", "displayName", "type", "settings" ] }, { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "PIECE_TRIGGER" ] }, "settings": { "type": "object", "properties": { "pieceName": { "type": "string" }, "pieceVersion": { "type": "string", "pattern": "^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$" }, "pieceType": { "anyOf": [ { "type": "string", "enum": [ "CUSTOM" ] }, { "type": "string", "enum": [ "OFFICIAL" ] } ] }, "packageType": { "anyOf": [ { "type": "string", "enum": [ "ARCHIVE" ] }, { "type": "string", "enum": [ "REGISTRY" ] } ] }, "triggerName": { "type": "string" }, "input": { "type": "object", "additionalProperties": {} }, "inputUiInfo": { "additionalProperties": true, "type": "object", "properties": { "currentSelectedData": {}, "customizedInputs": { "type": "object", "additionalProperties": {} }, "lastTestDate": { "type": "string" } } } }, "required": [ "pieceName", "pieceVersion", "pieceType", "packageType", "triggerName", "input", "inputUiInfo" ] } }, "required": [ "name", "valid", "displayName", "type", "settings" ] }, { "type": "object", "properties": { "name": { "type": "string" }, "valid": { "type": "boolean" }, "displayName": { "type": "string" }, "nextAction": {}, "type": { "type": "string", "enum": [ "EMPTY" ] }, "settings": {} }, "required": [ "name", "valid", "displayName", "type", "settings" ] } ] }, "updatedBy": { "type": "string" }, "valid": { "type": "boolean" }, "state": { "anyOf": [ { "type": "string", "enum": [ "LOCKED" ] }, { "type": "string", "enum": [ "DRAFT" ] } ] } }, "required": [ "id", "created", "updated", "flowId", "displayName", "trigger", "updatedBy", "valid", "state" ] }, "status": { "anyOf": [ { "type": "string", "enum": [ "ENABLED" ] }, { "type": "string", "enum": [ "DISABLED" ] }, { "type": "string", "enum": [ "UNPUBLISHED" ] } ] }, "schedule": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "CRON_EXPRESSION" ] }, "cronExpression": { "type": "string" }, "timezone": { "type": "string" } }, "required": [ "type", "cronExpression", "timezone" ] } }, "required": [ "id", "created", "updated", "projectId", "version", "status" ] } } } } } }, "delete": { "tags": [ "flows" ], "description": "Delete a flow", "parameters": [ { "schema": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "in": "path", "name": "flowId", "required": true } ], "responses": { "204": { "description": "Default Response" } } } }, "/v1/app-connections/": { "post": { "tags": [ "connection" ], "description": "Upsert an app connection based on the app name", "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "title": "Secret Text", "description": "Secret Text", "type": "object", "properties": { "name": { "type": "string" }, "appName": { "type": "string" }, "type": { "type": "string", "enum": [ "SECRET_TEXT" ] }, "value": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "SECRET_TEXT" ] }, "secret_text": { "type": "string" } }, "required": [ "type", "secret_text" ] } }, "required": [ "name", "appName", "type", "value" ] }, { "title": "OAuth2", "description": "OAuth2", "type": "object", "properties": { "name": { "type": "string" }, "appName": { "type": "string" }, "type": { "type": "string", "enum": [ "OAUTH2" ] }, "value": { "type": "object", "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "token_url": { "type": "string" }, "props": { "type": "object", "additionalProperties": {} }, "scope": { "type": "string" }, "code": { "type": "string" }, "authorization_method": { "anyOf": [ { "type": "string", "enum": [ "HEADER" ] }, { "type": "string", "enum": [ "BODY" ] } ] }, "code_challenge": { "type": "string" }, "redirect_url": { "type": "string" }, "type": { "type": "string", "enum": [ "OAUTH2" ] } }, "required": [ "client_id", "client_secret", "token_url", "scope", "code", "redirect_url", "type" ] } }, "required": [ "name", "appName", "type", "value" ] }, { "title": "Cloud OAuth2", "description": "Cloud OAuth2", "type": "object", "properties": { "name": { "type": "string" }, "appName": { "type": "string" }, "type": { "type": "string", "enum": [ "CLOUD_OAUTH2" ] }, "value": { "type": "object", "properties": { "client_id": { "type": "string" }, "authorization_method": { "anyOf": [ { "type": "string", "enum": [ "HEADER" ] }, { "type": "string", "enum": [ "BODY" ] } ] }, "code": { "type": "string" }, "code_challenge": { "type": "string" }, "props": { "type": "object", "additionalProperties": { "type": "string" } }, "scope": { "type": "string" }, "type": { "type": "string", "enum": [ "CLOUD_OAUTH2" ] }, "token_url": { "type": "string" } }, "required": [ "client_id", "code", "scope", "type" ] } }, "required": [ "name", "appName", "type", "value" ] }, { "title": "Platform OAuth2", "description": "Platform OAuth2", "type": "object", "properties": { "name": { "type": "string" }, "appName": { "type": "string" }, "type": { "type": "string", "enum": [ "PLATFORM_OAUTH2" ] }, "value": { "type": "object", "properties": { "client_id": { "type": "string" }, "authorization_method": { "anyOf": [ { "type": "string", "enum": [ "HEADER" ] }, { "type": "string", "enum": [ "BODY" ] } ] }, "code": { "type": "string" }, "code_challenge": { "type": "string" }, "props": { "type": "object", "additionalProperties": { "type": "string" } }, "scope": { "type": "string" }, "type": { "type": "string", "enum": [ "PLATFORM_OAUTH2" ] }, "token_url": { "type": "string" }, "redirect_url": { "type": "string" } }, "required": [ "client_id", "code", "scope", "type", "redirect_url" ] } }, "required": [ "name", "appName", "type", "value" ] }, { "title": "Basic Auth", "description": "Basic Auth", "type": "object", "properties": { "name": { "type": "string" }, "appName": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_AUTH" ] }, "value": { "type": "object", "properties": { "username": { "type": "string" }, "password": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_AUTH" ] } }, "required": [ "username", "password", "type" ] } }, "required": [ "name", "appName", "type", "value" ] }, { "title": "Custom Auth", "description": "Custom Auth", "type": "object", "properties": { "name": { "type": "string" }, "appName": { "type": "string" }, "type": { "type": "string", "enum": [ "CUSTOM_AUTH" ] }, "value": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "CUSTOM_AUTH" ] }, "props": { "type": "object", "additionalProperties": {} } }, "required": [ "type", "props" ] } }, "required": [ "name", "appName", "type", "value" ] } ] } } } }, "responses": { "200": { "description": "Default Response" } } }, "get": { "tags": [ "connection" ], "description": "List app connections", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "cursor", "required": false }, { "schema": { "type": "string" }, "in": "query", "name": "appName", "required": false }, { "schema": { "type": "number" }, "in": "query", "name": "limit", "required": false } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "name": { "type": "string" }, "type": { "anyOf": [ { "type": "string", "enum": [ "OAUTH2" ] }, { "type": "string", "enum": [ "PLATFORM_OAUTH2" ] }, { "type": "string", "enum": [ "CLOUD_OAUTH2" ] }, { "type": "string", "enum": [ "SECRET_TEXT" ] }, { "type": "string", "enum": [ "BASIC_AUTH" ] }, { "type": "string", "enum": [ "CUSTOM_AUTH" ] } ] }, "appName": { "type": "string" }, "projectId": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "status": { "anyOf": [ { "type": "string", "enum": [ "ACTIVE" ] }, { "type": "string", "enum": [ "ERROR" ] } ] } }, "required": [ "id", "created", "updated", "name", "type", "appName", "projectId", "status" ] } }, "next": { "description": "Cursor to the next page", "type": "string" }, "previous": { "description": "Cursor to the previous page", "type": "string" } }, "required": [ "data" ] } } } } } } }, "/v1/app-connections/{connectionId}": { "delete": { "tags": [ "connection" ], "description": "Delete an app connection", "parameters": [ { "schema": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "in": "path", "name": "connectionId", "required": true } ], "responses": { "204": { "description": "Default Response" } } } }, "/v1/projects/": { "post": { "tags": [ "projects" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "displayName": { "type": "string" } }, "required": [ "displayName" ] } } }, "required": true }, "responses": { "200": { "description": "Default Response" } } }, "get": { "tags": [ "projects" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "platformId", "required": false } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "type": "string" }, "updated": { "type": "string" }, "ownerId": { "type": "string" }, "displayName": { "type": "string" }, "notifyStatus": { "anyOf": [ { "type": "string", "enum": [ "NEVER" ] }, { "type": "string", "enum": [ "ALWAYS" ] } ] }, "type": { "anyOf": [ { "type": "string", "enum": [ "PLATFORM_MANAGED" ] }, { "type": "string", "enum": [ "STANDALONE" ] } ] }, "platformId": { "pattern": "^[0-9a-zA-Z]{21}$", "type": "string" }, "externalId": { "type": "string" } }, "required": [ "id", "created", "updated", "ownerId", "displayName", "notifyStatus", "type" ] } }, "next": { "description": "Cursor to the next page", "type": "string" }, "previous": { "description": "Cursor to the previous page", "type": "string" } }, "required": [ "data" ] } } } } } } }, "/v1/projects/{projectId}": { "post": { "tags": [ "projects" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "notifyStatus": { "anyOf": [ { "type": "string", "enum": [ "NEVER" ] }, { "type": "string", "enum": [ "ALWAYS" ] } ] }, "displayName": { "type": "string" }, "plan": { "type": "object", "properties": { "teamMembers": { "type": "number" }, "tasks": { "type": "number" } }, "required": [ "teamMembers", "tasks" ] } }, "required": [ "notifyStatus", "displayName" ] } } }, "required": true }, "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "projectId", "required": true } ], "responses": { "200": { "description": "Default Response" } } } } }, "servers": [ { "url": "https://cloud.activepieces.com/api", "description": "Production Server" } ], "externalDocs": { "url": "https://www.activepieces.com/docs", "description": "Find more info here" } }