# Create Residential Listing — Domain Group

> Creates a new residential listing. See the documentation

- Key: `domain_group-create-residential-listing`
- Type: Action (Write)
- Version: 0.0.2
- App: Domain Group (`domain_group`) — https://pipedream.com/apps/domain-group.md
- This page (HTML): https://pipedream.com/apps/domain-group/actions/create-residential-listing
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/domain_group/actions/create-residential-listing/create-residential-listing.mjs

## Description

Creates a new residential listing. [See the documentation](https://developer.domain.com.au/docs/latest/apis/pkg_listing_management/references/listings_upsertresidentiallisting/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `agencyId` | `string` | Yes | The identifier of an agency Options are loaded from the connected account. |
| `providerAdId` | `string` | Yes | Must be unique. If Provider Ad ID supplied already exists, the listing will be updated. External Advertisement Id of up to 50 characters will be stored.<br /> This value is used to identify an Advertisement for updates and should be unique for listing provider.<br /> This value is case-insensitive (meaning AAAA will update aaaa). |
| `propertyType` | `string` | Yes | The type of property |
| `listingAction` | `string` | Yes | The type of listing action |
| `underOfferOrContract` | `boolean` | No | Set for Sale listings only |
| `fromPrice` | `integer` | Yes | Lowest price the property is expected to sell/rent for to set search price. For a fixed price, set this value the same as To Price |
| `toPrice` | `integer` | Yes | Highest price the property is expected to sell/rent for to set search price. For a fixed price, set this value the same as From Price |
| `description` | `string` | No | Description of the property |
| `features` | `string` | No | Comma-separated list of features |
| `streetNumber` | `string` | Yes | Street number of the listing address |
| `unitNumber` | `string` | No | Unit number of the listing address |
| `street` | `string` | Yes | Street of the listing address |
| `state` | `string` | Yes | State of the listing address |
| `suburb` | `string` | Yes | Suburb of the listing address |
| `postcode` | `string` | Yes | Post code of the listing address |
| `receiveEmailsToDefaultAddress` | `boolean` | No | Send email enquiries to the default address for this listing type |
| `isRural` | `boolean` | No | True if the property is rural |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "domain_group",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "domain_group-create-residential-listing",
  arguments: {
    agencyId: "Agency ID",
    providerAdId: "Provider Ad ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "domain_group-create-residential-listing",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    domain_group: { authProvisionId: "apn_xxxxxxx" },
    agencyId: "Agency ID",
    providerAdId: "Provider Ad ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "domain_group-create-residential-listing",
    "configured_props": {
      "domain_group": { "authProvisionId": "apn_xxxxxxx" },
      "agencyId": "Agency ID",
      "providerAdId": "Provider Ad ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/domain-group.md · All apps: https://pipedream.com/apps
