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

# Parma API reference

> API reference for the Parma plugin in Corsair: every `parma.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Deals

### get

`deals.get`

Get a deal

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.deals.get({ id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   amount: number | string | null,
>   status: string,
>   relationship_id: number | null,
>   pipeline_id: number | null,
>   stage_id: number | null,
>   owned_by_id: number | null,
>   created_at: string,
>   updated_at: string,
>   closed_at: string | null
> }
> ```

***

### list

`deals.list`

List deals

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.deals.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   amount: number | string | null,
>   status: string,
>   relationship_id: number | null,
>   pipeline_id: number | null,
>   stage_id: number | null,
>   owned_by_id: number | null,
>   created_at: string,
>   updated_at: string,
>   closed_at: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

## Groups

### list

`groups.list`

List groups

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.groups.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   properties: {
>     id: number,
>     name: string,
>     type: string
>   }[]
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

## Notes

### create

`notes.create`

Create a note

**Risk:** `write`

```ts theme={null}
await corsair.parma.api.notes.create({
	body: 'Follow up next week',
	relationship_ids: [123],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `string` | Yes | — |
| `datetime` | `string` | No | — |
| `relationship_ids` | `number[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   body: string,
>   datetime: string,
>   relationship_ids: number[],
>   created_at: string,
>   updated_at: string
> }
> ```

***

### list

`notes.list`

List notes

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.notes.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   body: string,
>   datetime: string,
>   relationship_ids: number[],
>   created_at: string,
>   updated_at: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

### update

`notes.update`

Update a note

**Risk:** `write`

```ts theme={null}
await corsair.parma.api.notes.update({ id: '123', body: 'Updated note' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `body` | `string` | No | — |
| `datetime` | `string` | No | — |
| `relationship_ids` | `number[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   body: string,
>   datetime: string,
>   relationship_ids: number[],
>   created_at: string,
>   updated_at: string
> }
> ```

***

## Pipelines

### get

`pipelines.get`

Get a pipeline

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.pipelines.get({ id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   position: number,
>   created_at: string,
>   updated_at: string
> }
> ```

***

### list

`pipelines.list`

List pipelines

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.pipelines.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   position: number,
>   created_at: string,
>   updated_at: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

## Relationships

### addGroup

`relationships.addGroup`

Add a relationship to a group

**Risk:** `write`

```ts theme={null}
await corsair.parma.api.relationships.addGroup({ relationship_id: '123', group_id: 456 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `relationship_id` | `string` | Yes | — |
| `group_id` | `number` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   group_id: number,
>   created_at: string,
>   updated_at: string
> }
> ```

***

### create

`relationships.create`

Create a relationship

**Risk:** `write`

```ts theme={null}
await corsair.parma.api.relationships.create({
	name: 'Example relationship',
	group_ids: [456],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `type` | `person \| company` | No | — |
| `company_id` | `number` | No | — |
| `group_ids` | `number[]` | Yes | — |
| `about` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   type: string,
>   about: string | null,
>   company_id: number | null,
>   group_ids: number[],
>   contact_details: {
>     type: string,
>     value: string
>   }[],
>   properties: {
>     id: number,
>     name: string,
>     value: string | null
>   }[],
>   created_at: string,
>   updated_at: string
> }
> ```

***

### delete

`relationships.delete`

Delete a relationship

**Risk:** `destructive`

```ts theme={null}
await corsair.parma.api.relationships.delete({ id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output:** `void`

***

### get

`relationships.get`

Get a relationship

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.relationships.get({ id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   type: string,
>   about: string | null,
>   company_id: number | null,
>   group_ids: number[],
>   contact_details: {
>     type: string,
>     value: string
>   }[],
>   properties: {
>     id: number,
>     name: string,
>     value: string | null
>   }[],
>   created_at: string,
>   updated_at: string
> }
> ```

***

### list

`relationships.list`

List relationships

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.relationships.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | — |
| `type` | `string` | No | — |
| `page` | `string` | No | — |
| `schedulinglink` | `string` | No | — |
| `linkedin` | `string` | No | — |
| `instagram` | `string` | No | — |
| `twitter` | `string` | No | — |
| `telegram` | `string` | No | — |
| `sms` | `string` | No | — |
| `phone` | `string` | No | — |
| `whatsapp` | `string` | No | — |
| `email` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   type: string,
>   about: string | null,
>   company_id: number | null,
>   group_ids: number[],
>   contact_details: {
>     type: string,
>     value: string
>   }[],
>   properties: {
>     id: number,
>     name: string,
>     value: string | null
>   }[],
>   created_at: string,
>   updated_at: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

### listGroups

`relationships.listGroups`

List relationship groups

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.relationships.listGroups({ relationship_id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `relationship_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   group_id: number,
>   created_at: string,
>   updated_at: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

### listNotes

`relationships.listNotes`

List relationship notes

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.relationships.listNotes({ relationship_id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `relationship_id` | `string` | Yes | — |
| `page` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   body: string,
>   datetime: string,
>   relationship_ids: number[],
>   created_at: string,
>   updated_at: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

### removeGroup

`relationships.removeGroup`

Remove a relationship from a group

**Risk:** `destructive`

```ts theme={null}
await corsair.parma.api.relationships.removeGroup({ relationship_id: '123', relationship_group_id: '456' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `relationship_id` | `string` | Yes | — |
| `relationship_group_id` | `string` | Yes | Membership id: the `id` from relationships.listGroups, not the `group_id` |

**Output:** `void`

***

### update

`relationships.update`

Update a relationship

**Risk:** `write`

```ts theme={null}
await corsair.parma.api.relationships.update({ id: '123', name: 'Updated relationship' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `type` | `person \| company` | No | — |
| `company_id` | `number` | No | — |
| `group_ids` | `number[]` | No | — |
| `about` | `string` | No | — |
| `properties` | `object[]` | No | — |

> [accordion] properties full type
>
> ```ts theme={null}
> {
>   id: number,
>   value: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   type: string,
>   about: string | null,
>   company_id: number | null,
>   group_ids: number[],
>   contact_details: {
>     type: string,
>     value: string
>   }[],
>   properties: {
>     id: number,
>     name: string,
>     value: string | null
>   }[],
>   created_at: string,
>   updated_at: string
> }
> ```

***

## Stages

### get

`stages.get`

Get a stage

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.stages.get({ id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   position: number,
>   created_at: string,
>   updated_at: string,
>   pipeline_id: number
> }
> ```

***

### list

`stages.list`

List stages

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.stages.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   position: number,
>   created_at: string,
>   updated_at: string,
>   pipeline_id: number
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

## Users

### get

`users.get`

Get a user

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.users.get({ id: '123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output:** `any`

***

### list

`users.list`

List users

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.users.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: number,
>   name: string,
>   email: string
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   count: number
> }
> ```

***

### me

`users.me`

Get the current user and account

**Risk:** `read`

```ts theme={null}
await corsair.parma.api.users.me({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object` | Yes | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   user: {
>     id: number,
>     name: string,
>     email: string
>   },
>   account: {
>     id: number,
>     name: string
>   }
> }
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.