# Bonsai + Prima.Law Integrations: Connect with Zapier MCP
> zapier.com/apps/bonsai/integrations/prima-law
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

Integrate Bonsai and Prima.Law in minutes. Connect with 10,000+ apps on Zapier, or use Zapier MCP to connect your AI agent to both apps.

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Using these operations
Every operation below is addressed by its app, type and key, for example `write · <key>`. Events from one app can start a run that calls functions in the other.

- **MCP**: connect each app through mcp.zapier.com to expose its operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`, then call `runAction({ app, actionType, action, connection, inputs })`.
- **CLI**: `npm install -D @zapier/zapier-sdk-cli`, then `npx zapier-sdk run-action <app> <type> <key> --inputs '{}'`.

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · CreateCalendarEvent`.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "prima-law", owner: "me" });

const { data } = await zapier.runAction({
  app: "prima-law",
  actionType: "write",
  action: "CreateCalendarEvent",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action prima-law write CreateCalendarEvent \
  --inputs '{}'
```

## Bonsai

### Identity
Bonsai is a business management platform designed to help agencies and professional service companies deliver great client work.

- App slug: bonsai
- Operations published here: 15 (10 events, 5 functions)

### Authentication
Zapier connects to Bonsai via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection bonsai
```

### Capabilities

#### Events (10)

Events fire when something happens in Bonsai. Use them to start a run.

##### Contract Signed
Triggers when a contract is signed by your contact (client or contractor).

- Type: read · Key: `contract_signed_by_contact`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "contract_signed_by_contact" })`
- CLI: `npx zapier-sdk run-action bonsai read contract_signed_by_contact`

##### Contract Viewed
Triggers when a contract is viewed.

- Type: read · Key: `contract_viewed`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "contract_viewed" })`
- CLI: `npx zapier-sdk run-action bonsai read contract_viewed`

##### Deal Updated
Triggers when a deal is updated in Bonsai. 

- Type: read · Key: `deal_updated`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "deal_updated" })`
- CLI: `npx zapier-sdk run-action bonsai read deal_updated`

##### Form Submitted
Triggers when a new form response is submitted.

- Type: read · Key: `form_submitted`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "form_submitted" })`
- CLI: `npx zapier-sdk run-action bonsai read form_submitted`

##### Invoice Paid
Triggers when an invoice is paid.

- Type: read · Key: `invoice_paid`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "invoice_paid" })`
- CLI: `npx zapier-sdk run-action bonsai read invoice_paid`

##### Invoice Viewed
Triggers when an invoice is viewed by the client.

- Type: read · Key: `invoice_viewed`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "invoice_viewed" })`
- CLI: `npx zapier-sdk run-action bonsai read invoice_viewed`

##### Event Scheduled
Triggers when a new event is booked via Scheduling

- Type: read · Key: `meeting_scheduled`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "meeting_scheduled" })`
- CLI: `npx zapier-sdk run-action bonsai read meeting_scheduled`

##### Proposal Accepted
Triggers when a proposal is accepted by the client.

- Type: read · Key: `proposal_accepted`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "proposal_accepted" })`
- CLI: `npx zapier-sdk run-action bonsai read proposal_accepted`

##### Proposal Viewed
Triggers when a proposal is viewed by the client.

