Gmail and Outlook integrations: Opt out
Overview
Ramp integrates with Gmailand Outlook, which can automatically upload receipts to your Ramp transactions.If you've set this up but want to skip specific users, you can opt them out of the integration with the following steps:
Setup
Step 1: Visitdocs.ramp.comto get started with the Developer API
Step 2: Setup your app in theRamp developer dashboard– note you need to be an admin on Ramp to access this page.
Step 3: Follow the instructions listedherefor authorizing your request. We recommend setting up the app using the “client credentials” method since your company will be using this as an internal tool, and it’s easier not to have to worry about refresh_tokens in this scenario.
The only scopes required for opt-out list read/write are:
receipt_integrations:read
receipt_integrations:write
Using the API
Follow theReceipt integrations sectionto add, remove, or list the emails that are opted out of the Gmail or Outlook integrations
1. List users
GET https://api.ramp.com/developer/v1/receipt-integrations/opt-out
2. Opt out a new user
POST https://api.ramp.com/developer/v1/receipt-integrations/opt-out
Note: The POST requires an email and your business ID in the JSON payload. See the API reference for the full request body. Example: {"email": "[email protected]", "business_id": 12345}
3. Remove an opt-out (re-enable the Gmail integration for a given user)
DELETE https://api.ramp.com/developer/v1/receipt-integrations/opt-out/{mailbox_opted_out_email_uuid}
Note: For this to function properly, your company's internal tools will need to perform one of the two following functions:
- Store the mailbox_opted_out_email_uuid returned by the POST endpoint to later delete the opt-out entry
- Fetch all opted-out emails from the GET, filter it on the specific email you want removed from the opt-out list, and then delete the email from the opt-out list
Please feel free to reach out to Ramp Support and we will be happy to assist you with any questions you may have.