Connections
Microsoft 365 accounts connected through Nango (connected in the app; browsed and imported from here).
curl -X GET "https://docuflow.pendral.io/api/v2/connections" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"connections": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","provider": "provider","providerLabel": "providerLabel","displayName": "displayName","accountEmail": "accountEmail","status": "status","createdAt": "2026-10-01T12:00:00.000Z"}],"configured": false}
Finalize a connection#
Called by the app after the Nango connect UI completes.
/api/v2/connectionsRequires connections:manage.
Body
application/jsonproviderstringrequirednangoConnectionIdstringrequired
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/connections" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"provider": "provider","nangoConnectionId": "clx9k2m4p0001qh8z3v7d5f2a"}'
{"connection": {"id": "clx9k2m4p0001qh8z3v7d5f2a","provider": "provider","providerLabel": "providerLabel","displayName": "displayName","accountEmail": "accountEmail","status": "status","createdAt": "2026-10-01T12:00:00.000Z"}}
Get a connection#
Get a connection
/api/v2/connections/{id}Requires connections:read.
Path parameters
idstringrequired- Connection id.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"connection": {"id": "clx9k2m4p0001qh8z3v7d5f2a","provider": "provider","providerLabel": "providerLabel","displayName": "displayName","accountEmail": "accountEmail","status": "status","createdAt": "2026-10-01T12:00:00.000Z"}}
Disconnect#
Refuses while sources or destinations use it unless force=1.
/api/v2/connections/{id}Requires connections:manage.
Path parameters
idstringrequired- Connection id.
Query parameters
force"1"
Responses
OK
curl -X DELETE "https://docuflow.pendral.io/api/v2/connections/{id}" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"ok": true}
List drives#
List drives
/api/v2/connections/{id}/drivesRequires connections:read.
Path parameters
idstringrequired- Connection id.
Query parameters
qstring- Search sites/drives by name.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/drives" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"drives": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices"}]}
Browse a drive folder#
Folders first. itemId or path picks the folder (root otherwise).
/api/v2/connections/{id}/itemsRequires connections:read.cursor-paginated
Path parameters
idstringrequired- Connection id.
Query parameters
driveIdstringrequireditemIdstringpathstringcursorstring
Responses
OK. Cursor-paginated: pass nextCursor back as cursor; null means the last page.
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/items?driveId=driveId" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"items": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","isFolder": false,"supported": false,"driveId": "clx9k2m4p0001qh8z3v7d5f2a"}],"nextCursor": "clx9k2m4p0001qh8z3v7d5f2a","folderId": "clx9k2m4p0001qh8z3v7d5f2a"}
List mail folders#
List mail folders
/api/v2/connections/{id}/mail-foldersRequires connections:read.
Path parameters
idstringrequired- Connection id.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/mail-folders" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"folders": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","displayName": "displayName"}]}
List messages or attachments#
Messages in a folder; with messageId, that message's attachments instead.
/api/v2/connections/{id}/messagesRequires connections:read.cursor-paginated
Path parameters
idstringrequired- Connection id.
Query parameters
folderIdstringsearchstringcursorstringmessageIdstring
Responses
OK. Cursor-paginated: pass nextCursor back as cursor; null means the last page.
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/messages" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"messages": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","subject": "subject","hasAttachments": false}],"nextCursor": "clx9k2m4p0001qh8z3v7d5f2a"}
Teams, channels, or a channel's files folder#
No params: teams. teamId: its channels. teamId + channelId: the channel's files folder.
/api/v2/connections/{id}/teamsRequires connections:read.
Path parameters
idstringrequired- Connection id.
Query parameters
teamIdstringchannelIdstring
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/teams" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"teams": [null]}
List Salesforce objects#
Searched and ranked on the server: an org describes thousands of objects, most of them plumbing, so the everyday ones come first and a search term wins over the ranking.
/api/v2/connections/{id}/salesforce/objectsRequires connections:read.
Path parameters
idstringrequired- Connection id.
Query parameters
qstring- Search API names and labels.
writableboolean- Only objects records can be written to.
customboolean- Only the org's own objects.
limitnumber- Default
50
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/salesforce/objects" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"objects": [{"name": "Invoices","label": "Invoice number","labelPlural": "labelPlural","custom": false,"queryable": false,"createable": false,"updateable": false}],"total": 1}
Describe a Salesforce object#
One object's fields, with type, whether it can be written, whether it is required, its picklist values and what a relationship field points at.
/api/v2/connections/{id}/salesforce/objects/{object}Requires connections:read.
Path parameters
idstringrequired- Connection id.
objectstringrequired- Object API name, e.g. Case or Claim__c.
Query parameters
qstringwritablebooleanrequiredbooleancustomboolean
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/connections/{id}/salesforce/objects/{object}" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"name": "Invoices","label": "Invoice number","createable": false,"updateable": false,"fields": [{"name": "Invoices","label": "Invoice number","type": "type","createable": false,"updateable": false,"required": false,"custom": false,"externalId": false,"calculated": false,"length": 1,"help": "help","referenceTo": ["referenceTo"],"picklist": ["picklist"],"restrictedPicklist": false}],"fieldCount": 1,"externalIdFields": ["externalIdField"],"children": [{"object": "object","field": "field","relationshipName": "relationshipName"}]}
Sample Salesforce records#
How many records a filter matches, and a few of them. Reads only.
/api/v2/connections/{id}/salesforce/sampleRequires connections:read.
Path parameters
idstringrequired- Connection id.
Body
application/jsonobjectstringrequiredfiltersobjectfieldsstring[]limitnumber- Default
10
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/connections/{id}/salesforce/sample" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"object": "object"}'
{"fields": ["field"],"where": "where","count": 1,"records": [{}]}
Test a connection#
Test a connection
/api/v2/connections/{id}/testRequires connections:read.
Path parameters
idstringrequired- Connection id.
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/connections/{id}/test" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"ok": true,"displayName": "displayName","accountEmail": "accountEmail"}
Import files now#
Pull drive items and/or mail attachments into a queue. Duplicates are detected by content.
/api/v2/connections/{id}/importRequires documents:create on the queue it touches.queue-scoped
Path parameters
idstringrequired- Connection id.
Body
application/jsonqueueIdstringrequireditemsobject[]messagesobject[]priorityintegertagsstring[]
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/connections/{id}/import" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"queueId": "clx9k2m4p0001qh8z3v7d5f2a","priority": 0,"tags": ["urgent"]}'
{"documents": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "invoice-1042.pdf","duplicate": false}],"failed": [{"name": "Invoices","error": "error"}]}
Connector availability#
Connector availability
/api/v2/nango/sessionRequires connections:read.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/nango/session" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"configured": false,"providers": ["provider"]}
Start a connect session#
A short-lived Nango token for the connect UI.
/api/v2/nango/sessionRequires connections:manage.
Body
application/jsonprovider"sharepoint-online" | "one-drive" | "outlook" | "microsoft-teams" | "salesforce" | "salesforce-sandbox"required
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/nango/session" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"provider": "sharepoint-online"}'
{"token": "dfk_live_7Hq2xV9mLr4tW8bN3cKp","expiresAt": "2026-10-01T12:00:00.000Z","provider": "provider"}