- Type: read · Key: `proposal_viewed`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "proposal_viewed" })`
- CLI: `npx zapier-sdk run-action bonsai read proposal_viewed`

##### Task Updated
Triggers when a task is updated in Bonsai.

- Type: read · Key: `task_updated`
- Requires: nothing
- SDK: `runAction({ app: "bonsai", actionType: "read", action: "task_updated" })`
- CLI: `npx zapier-sdk run-action bonsai read task_updated`

#### Functions (5)

Functions change something in Bonsai.

##### Create Client
Creates a client lead on Bonsai

- Type: write · Key: `create_client`
- Requires: contact_name, email
- Optional: company_name, website, phone_number, job_title, notes
- SDK: `runAction({ app: "bonsai", actionType: "write", action: "create_client" })`
- CLI: `npx zapier-sdk run-action bonsai write create_client`

##### Create Deal
Creates a new deal in Bonsai

- Type: write · Key: `create_deal`
- Requires: title, client_email
- Optional: pipeline_stage, deal_value, owner_email
- SDK: `runAction({ app: "bonsai", actionType: "write", action: "create_deal" })`
- CLI: `npx zapier-sdk run-action bonsai write create_deal`

##### Create Project
Creates a project

- Type: write · Key: `create_project`
- Requires: title, currency, email
- Optional: contact_name, company_name, description, contractor_notes, website, phone_number, job_title
- SDK: `runAction({ app: "bonsai", actionType: "write", action: "create_project" })`
- CLI: `npx zapier-sdk run-action bonsai write create_project`

##### Create Task
Creates a new task in Bonsai

- Type: write · Key: `create_task`
- Requires: title
- Optional: description, project_id, creator_email, assignee_email, status, task_list, priority, start_date, due_date, time_estimate_in_minutes, billing, service, tags, repeats_frequency, repeats_frequency_weekly_day, repeats_frequency_monthly_day
- SDK: `runAction({ app: "bonsai", actionType: "write", action: "create_task" })`
- CLI: `npx zapier-sdk run-action bonsai write create_task`

##### Create Tasks From Template
Adds tasks from a task template in Bonsai

- Type: write · Key: `create_tasks_from_template`
- Requires: project_id, task_template_name
- Optional: task_list_name
- SDK: `runAction({ app: "bonsai", actionType: "write", action: "create_tasks_from_template" })`
- CLI: `npx zapier-sdk run-action bonsai write create_tasks_from_template`

## Prima.Law

### Identity
Prima.Law is an immigration forms platform to collect data, generate forms and manage immigration cases for immigration attorneys.

- App slug: prima-law
- Operations published here: 65 (50 events, 12 functions, 2 queries, 1 search-or-write action)

### Authentication
Zapier connects to Prima.Law via oauth. Your code references a connection, not a raw credential.

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection prima-law
```

### Capabilities

#### Events (50)

Events fire when something happens in Prima.Law. Use them to start a run.

##### Assigned Task
Trigger when a task is assigned.

- Type: read · Key: `assigned_task`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "assigned_task" })`
- CLI: `npx zapier-sdk run-action prima-law read assigned_task`

##### Case Checklist Completed
Trigger when a checklist item is completed.

- Type: read · Key: `case_checklist_completed`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "case_checklist_completed" })`
- CLI: `npx zapier-sdk run-action prima-law read case_checklist_completed`

##### Case Flows Completed
Trigger when a flow item is completed.

- Type: read · Key: `case_flows_completed`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "case_flows_completed" })`
- CLI: `npx zapier-sdk run-action prima-law read case_flows_completed`

##### Case Status Change
Trigger when case status change (from open to closed or from closed to open).

- Type: read · Key: `case_status_change`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "case_status_change" })`
- CLI: `npx zapier-sdk run-action prima-law read case_status_change`

##### Case Tag Assigned
Triggers when a tag is assigned to a case.

- Type: read · Key: `case_tag_assigned`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "case_tag_assigned" })`
- CLI: `npx zapier-sdk run-action prima-law read case_tag_assigned`

##### Commented Task
Trigger when a task is commented.

- Type: read · Key: `commented_task`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "commented_task" })`
- CLI: `npx zapier-sdk run-action prima-law read commented_task`

##### Completed Task
Trigger when a task is completed.

- Type: read · Key: `completed_task`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "completed_task" })`
- CLI: `npx zapier-sdk run-action prima-law read completed_task`

##### Contact Tag Assigned
Triggers when a tag is assigned to a contact.

- Type: read · Key: `contact_tag_assigned`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "contact_tag_assigned" })`
- CLI: `npx zapier-sdk run-action prima-law read contact_tag_assigned`

##### Get Type Leads
Fetches a list of type leads.

- Type: read · Key: `getTypeLead`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "getTypeLead" })`
- CLI: `npx zapier-sdk run-action prima-law read getTypeLead`

##### New Call Tag
Triggers when a new Call tag is created.

- Type: read · Key: `newCallTag`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "newCallTag" })`
- CLI: `npx zapier-sdk run-action prima-law read newCallTag`

##### New Case Tag
Triggers when a new Case tag is created.

- Type: read · Key: `newCaseTag`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "newCaseTag" })`
- CLI: `npx zapier-sdk run-action prima-law read newCaseTag`

##### New Contact Tag
Triggers when a new Contact tag is created.

- Type: read · Key: `newContactTag`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "newContactTag" })`
- CLI: `npx zapier-sdk run-action prima-law read newContactTag`

##### New Lead Tag
Triggers when a new Lead tag is created.

