MESA Docs
MESA Homepage
  • Welcome to MESA
    • Installing MESA
    • Dashboard
    • Core Concepts
    • Getting Help
  • Templates
    • Template Library
    • Installing & Editing
  • Workflow Builder
    • Triggers
    • Actions
    • Fields
      • Variables
      • Formatting Variables
      • Liquid Templating
    • Testing
  • Workflow Activity
    • Tasks
      • Troubleshooting
      • Replay
    • Logs
    • Time Travel
  • Best Practices
    • Set Titles & Descriptions
    • Track Time Saved
    • Enable Failure Notifications
    • Avoid Infinite Loops
  • Going Further
    • Plans & Billing
    • Notifications
    • Credentials
    • Understanding the Queue
    • Export & Import Workflows
    • Platform Thresholds & Limits
  • Built-in Tools
    • Activity Log
    • AI
    • API
    • Approval
    • MCP
    • Custom Code
      • Libraries
        • MESA SDK
        • Filter
        • Loop
        • Transform
        • oAuth
        • Shopify
        • ShopifyGraphql
      • FAQ
    • Data
    • Delay
    • Email
    • Filter
    • Form
      • Configure
      • Going Further
      • Technical Notes
    • FTP
    • Image
    • Loop
    • Package Tracking
    • Paths
    • Schedule
    • Scraper
    • SMS
    • Transform
    • Virtual Output
    • Weather
    • Web Request
    • Webhook
  • Apps
    • Airtable
    • Amazon S3
    • Asana
    • Blog Studio
    • ChannelApe
    • Claude
    • ChatGPT
    • Dall-E 2
    • Delighted
    • Digital Humani
    • Discord
    • DocuSign
    • Dropbox
    • Etsy
    • Facebook
    • Fera.ai
    • Gatsby
    • Gmail
      • Send Email
    • Google Analytics 4
    • Google Analytics UA
    • Google Calendar
    • Google Drive
    • Google Forms
    • Google Sheets
      • Add Row
      • Query Rows
      • Update Row
      • Row Created
      • Row Updated (Advanced)
      • Creating New Spreadsheets
      • Technical Notes
    • Gorgias
    • Govalo
    • Help Scout
    • Hubspot
    • Infinite Options
    • Intercom
    • IPDetective
    • Judge.me
    • Katana
    • Klaviyo
      • API Deprecation
    • Loop Returns
    • Loyalty Lion
    • Mailchimp
    • Mailgun
    • Mandrill
    • Mantle
    • Notion
    • Odoo
    • Omnisend
    • Page Studio
    • Pinterest
    • Printful
    • PrintNode
    • QuickBooks
    • Rebuy
    • Recharge
    • Remove.bg
    • Returnly
    • Rivo
    • Salesforce
    • Segment
    • Sendlane
    • Shippo
    • ShipStation
    • Shopify
      • Technical Notes
        • Configuring Your Payload
        • Modifying and Filtering Get Lists
        • Parameters
        • Error Codes
        • Accuracy of orders_count Variable
        • Accuracy of Count Products Action
        • Using the Gift Cards API
        • How to Find a Specific Record in the Testing Interface
        • Order, Customer, and Product Updated Trigger Frequency
    • Shopify Flow
    • Shopify Plus
    • Shopify Retail POS
    • Skio Subscriptions
    • Slack
    • Smartrr
    • Smile.io
    • Square
      • Updating Inventory
      • Frequently Asked Questions
    • Stamped.io
    • Stripe
    • Thanks.io
    • TikTok
    • Tracktor
    • Twilio
    • Uploadery
    • Wonderment
    • Xero
    • Yotpo
    • Yotpo Loyalty
  • For developers
    • Admin API
    • Command Line Interface
    • Embedding templates
  • Frequently asked questions
    • Why isn't the log search returning logs with the search I entered?
    • Is it possible to handle errors or retry steps?
    • How do I handle a failed task?
    • Does MESA auto-save workflows?
    • Can I Use Apps That Don't Have a MESA Connector?
    • Why is my workflow action adding the same data each time it occurs?
    • How do I cancel automations that are already in progress?
    • How do I cancel my MESA subscription or 7-day trial?
    • Can you import code from npm in custom code?
    • Do you have a Slack Community?
Powered by GitBook
On this page

Was this helpful?

  1. For developers

Admin API

PreviousFor developersNextCommand Line Interface

