Skip to main content
Question

PLEO API Connection

  • Nov 19, 2026 10:45 AM UTC
  • 1 reply
  • 9 views

I would like to use the Pleo app via Zapier to send receipts to Moco. Unfortunately, the current web integration for logging into Pleo requires a JWT token, but Pleo no longer supports these. Will there be an update to the Pleo app so that it can be used again? Or is there another way to connect Pleo?

1 reply

  • New
  • Nov 20, 2026 9:19 AM UTC

Hi Manuel,

It looks like the Pleo app on Zapier still uses Pleo's old Open API tokens. That API is deprecated, and the new Pleo API keys don't work on it, so it's worth reporting to both Pleo and Zapier support.

Until then, you can work around it with a paid Zapier plan (API by Zapier is a premium beta app) and one short Code step.

First, ask Pleo support to turn on API keys for your company. Then an admin or bookkeeper can create a key under Settings > API Keys with the accounting-entries:read scope. How to find your company_id: https://developers.pleo.io/docs/current/how-tos/api-keys/how-to-make-an-api-call-using-standalone-api-keys

Step 1, trigger: API by Zapier, New Item from API

  • Method POST, URL https://external.pleo.io/v1/accounting-entries/receipts:search?company_id=YOUR_ID&limit=100&sorting_keys=createdAt&sorting_order=DESC
  • Body {"includeDeleted": false, "fileType": "ORIGINAL"}
  • Response filter .data, Dedupe Key .id
  • Connection: Static Headers, domain filter external.pleo.io, header Authorization with the value Basic KEY_IN_BASE64. KEY_IN_BASE64 is your key plus a colon at the end, base64 encoded. On a Mac or Linux terminal: printf '%s' 'YOUR_KEY:' | base64. Don't paste the key into a website to encode it.

Step 2: Code by Zapier (JavaScript). Add three input fields from step 1: url, id and mimeType. The url works for 24 hours.

const res = await fetch(inputData.url);
if (!res.ok) throw new Error('Download failed: ' + res.status);
const base64 = Buffer.from(await res.arrayBuffer()).toString('base64');
const ext = (inputData.mimeType || '').split('/')[1] || 'pdf';
return { filename: inputData.id + '.' + ext, base64 };

Very large files can hit Zapier's 6 MB limit for Code steps.

Step 3: API by Zapier, API Request

  • Method POST, URL https://YOURCOMPANY.mocoapp.com/api/v1/purchases/drafts
  • Body {"title": "Pleo receipt", "file": {"filename": "...", "base64": "..."}}, with filename and base64 from step 2
  • A second connection: Static Headers, domain filter YOURCOMPANY.mocoapp.com, header Authorization with the value Token token=YOUR_MOCO_KEY

I haven't tested this end to end, and I tested the code in Node.js, not in Zapier. Should the receipts go to Ausgaben in MOCO, or onto projects as expenses?