- Type: read · Key: `newLeadTag`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "newLeadTag" })`
- CLI: `npx zapier-sdk run-action prima-law read newLeadTag`

##### New Task Tag
Triggers when a new Task tag is created.

- Type: read · Key: `newTaskTag`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "newTaskTag" })`
- CLI: `npx zapier-sdk run-action prima-law read newTaskTag`

##### New Address
Trigger when a new address is added

- Type: read · Key: `new_address`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_address" })`
- CLI: `npx zapier-sdk run-action prima-law read new_address`

##### Update Advance Parole
Trigger when a new Advance Parole is updated

- Type: read · Key: `new_advance_parole`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_advance_parole" })`
- CLI: `npx zapier-sdk run-action prima-law read new_advance_parole`

##### New Calendar Event
Trigger when a new calendar event is added.

- Type: read · Key: `new_calendar_event`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_calendar_event" })`
- CLI: `npx zapier-sdk run-action prima-law read new_calendar_event`

##### New Case
Trigger when a new case is added.

- Type: read · Key: `new_case`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_case" })`
- CLI: `npx zapier-sdk run-action prima-law read new_case`

##### New Contact
Trigger when a new contact is added.

- Type: read · Key: `new_contact`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_contact" })`
- CLI: `npx zapier-sdk run-action prima-law read new_contact`

##### New Criminal History
Trigger when a new Criminal History is added

- Type: read · Key: `new_criminal_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_criminal_history" })`
- CLI: `npx zapier-sdk run-action prima-law read new_criminal_history`

##### New EAD
Trigger when a new EAD is added

- Type: read · Key: `new_EAD`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_EAD" })`
- CLI: `npx zapier-sdk run-action prima-law read new_EAD`

##### New Educational History
Trigger when a new Educational History is added

- Type: read · Key: `new_educational_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_educational_history" })`
- CLI: `npx zapier-sdk run-action prima-law read new_educational_history`

##### New Family Member
Trigger when a new Family Member is added

- Type: read · Key: `new_family_member`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_family_member" })`
- CLI: `npx zapier-sdk run-action prima-law read new_family_member`

##### New Lead
Trigger when a new lead is added

- Type: read · Key: `new_lead`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_lead" })`
- CLI: `npx zapier-sdk run-action prima-law read new_lead`

##### New Marriage History
Trigger when a new Marriage History is added

- Type: read · Key: `new_marriage_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_marriage_history" })`
- CLI: `npx zapier-sdk run-action prima-law read new_marriage_history`

##### New Note
Trigger when a note is added.

- Type: read · Key: `new_note`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_note" })`
- CLI: `npx zapier-sdk run-action prima-law read new_note`

##### New Passport
Trigger when a new passport is added

- Type: read · Key: `new_passport`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_passport" })`
- CLI: `npx zapier-sdk run-action prima-law read new_passport`

##### New Phone Number
Trigger when a new phone is added

- Type: read · Key: `new_phone`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_phone" })`
- CLI: `npx zapier-sdk run-action prima-law read new_phone`

##### New Phone Call
Trigger when a new phone call is added

- Type: read · Key: `new_phone_call`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_phone_call" })`
- CLI: `npx zapier-sdk run-action prima-law read new_phone_call`

##### New Task
Trigger when a new task is added.

- Type: read · Key: `new_task`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_task" })`
- CLI: `npx zapier-sdk run-action prima-law read new_task`

##### New Transaction
Trigger when a new transaction is added.

- Type: read · Key: `new_transaction`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_transaction" })`
- CLI: `npx zapier-sdk run-action prima-law read new_transaction`

##### New Travel History
Trigger when a new travel history is added

- Type: read · Key: `new_travel_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_travel_history" })`
- CLI: `npx zapier-sdk run-action prima-law read new_travel_history`

##### New US Entry
Trigger when a new US Entry is added

- Type: read · Key: `new_US_Entry`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_US_Entry" })`
- CLI: `npx zapier-sdk run-action prima-law read new_US_Entry`

##### New Visa History
Trigger when a new visa history is added

- Type: read · Key: `new_visa_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "new_visa_history" })`
- CLI: `npx zapier-sdk run-action prima-law read new_visa_history`

##### Reassigned Task
Trigger when a task is reassigned.

- Type: read · Key: `reassigned_task`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "reassigned_task" })`
- CLI: `npx zapier-sdk run-action prima-law read reassigned_task`

##### Update Travel History
Trigger when a new travel history is updated 

- Type: read · Key: `updated_travel_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "updated_travel_history" })`
- CLI: `npx zapier-sdk run-action prima-law read updated_travel_history`

##### Update Address
Trigger when a new address is updated

- Type: read · Key: `update_address`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_address" })`
- CLI: `npx zapier-sdk run-action prima-law read update_address`