Last updated 1 year ago

Was this helpful?

The MESA Admin API allows you to programmatically interact with MESA. All requests must include your API key which can be found in My Account > Credentials.

Key
Value

{url}

https://api.getmesa.com/v1

{uuid}

Your store’s unique identifier: {{uuid}}.myshopify.com

Workflows

Credentials

Storage

Scripts

Testing

Tasks

Templates

Logs

Get the mesa.json file for an automation

get
Path parameters
uuidstringRequired
automation_keystringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Content-TypestringOptionalExample: application/json
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/automations/{automation_key}.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Uninstall an Automation

delete
Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
delete
DELETE /admin/{uuid}/automations/{automation_key}.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Get a list of Credentials

get

Returns a list of all Credential names. Credential values are not available via the Admin API.

Path parameters
uuidstringRequired
automation_keystringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/{automation_key}/credentials.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Delete a Credential

delete
Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
secret_keystringRequiredExample: googlesheets_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
delete
DELETE /admin/{uuid}/{automation_key}/credentials/{credential_key}.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Get a list of all Storage items

get

Note: Storage has been deprecated in favor of Data by MESA. Returns a list of all Storage item names. To get a Storage value, call GET {{url}}/admin/{{uuid}}/storage/{{storage_name}}.json

Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/{automation_key}/storage.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Get the value of a Storage item

get

Note: Storage has been deprecated in favor of Data by MESA.

Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
storage_keystringRequiredExample: storage_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/{automation_key}/storage/{storage_key}.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Deletes a Storage item

delete

Note: Storage has been deprecated in favor of Data by MESA. Delete a Storage item.

Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
storage_keystringRequiredExample: storage_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
delete
DELETE /admin/{uuid}/{automation_key}/storage/{storage_key}.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Get a list of Scripts

get

Returns a list of all Scripts, including the Script code.

Path parameters
uuidstringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/{automation_key}/scripts.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Delete a Script

delete
Path parameters
uuidstringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
delete
DELETE /admin/{uuid}/{automation_key}/scripts.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Replay a task

post

Restart the execution of the workflow from a specific task. Data from all steps previous to this task in the original workflow run will be available.

Path parameters
uuidstringRequired
task_idstringRequired

To find the Task ID, click on a step in the Activity List > Request Details, and copy the last ID hash from the URL

Example: 65f3459357ca4e809608c8fb
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/tasks/{task_id}/replay.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

Get the 50 most recent log entries

get

Returns a list of the most recent 50 log entries.

