Back

Expensify API Essential Guide

Aug 7, 20246 minute read

What type of API does Expensify provide?

Based on the search results provided, Expensify appears to have a REST API. Here are the key points:

API Type

Expensify has a REST-style Web Services API. The API allows querying and manipulating Expensify data from external applications.

Key Characteristics

  • Uses standard HTTPS calls for API commands
  • Returns data in JSON format
  • Uses a common URL syntax for API endpoints
  • Requires authentication via an authToken for most API commands

API Usage

  • API requests are made via HTTP POST to the endpoint: https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations
  • Requests include a JSON payload called "requestJobDescription" that specifies the job to execute
  • The API has rate limiting of 50 jobs started per minute

Example Request

curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \
    -d 'requestJobDescription={...}'

API Documentation

Expensify provides detailed API documentation at https://integrations.expensify.com/

Does the Expensify API have webhooks?

Based on the search results provided, it appears that the official Expensify API does not have webhooks. The search results do not contain any information about Expensify webhooks or events that can be subscribed to through the Expensify API.

The API appears to be focused on programmatically downloading expense report data, provisioning accounts, and other integration tasks, but does not provide real-time event notifications through webhooks.

If you need to integrate with Expensify and receive updates about specific events, you may need to explore alternative methods such as periodic polling of the API or checking if there are any other integration options available that are not mentioned in the provided search results.

For the most up-to-date and accurate information, it would be best to consult the official Expensify API documentation or contact their support team directly.

Rate Limits and other limitations

Based on the search results provided, here are the key points regarding the API Rate Limits of the Expensify API:

General Rate Limit

There is a general rate limit of 50 jobs started per minute for the Expensify API [2]. Exceeding this limit will result in the following error message:

"You have been rate-limited. Please try again later or contact [email protected] for assistance." [2]

Key Points to Consider

  1. The rate limit applies to all API requests, regardless of the specific job type or endpoint being used [2].

  2. The limit is based on the number of jobs started per minute, not the total number of API calls [2].

  3. If you exceed the rate limit, you should wait before making additional requests or contact Expensify support for assistance [2].

Best Practices

  1. Implement proper error handling in your code to catch and handle rate limit errors gracefully.

  2. Consider implementing a backoff strategy if you need to make a large number of API requests in a short period.

  3. Monitor your API usage to ensure you stay within the rate limits.

  4. If you consistently need to make more than 50 requests per minute, you may want to contact Expensify to discuss your use case and potential solutions.

It's important to note that the search results do not provide information about any other specific rate limits for different API endpoints or operations. The general rate limit of 50 jobs per minute appears to be the primary restriction mentioned in the documentation.

Latest API Version

Based on the search results provided, I don't have specific information about the most recent version of the Expensify API. However, I can provide some key points about the Expensify API based on the available information:

  1. The Expensify API is accessed through the Integration Server at the endpoint: https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations.

  2. API requests are made using POST requests to this endpoint, with the request details passed in a JSON payload parameter called requestJobDescription.

  3. The API allows various operations such as updating policies, creating reports, and managing expenses.

  4. Authentication is done using partner credentials (partnerUserID and partnerUserSecret) which need to be included in the API requests.

  5. The API returns responses in JSON format.

  6. There is a general rate limit of 50 jobs started per minute for the API.

  7. The API documentation is available, but the search results don't mention a specific version number.

  8. Expensify also offers a Web Services API that allows querying and manipulating Expensify data from external applications.

While I couldn't find information about the most recent version, it's worth noting that APIs often evolve without necessarily changing version numbers. The best practice would be to refer to the official Expensify API documentation for the most up-to-date information on features and any version-specific details.

To get the most accurate and current information about the Expensify API version, I recommend:

  1. Checking the official Expensify API documentation.
  2. Contacting Expensify support directly for version-specific inquiries.
  3. Looking for any changelog or release notes that Expensify might provide for their API.

How to get a Expensify developer account and API Keys?

To get a developer account for Expensify and create an API integration, you'll need to follow these steps:

  1. Sign up for an Expensify account: If you don't already have an Expensify account, you'll need to create one at www.expensify.com.

  2. Contact Expensify: To enable API functionality for your domain, you need to reach out to [email protected]. You must be a domain and policy admin to request this.

  3. Obtain API credentials: Once your account is approved for API access, you'll receive the following credentials:

    • partnerName: Assigned by Expensify (e.g., "expensify.com" or "salesforce.com")
    • partnerUserID: Your user ID (often an email address)
    • partnerUserSecret: A unique identifier associated with your account
  4. Set up authentication: Expensify uses API keys for authentication. You'll need to use your partnerUserID and partnerUserSecret to authenticate API requests.

  5. Start making API requests: Once you have your credentials and have chosen the appropriate API for your needs, you can start making requests. All API commands are standard HTTPS calls.

What can you do with the Expensify API?

Based on the search results provided, here are the key data models you can interact with using the Expensify API, along with what is possible for each:

Policies

  • Retrieve a list of policies
  • Update policy settings
  • Modify report fields within policies
  • Update categories associated with policies
  • Manage tags and tag levels within policies

Expense Rules

  • Create expense rules for specific employees on given policies
  • Set actions for expense rules (e.g., tagging, setting billable status)

Expenses

  • Create new expenses
  • Retrieve expense data
  • Submit pictures of receipts

Reports

  • Export reports to PDF
  • Retrieve report data
  • Submit expense reports

Users/Accounts

  • Provision accounts for new hires
  • Authenticate users
  • Create new accounts

Categories

  • Add, update, or disable expense categories
  • Set GL codes, payroll codes, and other attributes for categories

Tags

  • Manage multi-level tagging
  • Update tag attributes (e.g., GL codes, enabled status)

Transactions

  • Pull transaction data for specific cards

General Data Operations

  • Perform large-scale importing and exporting of data
  • Query and manipulate various Expensify data models

It's important to note that the specific capabilities and data models available may depend on the type of integration you're using (e.g., Enterprise Import/Export API, Whitelabel API, or Web Services API) and your access level within Expensify. Additionally, all data interactions are subject to Expensify's privacy policy and data handling practices.