##### Update Case
Trigger when a case is updated.

- Type: read · Key: `update_case`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_case" })`
- CLI: `npx zapier-sdk run-action prima-law read update_case`

##### Update Contact
Trigger when a contact is updated.

- Type: read · Key: `update_contact`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_contact" })`
- CLI: `npx zapier-sdk run-action prima-law read update_contact`

##### Update Criminal History
Trigger when a new Criminal History is updated

- Type: read · Key: `update_criminal_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_criminal_history" })`
- CLI: `npx zapier-sdk run-action prima-law read update_criminal_history`

##### Update EAD
Trigger when a new EAD is updated

- Type: read · Key: `update_EAD`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_EAD" })`
- CLI: `npx zapier-sdk run-action prima-law read update_EAD`

##### Update Educational History
Trigger when a new Educational History is updated

- Type: read · Key: `update_educational_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_educational_history" })`
- CLI: `npx zapier-sdk run-action prima-law read update_educational_history`

##### Update Family Member
Trigger when a new Family Member is updated

- Type: read · Key: `update_family_member`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_family_member" })`
- CLI: `npx zapier-sdk run-action prima-law read update_family_member`

##### Update Marriage History
Trigger when a new Marriage History is update

- Type: read · Key: `update_marriage_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_marriage_history" })`
- CLI: `npx zapier-sdk run-action prima-law read update_marriage_history`

##### Update Note
Trigger when a note is updated.

- Type: read · Key: `update_note`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_note" })`
- CLI: `npx zapier-sdk run-action prima-law read update_note`

##### Update Passport
Trigger when a new passport is updated

- Type: read · Key: `update_passport`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_passport" })`
- CLI: `npx zapier-sdk run-action prima-law read update_passport`

##### Update Phone Number
Trigger when a phone is updated

- Type: read · Key: `update_phone`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_phone" })`
- CLI: `npx zapier-sdk run-action prima-law read update_phone`

##### Update Phone Call
Trigger when phone call is updated

- Type: read · Key: `update_phone_call`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_phone_call" })`
- CLI: `npx zapier-sdk run-action prima-law read update_phone_call`

##### Update US Entry
Trigger when a new US Entry is updated

- Type: read · Key: `update_US_Entry`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_US_Entry" })`
- CLI: `npx zapier-sdk run-action prima-law read update_US_Entry`

##### Update Visa History
Trigger when a new visa history is updated

- Type: read · Key: `update_visa_history`
- Requires: nothing
- SDK: `runAction({ app: "prima-law", actionType: "read", action: "update_visa_history" })`
- CLI: `npx zapier-sdk run-action prima-law read update_visa_history`

#### Functions (12)

Functions change something in Prima.Law.

##### Create Calendar Event
Create a calendar event.

- Type: write · Key: `CreateCalendarEvent`
- Requires: calendarId, title, start, end, allDay
- Optional: location, attendees, description, recurrenceCompatibleWith
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateCalendarEvent" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateCalendarEvent`

##### Create New Address
Creates a new address.

- Type: write · Key: `CreateNewAddress`
- Requires: address, objectId, city
- Optional: name, line2, isAptSteFlr, aptSteFlrNumbertxt, isForeing, isMailing, isPrimary, isCurrent, order, state, country, zipCode, postalCode, inCareOf, foreignProvince
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewAddress" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewAddress`

##### Create New Case
Creates a new case.

- Type: write · Key: `CreateNewCase`
- Requires: caseTypeArea, library, caseTypeId, contactId, user_id
- Optional: case_name, tags_case_management, retainer_amount, assistant_1, other_attorneys, other_assistants, expire, complete_goal_date
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewCase" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewCase`

##### Create New Contact
Creates a new contact.

