# Create Constituent — Bloomerang

> Creates a new constituent in Bloomerang. See the documentation

- Key: `bloomerang-create-constituent`
- Type: Action (Write)
- Version: 0.0.2
- App: Bloomerang (`bloomerang`) — https://pipedream.com/apps/bloomerang.md
- This page (HTML): https://pipedream.com/apps/bloomerang/actions/create-constituent
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/bloomerang/actions/create-constituent/create-constituent.mjs

## Description

Creates a new constituent in Bloomerang. [See the documentation](https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Constituents/post_constituent)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `type` | `string` | Yes | Filter constituents by type |
| `status` | `string` | No | The status of the constituent |
| `fullName` | `string` | Yes | The organization's name of the constituent |
| `firstName` | `string` | Yes | The first name of the constituent |
| `lastName` | `string` | Yes | The last name of the constituent |
| `middleName` | `string` | No | The middle name of the constituent |
| `prefix` | `string` | No | The prefix of the constituent |
| `suffix` | `string` | No | The suffix of the constituent |
| `jobTitle` | `string` | No | The job title of the constituent |
| `gender` | `string` | No | The gender of the constituent |
| `birthdate` | `string` | No | The birth date of the constituent |
| `employer` | `string` | No | The employer of the constituent |
| `website` | `string` | No | An website of the constituent |
| `facebookId` | `string` | No | The constituent's facebook page |
| `twitterId` | `string` | No | The constituent's twitter ID |
| `linkedInId` | `string` | No | The constituent's linkedIn page |
| `preferredCommunicationChannel` | `string` | No | The preferred comunication channel of the constituent |

## 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": "bloomerang",
      },
    },
  },
)

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: "bloomerang-create-constituent",
  arguments: {
    type: "Constituent Type",
    status: "Status",
  },
})
```

**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: "bloomerang-create-constituent",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    bloomerang: { authProvisionId: "apn_xxxxxxx" },
    type: "Constituent Type",
    status: "Status",
  },
})

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": "bloomerang-create-constituent",
    "configured_props": {
      "bloomerang": { "authProvisionId": "apn_xxxxxxx" },
      "type": "Constituent Type",
      "status": "Status"
    }
  }'
```

---

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