Path parameters
uuidstringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/logs.json HTTP/1.1
Host: {{url}}
Accept: */*
200

Successful response

No content

  • Workflows
  • GETGet list of automations
  • GETGet the mesa.json file for an automation
  • POSTCreate or update an Automation configuration
  • DELETEUninstall an Automation
  • Credentials
  • GETGet a list of Credentials
  • POSTCreate a new Credential
  • PUTUpdate an existing Credential
  • DELETEDelete a Credential
  • Storage
  • GETGet a list of all Storage items
  • POSTCreate a new Storage item
  • GETGet the value of a Storage item
  • PUTUpdate an existing Storage item
  • DELETEDeletes a Storage item
  • Scripts
  • GETGet a list of Scripts
  • POSTCreate or update a Script
  • DELETEDelete a Script
  • Testing
  • POSTRun a test
  • Tasks
  • POSTReplay a task
  • Templates
  • POSTInstall a template from the Mesa Template library
  • Logs
  • GETGet the 50 most recent log entries

Get list of automations

get

Returns a list of automations for a store, sorted by most recently created first.

Path parameters
uuidstringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"automations":[{"uuid":"my-store","created_by":"","key":"etsy_order_send_to_google_sheets","name":"Send Etsy orders to Google Sheets","version":"1.0.0","template":"etsy/order/send_to_google_sheets","description":"Consolidate your Etsy orders in Google Sheets for real-time tracking and improved order management. This template will automatically send Etsy order details to a Google Sheets spreadsheet when a customer completes an order on Etsy.","video":"","is_premium":false,"tags":[],"source":"","destination":"","enabled":false,"did_complete":false,"logging":true,"debug":false,"setup":"incomplete","seconds":135,"notifications":{"enabled":false,"emails":["example@theshoppad.com"]},"_id":"65f1fdbbb54ac273e806026b","created_at":"Mar 13 2020","updated_at":"Mar 13 2024"}]}
Responses
200
Successful response
application/json
get
GET /admin/{uuid}/automations.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 776

{
  "automations": [
    {
      "uuid": "my-store",
      "created_by": "",
      "key": "etsy_order_send_to_google_sheets",
      "name": "Send Etsy orders to Google Sheets",
      "version": "1.0.0",
      "template": "etsy/order/send_to_google_sheets",
      "description": "Consolidate your Etsy orders in Google Sheets for real-time tracking and improved order management. This template will automatically send Etsy order details to a Google Sheets spreadsheet when a customer completes an order on Etsy.",
      "video": "",
      "is_premium": false,
      "tags": [],
      "source": "",
      "destination": "",
      "enabled": false,
      "did_complete": false,
      "logging": true,
      "debug": false,
      "setup": "incomplete",
      "seconds": 135,
      "notifications": {
        "enabled": false,
        "emails": [
          "example@theshoppad.com"
        ]
      },
      "_id": "65f1fdbbb54ac273e806026b",
      "created_at": "Mar 13 2020",
      "updated_at": "Mar 13 2024"
    }
  ]
}
200

Successful response

No content

Create or update an Automation configuration

post

Updates the Inputs, Outputs, Credentials and Storage for an automation. Updating scripts requires separate calls to the Script POST endpoing for each script.

Path parameters
uuidstringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"key":"","name":"","config":{"inputs":[],"outputs":[],"secrets":[],"storage":[],"files":[],"overwrite":false}}
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/automations.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "key": "",
  "name": "",
  "config": {
    "inputs": [],
    "outputs": [],
    "secrets": [],
    "storage": [],
    "files": [],
    "overwrite": false
  }
}
200

Successful response

No content

Create a new Credential

post
Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"secret":{"key":"mysecret","value":"myvalue"}}
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/{automation_key}/credentials.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "secret": {
    "key": "mysecret",
    "value": "myvalue"
  }
}
200

Successful response

No content

Update an existing Credential

put
Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
secret_keystringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"secret":{"value":"myvalue"}}
Responses
200
Successful response
application/json
put
PUT /admin/{uuid}/{automation_key}/credentials/{credential_key}.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "secret": {
    "value": "myvalue"
  }
}
200

Successful response

No content

Create a new Storage item

post

Note: Storage has been deprecated in favor of Data by MESA. Value parameter can be a string, an object, an array, or a boolean value.

Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"storage":{"key":"{{storage_key}}","value":{"mykey":"myvalue"}}}
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/{automation_key}/storage.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "storage": {
    "key": "{{storage_key}}",
    "value": {
      "mykey": "myvalue"
    }
  }
}
200

Successful response

No content

Update an existing Storage item

put

Note: Storage has been deprecated in favor of Data by MESA. Value parameter can be a string, an object, an array, or a boolean value.

Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
storage_keystringRequiredExample: storage_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"storage":{"value":"mynewstringvalue"}}
Responses
200
Successful response
application/json
put
PUT /admin/{uuid}/{automation_key}/storage/{storage_key}.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "storage": {
    "value": "mynewstringvalue"
  }
}
200

Successful response

No content

Create or update a Script

post
Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"script":{"filename":"myscript.js","code":"// Javascript goes here"}}
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/{automation_key}/scripts.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "script": {
    "filename": "myscript.js",
    "code": "// Javascript goes here"
  }
}
200

Successful response

No content

Run a test

post

Trigger a test with a specific that is passed as the payload body parameter. To test an actual payload, consider running a test in the UI and replaying the task with POST replay.json.

Path parameters
uuidstringRequired
automation_keystringRequiredExample: new_workflow_1
trigger_keystringRequiredExample: shopify_1
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"payload":{}}
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/{automation_key}/triggers/{trigger_key}/test.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "payload": {}
}
200

Successful response

No content

Install a template from the Mesa Template library

post
Path parameters
uuidstringRequired
Header parameters
x-api-keystringOptionalExample: {{api_key}}
Body
objectOptionalExample: {"template":"shoppad/mesa-templates/tests/kitchen-sink","force":true}
Responses
200
Successful response
application/json
post
POST /admin/{uuid}/templates/install.json HTTP/1.1
Host: {{url}}
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "template": "shoppad/mesa-templates/tests/kitchen-sink",
  "force": true
}
200

Successful response

No content