- Type: write · Key: `CreateNewContact`
- Requires: firstName, lastName
- Optional: middleName, email, birthDate, notifications, potencialClient, subcontactId, isSubcontact, othersNamesUsed, socialSecurityNumber, alienNumber, pobCity, pobState, pobCountry, marriageDate, marriagePlace, spouseFirstName, spouseLastName, spouseDob, spousePlaceOfBirth, spouseSocialSecurityNumber, spouseAlien, spouseOthersNames, i94, passportNumber, passportCountry, currentImmigrationStatus, maritalStatus, PlaceOfLastEntryToUs, dateOfLastEntryToUs, citizenship, crExp, lprExp, elis, nvcDosCaseNum, sex, companyName, pdFamilyPetitionDate, pdFamilyPetitionCountry, pdFamilyPetitionCategory, pdEmploymentDate, pdEmploymentPetitionCountry, pdEmploymentPetitionCategory, pbRemoveFromReport, dropboxFolder, relationship, relatedContactId, occupation, salutation, driverLicence, nationality, clanTribeName, nativeLangName, active, i94passport, i94passportCountry, i94Number, i94arrivalDate, i94admitUntil, i94classOfAdmission, companyIrsTaxId, companyBusinessType, companyNaics, companyYearEstablished, companyTotalNumberEmployees, companyUsNumberEmployees, companyGrossAnnualIncome, companyNetAnnualIncome, isCompany, companyDateStabilised, companyDolEtaCaseNumber, companyLaborCertFilingDate, companyLaborCertExpirationDate, separated, annulled, itin, otherFirst1, otherMiddle1, otherLast1, otherFirst2, otherMiddle2, otherLast2, firstNameNativeAlpha, lastNameNativeAlpha, middleNameNativeAlpha, ethnicity, race, heightFt, heightIn, weight1, weightFull, weight2, weight3, eyes, hair, USCitizen, USLegalPermanentResident, USCitizenThrough, numberOfMarriages, clientPortalLanguage, classAdmissionLpr, dateAdmissionLpr, otherFirst3, otherLast3, otherMiddle3, tagId
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewContact" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewContact`

##### Upload New File
Uploads a new file.

- Type: write · Key: `CreateNewFile`
- Requires: nameFile, file, caseId, contactId
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewFile" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewFile`

##### Create New Lead
Creates a new lead.

- Type: write · Key: `CreateNewLead`
- Requires: firstName, typeLeadId
- Optional: lastName, middleName, email, codeCountry, phone, subject, price, dueDate, assignedSalespersonId, tagId, createNewTag, newTagNames, observations
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewLead" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewLead`

##### Create New Note
Creates a new note.

- Type: write · Key: `CreateNewNote`
- Requires: subject, contactId
- Optional: body, caseId, regardingId, regardingType, date, visibleOnClientPortal
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewNote" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewNote`

##### Create New Phone Call
Creates a new phone call.

- Type: write · Key: `CreateNewPhoneCall`
- Requires: contactId, call, phone
- Optional: caseId, type, status, assignedToId, sendNotify, tagId
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewPhoneCall" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewPhoneCall`

##### Create New Phone Number
Creates a new phone number.

- Type: write · Key: `CreateNewPhoneNumber`
- Requires: number, type, objectId
- Optional: countryAreaCode, ext, annotation, availableAt
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewPhoneNumber" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewPhoneNumber`

##### Create New Task
Creates a new task.

- Type: write · Key: `CreateNewTask`
- Requires: subject, priority, contactId, status
- Optional: body, dueDate, caseId, assignedTo, regardingId, regardingType, date, tagId
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "CreateNewTask" })`
- CLI: `npx zapier-sdk run-action prima-law write CreateNewTask`

##### Update Calendar Event
Update a calendar event.

- Type: write · Key: `UpdateCalendarEvent`
- Requires: calendarId
- Optional: title, start, end, allDay, timezone, location, attendees, description, recurrenceCompatibleWith
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "UpdateCalendarEvent" })`
- CLI: `npx zapier-sdk run-action prima-law write UpdateCalendarEvent`

##### Update Contact
Update a contact.

