> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textql.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ramp Connector

> Query your Ramp transactions, cards, reimbursements, and spend data directly in Ana.

### **1. Overview**

The Ana x Ramp integration connects your Ramp account to Ana, giving you natural language access to your company's spend data — transactions, cards, spend limits, reimbursements, bills, vendors, and more. Once configured, Ana can analyze spend by department or merchant, track outstanding reimbursements, surface unusual transactions, and answer questions about your corporate card program without leaving your workflow.

<Note>
  Connect Ramp to Ana to query and analyze your company's spend and card data using natural language.
</Note>

### **2. Prerequisites**

You'll need:

* A Ramp account with admin access (required to create developer apps)
* A TextQL account with permission to add API connectors

### Which type of connection should I use?

|                    | **Access Token (Client Credentials)**                           | **OAuth (Org-level)**                          | OAuth (Per-member)                               |
| ------------------ | --------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ |
| **Best For**       | Service-account style access for the whole business             | Shared team access authorized once by an admin | Individual user access with personal permissions |
| **Authentication** | Token generated from your Ramp developer app                    | One-time OAuth flow by an admin                | Each member completes their own OAuth flow       |
| **Token Lifetime** | Expires after 10 days; must be regenerated and updated manually | Refreshed automatically by TextQL              | Refreshed automatically by TextQL                |

<Tip>
  Ramp does not issue permanent API keys — all access tokens come from OAuth. The OAuth (org-level) connection is recommended: TextQL handles the token exchange and refresh automatically, so the connection doesn't expire.
</Tip>

### **3. Capabilities**

Once configured, Ana can:

* Analyze transactions by department, merchant, card, or time period.
* Track spend against limits and surface cards approaching their limit.
* Summarize outstanding reimbursements and their approval status.
* Break down bills and vendor spend across entities and locations.
* Answer questions about users, departments, and card programs.

### **4. Setup Instructions**

***

### Step 1: Create a Ramp developer app

1. Go to [app.ramp.com](https://app.ramp.com) and sign in as an admin.
2. Navigate to **Company → Developer** (requires admin access).
3. Click **Create New App**.
4. Give the app a name (e.g. `TextQL` or `Ana Integration`) and accept the Terms.
5. Configure based on your connection type:
   * **Access Token (Client Credentials):**
     1. Under **Grant types**, click **Add new grant type** and select **Client Credentials**.
     2. Under **Scopes**, click **Configure allowed scopes** and select the read scopes you want Ana to query (e.g. `transactions:read`, `users:read`, `business:read`, `cards:read`, `limits:read`, `reimbursements:read`, `bills:read`, `vendors:read`).
     3. Copy your **Client ID** and **Client Secret**, then request an access token from the token endpoint (HTTP Basic auth):
     ```bash theme={null}
     curl -X POST https://api.ramp.com/developer/v1/token \
       -u "<CLIENT_ID>:<CLIENT_SECRET>" \
       -d "grant_type=client_credentials&scope=business:read transactions:read users:read"
     ```
     4. Copy the `access_token` from the response. Note: it expires after 10 days.
   * **OAuth (Org-level or Per-member):**
     1. Enable the **Authorization Code** grant type.
     2. Add `https://app.textql.com/auth/api-oauth/callback` as a redirect URI.
     3. Copy the **Client ID** and **Client Secret**.

### **Step 2: Add Ramp as an API connector in TextQL**

1. Go to app.textql.com and sign in.
2. In the bottom left sidebar, click **Connectors > APIs** and select Ramp.
3. In the configuration panel, fill in the fields depending on your connection type:
   * **Access Token**
     * Name (e.g. `Ramp`)
     * Authentication type: select **API Token**
     * Token: paste the access token from Step 1
   * **OAuth (Org-level or Per-member)**
     * Name (e.g. `Ramp OAuth`)
     * Authentication type: select **OAuth (org-level)** or **OAuth (per-member)**
     * Client ID and Client Secret: paste the values from Step 1
     * OAuth Authentication: click **Authenticate** — a popup will ask you to authorize access to your Ramp business. Click **Authorize**.
4. Click **Test** to verify, then click **Save**.

### **Step 3: Verify the connection**

1. Click on the Ramp connector and select Test Connection at the bottom of the panel.

* A successful setup will return Connection successful (200).
* If the test fails, refer to the [Troubleshooting](#6-troubleshooting) section for next steps.

***

### **5. Usage Examples**

Once configured, you can ask Ana:

* "What were our top 10 merchants by spend this quarter?"
* "Show me all transactions over \$1,000 in the last 30 days."
* "How much has each department spent against its limit this month?"
* "Which reimbursements are still pending approval, and for whom?"
* "Break down our SaaS vendor spend year over year."
* "Which cards are within 10% of their spend limit?"

### **6. Troubleshooting**

| **Symptom**                   | **Likely Cause**                                     | **Fix**                                                                                                                                                                     |
| ----------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Test fails / 401              | Expired, revoked, or incorrectly copied access token | Client-credentials tokens expire — generate a new token in your Ramp developer app and update the connector, or switch to OAuth so TextQL refreshes automatically.          |
| Authentication failed (OAuth) | Incorrect redirect URI or client credentials         | Make sure `https://app.textql.com/auth/api-oauth/callback` is listed exactly as a redirect URI in your Ramp app, and the Client ID/Secret were pasted without extra spaces. |
| 403 on specific queries       | Token is missing the scope for that resource         | Edit the scopes on your Ramp developer app (or re-authorize OAuth) to include the `<resource>:read` scope Ana needs.                                                        |
| Ana returns no results        | Scopes too narrow or no data in range                | Verify the token's scopes cover the resources you expect Ana to query.                                                                                                      |

### **7. Security Notes**

* Follow the principle of least privilege: grant only the read scopes Ana needs. Write scopes are not required for analytics.
* Access tokens grant access to your company's financial data. Store them securely and never share them in email, chat, or tickets.
* Rotate the client secret in your Ramp developer app if you suspect it has been exposed.
* If you no longer need the integration, delete the app in Ramp's developer settings and remove the connector from TextQL.
* For more details, refer to [Ramp's developer documentation](https://docs.ramp.com/developer-api/v1/overview/introduction).

***

### **Need Help?**

For further assistance, please contact [support@textql.com](mailto:support@textql.com).

### **Privacy Policy**

For information about how we handle your data and protect your privacy, please review our [Privacy Policy](https://textql.com/privacy).
