cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This documentation is for the new preview UI. It’s still being refined and is subject to change. For documentation for the old UI, see Knowledge Base.

Article link copied to clipboard
Updated
Published
8 min read
Note on third‑party tools

We aim to provide accurate and helpful details about third‑party tools, but we can’t guarantee that this information is always complete or up to date. If you notice any discrepancies, feel free to share them in the feedback section below. For the most reliable information, please always refer to the third‑party tool’s official documentation.

Expensify provides an industry leading expense management system. Use the Expensify component to programmatically download expense report data for analysis or insertion into your accounting package, provision accounts for new hires, and much more.

Connections

Basic Connection

Basic connection for Expensify

Create a new authentication connection. Refer to the following guide for more information.

  1. Navigate to https://www.expensify.com/tools/integrations/ and select the option that creates a new set of credentials
  2. A pair of credentials: partnerUserID and partnerUserSecret will be generated and shown on the page.
    1. Make sure to store the partnerUserID and partnerUserSecret pair you're given in a secure location, as you won't be shown them again.
  3. Enter the partnerUserID and partnerUserSecret into your connection's configuration
Input Comments Default
Partner User ID Provide a string value for the partnerUserID of your Expensify account.
Partner User Secret Provide a string value for the partnerUserSecret of your Expensify account.

Actions

Create Expense

Allows you to create expenses in a user’s account.

Input Comments Default
Connection
Type Specifies to the job that it has to create expenses. expenses
Employee Email The report will be created in that account.
Transaction List The transactions to add to the report. [
{
"created": "2016-01-01",
"currency": "USD",
"merchant": "Name of merchant 1",
"amount": 1234
},
{
"created": "2016-01-21",
"currency": "EUR",
"merchant": "Name of merchant 2",
"amount": 2211,
"policyID": "E40D9B8DF456E233",
"tax": {
"rateID": "id_TAX_OPTION_16"
}
},
{
"created": "2016-01-31",
"currency": "CAD",
"merchant": "Name of merchant 3",
"amount": 2211,
"reportID": "R006AseGxMka",
"tax": {
"rateID": "id_TAX_OPTION_16",
"amount": 600
}
}
]

Create Expense Rule

Create expense rules for a given employee on a given policy.

Input Comments Default
Connection
Type Specifies to the job that it has to create an expense rule. expenseRules
Employee Email The report will be created in that account.
Policy ID The report will be created in that policy.
Actions The actions to perform on the expense rule. {
"tag": "Tag Name",
"defaultBillable": true
}

Create Policy

Creates a policy.

Input Comments Default
Connection
Type Specifies to the job that it has to create a policy. policy
Policy Name The name of the policy to create.
Plan Specifies the plan of the policy. If not specified, the new policy will be created under the team plan.

Create Report

Creates a report, with transactions, in a user’s account.

Input Comments Default
Connection
Type Specifies to the job that it has to create a report. report
Employee Email The report will be created in that account.
Report The report to create. {
"title": "Name of the report",
"fields": {
"reason_of_trip": "Business trip",
"employees": "3"
}
}
Expenses The expenses to add to the report. [
{
"date": "yyyy-mm-dd",
"currency": "USD",
"merchant": "Name of merchant",
"amount": 1234
},
{
"date": "yyyy-mm-dd",
"currency": "CAD",
"merchant": "Name of merchant",
"amount": 2211
}
]
Policy ID The report will be created in that policy.

Download Report

This job lets you download reports that were generated with the Report Exporter job.

Input Comments Default
Connection
File Name The name of a file generated from the exporter job.
File System The name of a file generated from the exporter job. integrationServer

Export Report

Export expense or report data in a configurable format for analysis or insertion into your accounting package.

Input Comments Default
Connection
Start Date Filters out all reports submitted or created before the given date, whichever occurred last (inclusive). yyyy-mm-dd formatted date. 2016-01-01
End Date Filters out all reports submitted or created before the given date, whichever occurred last (inclusive). yyyy-mm-dd formatted date. 2016-01-01
Approved After
Mark as Exported Label Filter
Policy ID List The IDs of the policies to get information for.
Report ID List The IDs of the reports to get information for.
File Extension Specifies the format of the generated report. Note: if the 'pdf' option is chosen, one PDF file will be generated for each report exported. json
File Basename The name of the generated file(s) will start with this value, and a random part will be added to make each filename globally unique. If not specified, the default value export is use.
Include Full Page Receipts PDF Specifies whether generated PDFs should include full page receipts. This parameter is used only if fileExtension contains pdf false
Report State The status to change the reports to. At the moment, only Reimbursed is supported. Only reports in the Approved status can be updated to Reimbursed. All other reports will be ignored. REIMBURSED
Limit Maximum number of reports to export.
Employee Email The report will be created in that account.
On Finish You can configure the recipients list of email addresses that should receive a summary email of the changes made by the API. [
{
"actionName": "markAsExported",
"label": "Expensify Export"
},
{
"actionName": "email",
"recipients": "manager@domain.com,finances@domain.com",
"message": "Report is ready."
}
]
Test If set to true, actions defined in onFinish will not be executed. false
Template The template parameter is used to format the Expensify data as you wish. It is based on the Freemarker language's syntax.
<#if addHeader == true>
Merchant,Original Amount,Category,Report number,Expense number<#lt>
</#if>
<#assign reportNumber = 1>
<#assign expenseNumber = 1>
<#list reports as report>
<#list report.transactionList as expense>
${expense.merchant},<#t>
<#-- note: expense.amount prints the original amount only -->
${expense.amount},<#t>
${expense.category},<#t>
${reportNumber},<#t>
${expenseNumber}<#lt>
<#assign expenseNumber = expenseNumber + 1>
</#list>
<#assign reportNumber = reportNumber + 1>
</#list>

