# POST /api/v1/ramp/connect-with-credentials

> Connect Ramp with your own API credentials

- **Tag:** ramp
- **Operation ID:** `connect_with_credentials_api_v1_ramp_connect_with_credentials_post`

## Description

Connect Ramp using your own Client ID and Client Secret from a Ramp Developer App. This allows you to use the Client Credentials OAuth flow instead of the standard redirect-based OAuth flow. Create your app at: Ramp Dashboard → Company → Developer.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `RampApiCredentialsRequest`

- `client_id` (string · required) — Ramp Developer App Client ID
- `client_secret` (string · required) — Ramp Developer App Client Secret

## Responses

### 201 — Successful Response

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 409 — Conflict - Resource already exists

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/ramp/connect-with-credentials' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "client_id": "string",
  "client_secret": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/ramp/connect-with-credentials', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "client_id": "string",
  "client_secret": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "client_id": "string",
  "client_secret": "string"
}

response = httpx.post("https://api.ondayzero.com/api/v1/ramp/connect-with-credentials", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/ramp/connect-with-credentials
- OpenAPI slice: https://www.ondayzero.com/docs/reference/ramp/connect-with-credentials/openapi.json
- Other endpoints in **ramp**: https://www.ondayzero.com/docs/reference/ramp