- Type: write · Key: `UpdateContact`
- Requires: searchByField, searchValue
- Optional: firstName, middleName, lastName, email, birthDate, notifications, potencialClient, subcontactId, isSubcontact, othersNamesUsed, socialSecurityNumber, alienNumber, pobCity, pobState, pobCountry, marriageDate, marriagePlace, spouseFirstName, spouseLastName, spouseDob, spousePlaceOfBirth, spouseSocialSecurityNumber, spouseAlien, spouseOthersNames, i94, passportNumber, passportCountry, currentImmigrationStatus, maritalStatus, PlaceOfLastEntryToUs, dateOfLastEntryToUs, citizenship, crExp, lprExp, elis, nvcDosCaseNum, sex, companyName, pdFamilyPetitionDate, pdFamilyPetitionCountry, pdFamilyPetitionCategory, pdEmploymentDate, pdEmploymentPetitionCountry, pdEmploymentPetitionCategory, pbRemoveFromReport, dropboxFolder, relationship, relatedContactId, occupation, salutation, driverLicence, nationality, clanTribeName, nativeLangName, active, i94passport, i94passportCountry, i94Number, i94arrivalDate, i94admitUntil, i94classOfAdmission, companyIrsTaxId, companyBusinessType, companyNaics, companyYearEstablished, companyTotalNumberEmployees, companyUsNumberEmployees, companyGrossAnnualIncome, companyNetAnnualIncome, isCompany, companyDateStabilised, companyDolEtaCaseNumber, companyLaborCertFilingDate, companyLaborCertExpirationDate, separated, annulled, itin, otherFirst1, otherMiddle1, otherLast1, otherFirst2, otherMiddle2, otherLast2, firstNameNativeAlpha, lastNameNativeAlpha, middleNameNativeAlpha, ethnicity, race, heightFt, heightIn, weight1, weightFull, weight2, weight3, eyes, hair, USCitizen, USLegalPermanentResident, USCitizenThrough, numberOfMarriages, clientPortalLanguage, classAdmissionLpr, dateAdmissionLpr, otherFirst3, otherLast3, otherMiddle3
- SDK: `runAction({ app: "prima-law", actionType: "write", action: "UpdateContact" })`
- CLI: `npx zapier-sdk run-action prima-law write UpdateContact`

#### Queries (2)

Queries read from Prima.Law and return data. They change nothing.

##### Search Calendar Event
Search calendar event

- Type: search · Key: `SearchCalendarEvent`
- Requires: calendarId, searchTerm
- Optional: startDate, endDate
- SDK: `runAction({ app: "prima-law", actionType: "search", action: "SearchCalendarEvent" })`
- CLI: `npx zapier-sdk run-action prima-law search SearchCalendarEvent`

##### Search Contact
search contact

- Type: search · Key: `SearchContact`
- Requires: nothing
- Optional: id, caseId, firstName, middleName, lastName, email, phoneNumber
- SDK: `runAction({ app: "prima-law", actionType: "search", action: "SearchContact" })`
- CLI: `npx zapier-sdk run-action prima-law search SearchContact`

#### Search or Write Actions (1)

These operations search for a match first, and create one only if nothing is found.

##### Search or Create Calendar Event
Searches for a calendar event matching the provided query, or creates one if it does not exist.

- Type: search_or_write · Key: `SearchCalendarEvent`
- Requires: calendarId, searchTerm, title, start, end, allDay
- Optional: startDate, endDate, location, attendees, description, recurrenceCompatibleWith
- SDK: `runAction({ app: "prima-law", actionType: "search_or_write", action: "SearchCalendarEvent" })`
- CLI: `npx zapier-sdk run-action prima-law search_or_write SearchCalendarEvent`

## Frequently asked questions about automating with Bonsai and Prima.Law

### My AI agent already connects to my apps. Why add Zapier?

Your AI agent’s built-in or native connectors cover a limited set of popular apps. Zapier reaches 10,000+ apps and 90,000+ triggers and actions. Zapier also adds what your AI agent can’t: one place to manage logins and credentials, so you never paste an API key; automations that keep running after the chat closes, with fixes you can review when a run hits a snag; and the freedom to switch agent interfaces without starting over.

### Can’t my AI agent already run tasks on a schedule?

Most popular AI agents can run scheduled tasks. And for simple recurring jobs, that might be all you need. Automations that run on Zapier can run on a schedule too, but they can also start the moment something happens in your apps—like when a new lead/ticket comes in or you get an email reply. Zapier also uses AI only in the steps that need judgment, so routine steps like posting to Slack or updating Salesforce don’t burn model tokens.

### Why not have my AI agent write me a script?

You can, and the first version will probably work. The trouble comes later: a script needs somewhere to run, a way to hear about events, and someone to keep it going. If an API changes or a login expires, your script can quietly stop until you notice. It also holds your keys, often in a repo, where a leak can expose your accounts. With Zapier, your agent builds the automation, and you publish it. Zapier hosts it, handles your logins and credentials, and records every run. If a run fails, Zapier diagnoses what went wrong and prepares a fix you can review. Or you can decide which fixes Zapier can apply for you.

## Links
- Bonsai integrations: zapier.com/apps/bonsai/integrations.md
- Prima.Law integrations: zapier.com/apps/prima-law/integrations.md
- Full page: zapier.com/apps/bonsai/integrations/prima-law
- SDK: npmjs.com/package/@zapier/zapier-sdk