Get Policy

Gets specific information about listed policies.

Input Comments Default
Connection
Type Specifies to the job that it has to get information specific to policies. policy
Policy ID List The IDs of the policies to get information for.
Fields Specifies the fields of the policy to gather information for.
User Email Specifies the user to gather the policy list for. You must have been granted third-party access by that user/company domain beforehand.

List Cards

Gets the list of credit cards that are assigned at the domain level.

Input Comments Default
Connection
Type Specifies to the job that it has to list the cards of a domain. domainCardList
Domain The name of the domain to get the cards for.

List Policies

Gets a list of policies with some relevant information about them.

Input Comments Default
Connection
Type Specifies to the job that it has to get a policy summary list. policyList
Admin Only Whether or not to only get policies for which the user is an admin for. false
User Email Specifies the user to gather the policy list for. You must have been granted third-party access by that user/company domain beforehand.

Raw Request

Send a raw HTTP request to the Expensify API

Input Comments Default
Connection
URL This input is not required as the Expensify API is a single endpoint.
Method The HTTP method to use.
Data The HTTP body payload to send to the URL.
Form Data The Form Data to be sent as a multipart form upload.
File Data File Data to be sent as a multipart form upload.
File Data File Names File names to apply to the file data inputs. Keys must match the file data keys above.
Query Parameter A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
Header A list of headers to send with the request.
Response Type The type of data you expect in the response. You can request json, text, or binary data. json
Timeout The maximum time that a client will await a response to its request
Debug Request Enabling this flag will log out the current request. false
Retry Delay (ms) The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. 0
Retry On All Errors If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. false
Max Retry Count The maximum number of retries to attempt. Specify 0 for no retries. 0
Use Exponential Backoff Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. false

Update Employee

Add, update or remove policy members

Input Comments Default
Connection
Type Specifies to the job that it has to update an employee employees
Employees Replace or update the existing employees of the policy with the ones provided. If the employee does not exist, it will be created. [
{
"employeeEmail": "employee@domain.com",
"managerEmail": "manager@domain.com",
"policyID": "0123456789ABCDEF",
"employeeID": "12345",
"firstName": "John",
"lastName": "Doe",
"customField2": "ABC123",
"approvalLimit": 12300,
"overLimitApprover": "audit@domain.com",
"isTerminated": false,
"additionalPolicyIDs": [
"ABCDEF0123456789",
"456789ABCDEF0123"
]
},
{
"employeeEmail": "manager@domain.com",
"managerEmail": "ceo@domain.com",
"policyID": "0123456789ABCDEF",
"employeeID": "34567",
"firstName": "Michael",
"lastName": "Scott",
"customField1": "ZZZ333",
"customField2": "BCD345",
"isTerminated": false
}
]
Dry Run If set to true, employees will not actually be provisioned or updated. Use this for development. false
On Finish You can configure the recipients list of email addresses that should receive a summary email of the changes made by the API. [
{
"actionName": "email",
"recipients": "admin1@domain.com,admin2@domain.com"
}
]
Set Employee Primary Policy Specifies the policy to set as the primary policy for the employee. If not specified, the employee will not have a primary policy. none
Admin Only Dictates whether Expensify will automatically invite managers (submitsTo), managers’ managers, and so on to policies where they approve reports, if it is not their primary policy. true

Update Expense Rules

Update a preexisting expense rule for a given employee on a given policy.

Input Comments Default
Connection
Type Specifies to the job that it has to create an expense rule. expenseRules
Employee Email The report will be created in that account.
Policy ID The report will be created in that policy.
Rule ID The rule to update.
Actions The actions to perform on the expense rule. {
"tag": "Tag Name",
"defaultBillable": true
}

Update Policy

manage categories, tags and report fields on a policy.

Input Comments Default
Connection
Type Specifies to the job that it has to update a policy. policy
Policy ID The report will be created in that policy.
Policy ID List The IDs of the policies to get information for.
Categories Replace or update the existing categories of the policy with the ones provided. {
"action": "merge",
"data": [
{
"name": "Category 1",
"enabled": true,
"payrollCode": "Payroll Code 1",
"glCode": "GL Code 1",
"commentHint": "Comment hint 1",
"areCommentsRequired": true,
"maxExpenseAmount": 2500
},
{
"name": "Category 2",
"enabled": false
}
]
}
Tags Replace the existing tags of the policy with the ones provided. {
"data": [
{
"name": "Tag",
"tags": [
{
"name": "Tag 1",
"glCode": "Tag 1 GL Code"
},
{
"name": "Tag 2",
"enabled": false
}
]
}
]
}
Report Fields Replace or update the existing report fields of the policy with the ones provided. {
"action": "merge",
"data": [
{
"name": "Report field 1",
"type": "dropdown",
"values": [
"value 1",
"value 2",
"value 3"
]
}
]
}

Update Report Status

Update the status of a report.

Input Comments Default
Connection
Type Specifies to the job that it has to update the status of a list of reports. reportStatus
Status The status to change the reports to. At the moment, only Reimbursed is supported. Only reports in the Approved status can be updated to Reimbursed. All other reports will be ignored. REIMBURSED
Filters The filters to apply to the report list. {
"type": "reportStatus",
"status": "REIMBURSED",
"filters": {
"reportIDList": "R006AseGxMka,R00bCluvcO4T"
}
}