---
title: "Publish a DealHub DealRoom for a CRM Opportunity"
description: "Uses the API-owned DealHub service and credential to generate a published DealRoom, waits for asynchronous publication, and returns the quote ID and URL. Requires the payment-setup create scope."
---

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

Path: External Customer Access API

`POST /integrations/external-clients/dealhub/deal-rooms`

Uses the API-owned DealHub service and credential to generate a published DealRoom, waits for asynchronous publication, and returns the quote ID and URL. Requires the payment-setup create scope.

## Authentication

- `PartnerApiKey`, http, header `Authorization`

## Request body

_Required._

- `external_opportunity_id` (`publishDealHubDealRoom.external_opportunity_id`; string, required) — CRM Opportunity ID linked to the DealHub quote.
  - maxLength 50
- `opportunity_name` (`publishDealHubDealRoom.opportunity_name`; string, required) — Quote and published DealRoom name.
  - maxLength 250

## Example request

```json
{
  "external_opportunity_id": "string",
  "opportunity_name": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.caretlegal.net/integrations/external-clients/dealhub/deal-rooms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "external_opportunity_id": "string",
  "opportunity_name": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.caretlegal.net/integrations/external-clients/dealhub/deal-rooms';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({external_opportunity_id: 'string', opportunity_name: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.caretlegal.net/integrations/external-clients/dealhub/deal-rooms"

payload = {
    "external_opportunity_id": "string",
    "opportunity_name": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

DealRoom published

#### Example

```json
{
  "success": true,
  "data": {
    "externalOpportunityId": "string",
    "opportunityName": "string",
    "dealhubQuoteId": "string",
    "dealRoomUrl": "http://example.com"
  }
}
```

- `success` (`publishDealHubDealRoom.response.200.success`; boolean, required)
- `data` (`publishDealHubDealRoom.response.200.data`; object, required)
  - `externalOpportunityId` (`publishDealHubDealRoom.response.200.data.externalOpportunityId`; string, required)
  - `opportunityName` (`publishDealHubDealRoom.response.200.data.opportunityName`; string, required)
  - `dealhubQuoteId` (`publishDealHubDealRoom.response.200.data.dealhubQuoteId`; string, required)
  - `dealRoomUrl` (`publishDealHubDealRoom.response.200.data.dealRoomUrl`; string, required)
    - format `uri`

### 400

Invalid request

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {}
  ]
}
```

- `success` (`publishDealHubDealRoom.response.400.success`; boolean, required)
- `error` (`publishDealHubDealRoom.response.400.error`; string, required)
- `details` (`publishDealHubDealRoom.response.400.details`; array<object>, optional)

### 401

Invalid API key

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {}
  ]
}
```

- `success` (`publishDealHubDealRoom.response.401.success`; boolean, required)
- `error` (`publishDealHubDealRoom.response.401.error`; string, required)
- `details` (`publishDealHubDealRoom.response.401.details`; array<object>, optional)

### 403

Missing payment-setup scope

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {}
  ]
}
```

- `success` (`publishDealHubDealRoom.response.403.success`; boolean, required)
- `error` (`publishDealHubDealRoom.response.403.error`; string, required)
- `details` (`publishDealHubDealRoom.response.403.details`; array<object>, optional)

### 502

DealHub provider request failed

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {}
  ]
}
```

- `success` (`publishDealHubDealRoom.response.502.success`; boolean, required)
- `error` (`publishDealHubDealRoom.response.502.error`; string, required)
- `details` (`publishDealHubDealRoom.response.502.details`; array<object>, optional)

### 503

DealHub API runtime configuration is missing

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {}
  ]
}
```

- `success` (`publishDealHubDealRoom.response.503.success`; boolean, required)
- `error` (`publishDealHubDealRoom.response.503.error`; string, required)
- `details` (`publishDealHubDealRoom.response.503.details`; array<object>, optional)

### 504

DealRoom publication did not complete before the polling deadline

#### Example

```json
{
  "success": false,
  "error": "string",
  "details": [
    {}
  ]
}
```

- `success` (`publishDealHubDealRoom.response.504.success`; boolean, required)
- `error` (`publishDealHubDealRoom.response.504.error`; string, required)
- `details` (`publishDealHubDealRoom.response.504.details`; array<object>, optional)


Source: https://staging.caretlegal.net/docs/reference/external-clients/publishDealHubDealRoom/index.md
