> ## 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.

# API

> API reference for Coda: every `coda.api.*` operation with input and output types.

Every `coda.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

<Info>
  **New to Corsair?** See [API access](/concepts/api), [authentication](/concepts/auth), and [error handling](/concepts/error-handling).
</Info>

## Account

### getMutationStatus

`account.getMutationStatus`

Check whether an asynchronous mutation has been applied

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.account.getMutationStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | Yes | ID of the request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `completed` | `boolean` | Yes | — |
| `warning` | `string` | No | — |

***

### resolveBrowserLink

`account.resolveBrowserLink`

Resolve a Coda browser URL to the API object it points at

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.account.resolveBrowserLink({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | The browser link to try to resolve. |
| `degradeGracefully` | `boolean` | No | By default, attempting to resolve the Coda URL of a deleted object will result in an error. If this flag is set, the next-available object, all the way up to the doc itself, will be resolved. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `apiLink` | Yes | — |
| `href` | `string` | Yes | — |
| `browserLink` | `string` | No | — |
| `resource` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="resource full type">
    ```ts theme={null}
    {
      type: aclMetadata | aclPermissions | aclSettings | agentPackLog | agentRun | analyticsLastUpdated | apiLink | automation | column | control | doc | customDocDomain | customDocDomainProvider | docAnalytics | docAnalyticsSummary | docAnalyticsV2 | folder | formula | goLink | ingestionBatchExecution | ingestionExecution | ingestionExecutionAttempt | ingestionPackLog | ingestionParentItem | mutationStatus | pack | packAclPermissions | packAnalytics | packAnalyticsSummary | packAsset | packCategory | packConfigurationSchema | packFeaturedDocs | packFormulaAnalytics | packInvitation | packListingDraft | packLog | packMaker | packOauthConfig | packRelease | packReview | packSourceCode | packSystemConnection | packVersion | page | pageContentExport | pageContentExportStatus | principal | row | table | user | workspace,
      id: string,
      name?: string,
      href: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### whoami

`account.whoami`

Get info about the user that owns the API token

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.account.whoami({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `loginId` | `string` | Yes | — |
| `type` | `user` | Yes | — |
| `pictureLink` | `string` | No | — |
| `scoped` | `boolean` | Yes | — |
| `tokenName` | `string` | Yes | — |
| `href` | `string` | Yes | — |
| `workspace` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Analytics

### getDocsSummary

`analytics.getDocsSummary`

Get a summary of doc analytics

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.getDocsSummary({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `isPublished` | `boolean` | No | Limit results to only published items. |
| `sinceDate` | `string` | No | Limit results to activity on or after this date. |
| `untilDate` | `string` | No | Limit results to activity on or before this date. |
| `workspaceId` | `string` | No | ID of the workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalSessions` | `number` | Yes | — |

***

### getLastUpdated

`analytics.getLastUpdated`

Get the days analytics were last updated

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.getLastUpdated({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `docAnalyticsLastUpdated` | `string` | Yes | — |
| `packAnalyticsLastUpdated` | `string` | Yes | — |
| `packFormulaAnalyticsLastUpdated` | `string` | Yes | — |

***

### getPacksSummary

`analytics.getPacksSummary`

Get a summary of Pack analytics

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.getPacksSummary({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packIds` | `number[]` | No | Which Pack IDs to fetch. |
| `workspaceId` | `string` | No | ID of the workspace. |
| `isPublished` | `boolean` | No | Limit results to only published items. If false or unspecified, returns all items including published ones. |
| `sinceDate` | `string` | No | Limit results to activity on or after this date. |
| `untilDate` | `string` | No | Limit results to activity on or before this date. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalDocInstalls` | `number` | Yes | — |
| `totalWorkspaceInstalls` | `number` | Yes | — |
| `totalInvocations` | `number` | Yes | — |

***

### listDocs

`analytics.listDocs`

List analytics for docs

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.listDocs({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docIds` | `string[]` | No | List of docIds to fetch. |
| `workspaceId` | `string` | No | ID of the workspace. |
| `query` | `string` | No | Search term used to filter down results. |
| `isPublished` | `boolean` | No | Limit results to only published items. |
| `sinceDate` | `string` | No | Limit results to activity on or after this date. |
| `untilDate` | `string` | No | Limit results to activity on or before this date. |
| `scale` | `daily \| cumulative` | No | Quantization period over which to view analytics. Defaults to daily. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `orderBy` | `date \| docId \| title \| createdAt \| publishedAt \| likes \| copies \| views \| sessionsDesktop \| sessionsMobile \| sessionsOther \| totalSessions \| aiCreditsChat \| aiCreditsBlock \| aiCreditsColumn \| aiCreditsAssistant \| aiCreditsReviewer \| aiCredits` | No | Use this parameter to order the doc analytics returned. |
| `direction` | `ascending \| descending` | No | Direction to sort results in. |
| `limit` | `number` | No | Maximum number of results to return in this query. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      doc: {
        id: string,
        type: doc,
        href: string,
        browserLink: string,
        title: string,
        icon?: {
          name: string,
          type: string,
          browserLink: string
        },
        createdAt: string,
        publishedAt?: string
      },
      metrics: {
        date: string,
        views: number,
        copies: number,
        likes: number,
        sessionsMobile: number,
        sessionsDesktop: number,
        sessionsOther: number,
        totalSessions: number,
        aiCreditsChat?: number,
        aiCreditsBlock?: number,
        aiCreditsColumn?: number,
        aiCreditsAssistant?: number,
        aiCreditsReviewer?: number,
        aiCredits?: number
      }[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### listPackFormulas

`analytics.listPackFormulas`

List analytics for the formulas of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.listPackFormulas({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packFormulaNames` | `string[]` | No | A list of Pack formula names (case-sensitive) for which to retrieve analytics. |
| `packFormulaTypes` | `action \| formula \| sync \| metadata[]` | No | A list of Pack formula types corresponding to the `packFormulaNames`. If specified, this must have the same length as `packFormulaNames`. |
| `sinceDate` | `string` | No | Limit results to activity on or after this date. |
| `untilDate` | `string` | No | Limit results to activity on or before this date. |
| `scale` | `daily \| cumulative` | No | Quantization period over which to view analytics. Defaults to daily. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `orderBy` | `date \| formulaName \| formulaType \| formulaInvocations \| medianLatencyMs \| medianResponseSizeBytes \| errors \| docsActivelyUsing \| docsActivelyUsing7Day \| docsActivelyUsing30Day \| docsActivelyUsing90Day \| docsActivelyUsingAllTime \| workspacesActivelyUsing \| workspacesActivelyUsing7Day \| workspacesActivelyUsing30Day \| workspacesActivelyUsing90Day \| workspacesActivelyUsingAllTime` | No | Use this parameter to order the Pack formula analytics returned. |
| `direction` | `ascending \| descending` | No | Direction to sort results in. |
| `limit` | `number` | No | Maximum number of results to return in this query. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      formula: {
        name: string,
        type: action | formula | sync | metadata
      },
      metrics: {
        date: string,
        formulaInvocations: number,
        errors: number,
        medianLatencyMs?: number,
        medianResponseSizeBytes?: number,
        docsActivelyUsing: number,
        docsActivelyUsing7Day: number,
        docsActivelyUsing30Day: number,
        docsActivelyUsing90Day: number,
        docsActivelyUsingAllTime: number,
        workspacesActivelyUsing: number,
        workspacesActivelyUsing7Day: number,
        workspacesActivelyUsing30Day: number,
        workspacesActivelyUsing90Day: number,
        workspacesActivelyUsingAllTime: number,
        workspacesActivelyTrialing?: number,
        workspacesActivelyTrialing7Day?: number,
        workspacesActivelyTrialing30Day?: number,
        workspacesActivelyTrialing90Day?: number,
        workspacesActivelyTrialingAllTime?: number,
        workspacesNewlySubscribed?: number,
        workspacesWithActiveSubscriptions?: number,
        workspacesWithSuccessfulTrials?: number,
        revenueUsd?: string
      }[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### listPacks

`analytics.listPacks`

List analytics for Packs the user can edit

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.listPacks({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packIds` | `number[]` | No | Which Pack IDs to fetch. |
| `workspaceId` | `string` | No | ID of the workspace. |
| `query` | `string` | No | Search term used to filter down results. |
| `sinceDate` | `string` | No | Limit results to activity on or after this date. |
| `untilDate` | `string` | No | Limit results to activity on or before this date. |
| `scale` | `daily \| cumulative` | No | Quantization period over which to view analytics. Defaults to daily. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `orderBy` | `date \| packId \| name \| createdAt \| docInstalls \| workspaceInstalls \| numFormulaInvocations \| numActionInvocations \| numSyncInvocations \| numMetadataInvocations \| docsActivelyUsing \| docsActivelyUsing7Day \| docsActivelyUsing30Day \| docsActivelyUsing90Day \| docsActivelyUsingAllTime \| workspacesActivelyUsing \| workspacesActivelyUsing7Day \| workspacesActivelyUsing30Day \| workspacesActivelyUsing90Day \| workspacesActivelyUsingAllTime \| workspacesWithActiveSubscriptions \| workspacesWithSuccessfulTrials \| revenueUsd` | No | Use this parameter to order the Pack analytics returned. |
| `direction` | `ascending \| descending` | No | Direction to sort results in. |
| `isPublished` | `boolean` | No | Limit results to only published items. If false or unspecified, returns all items including published ones. |
| `limit` | `number` | No | Maximum number of results to return in this query. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      pack: {
        id: number,
        name: string,
        logoUrl?: string,
        createdAt: string
      },
      metrics: {
        date: string,
        docInstalls: number,
        workspaceInstalls: number,
        numFormulaInvocations: number,
        numActionInvocations: number,
        numSyncInvocations: number,
        numMetadataInvocations: number,
        docsActivelyUsing: number,
        docsActivelyUsing7Day: number,
        docsActivelyUsing30Day: number,
        docsActivelyUsing90Day: number,
        docsActivelyUsingAllTime: number,
        workspacesActivelyUsing: number,
        workspacesActivelyUsing7Day: number,
        workspacesActivelyUsing30Day: number,
        workspacesActivelyUsing90Day: number,
        workspacesActivelyUsingAllTime: number,
        workspacesActivelyTrialing: number,
        workspacesActivelyTrialing7Day: number,
        workspacesActivelyTrialing30Day: number,
        workspacesActivelyTrialing90Day: number,
        workspacesActivelyTrialingAllTime: number,
        workspacesNewlySubscribed: number,
        workspacesWithActiveSubscriptions: number,
        workspacesWithSuccessfulTrials: number,
        revenueUsd: string
      }[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### listPages

`analytics.listPages`

List page-level analytics for a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.analytics.listPages({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `sinceDate` | `string` | No | Limit results to activity on or after this date. |
| `untilDate` | `string` | No | Limit results to activity on or before this date. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `limit` | `number` | No | Maximum number of results to return in this query. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      page: {
        id: string,
        name: string,
        icon?: {
          name: string,
          type: string,
          browserLink: string
        }
      },
      metrics: {
        date: string,
        views: number,
        sessions: number,
        users: number,
        averageSecondsViewed: number,
        medianSecondsViewed: number,
        tabs: number
      }[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Automations

### trigger

`automations.trigger`

Trigger a webhook-invoked automation in a doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.automations.trigger({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `ruleId` | `string` | Yes | ID of the automation rule. |
| `payload` | `object` | No | JSON payload passed to the automation. |

<AccordionGroup>
  <Accordion title="payload full type">
    ```ts theme={null}
    Record<string, string | number | boolean | null | object | array>
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

***

## Categories

### list

`categories.list`

List the categories available for docs

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.categories.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      name: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Columns

### get

`columns.get`

Get details about a column

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.columns.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `columnIdOrName` | `string` | Yes | ID or name of the column. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `column` | Yes | — |
| `href` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `display` | `boolean` | No | — |
| `calculated` | `boolean` | No | — |
| `formula` | `string` | No | — |
| `defaultValue` | `string` | No | — |
| `format` | `object` | Yes | — |
| `parent` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="format full type">
    ```ts theme={null}
    {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      label?: string,
      disableIf?: string,
      action?: string
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      displayType: toggle | check
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      format?: string
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      dateFormat?: string,
      timeFormat?: string
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      precision?: number,
      maxUnit?: days | hours | minutes | seconds
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      display?: iconAndEmail | iconOnly | emailOnly,
      autocomplete?: boolean
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      display?: iconOnly | url | title | card | embed,
      force?: boolean
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      currencyCode?: string,
      precision?: number,
      format?: currency | accounting | financial
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      width: number | string,
      height: number | string,
      style: auto | circle
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      precision?: number,
      useThousandsSeparator?: boolean
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      table: {
        id: string,
        type: table,
        tableType: table | view | database,
        href: string,
        browserLink: string,
        name: string,
        parent?: {
          id: string,
          type: page,
          href: string,
          browserLink: string,
          name: string
        }
      }
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      options?: {
        name: string,
        backgroundColor?: string,
        foregroundColor?: string
      }[]
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      maximum: number,
      icon: star | circle | fire | bug | diamond | bell | thumbsup | heart | chili | smiley | lightning | currency | coffee | person | battery | cocktail | cloud | sun | checkmark | lightbulb
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      minimum?: number | string,
      maximum?: number | string,
      step?: number | string,
      displayType?: slider | progress,
      showValue?: boolean
    } | {
      type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
      isArray: boolean,
      format?: string
    }
    ```
  </Accordion>

  <Accordion title="parent full type">
    ```ts theme={null}
    {
      id: string,
      type: table,
      tableType: table | view | database,
      href: string,
      browserLink: string,
      name: string,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`columns.list`

List columns in a table

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.columns.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `visibleOnly` | `boolean` | No | If true, returns only visible columns for the table. This parameter only applies to base tables, and not views. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: column,
      href: string,
      name: string,
      display?: boolean,
      calculated?: boolean,
      formula?: string,
      defaultValue?: string,
      format: {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        label?: string,
        disableIf?: string,
        action?: string
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        displayType: toggle | check
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        format?: string
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        dateFormat?: string,
        timeFormat?: string
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        precision?: number,
        maxUnit?: days | hours | minutes | seconds
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        display?: iconAndEmail | iconOnly | emailOnly,
        autocomplete?: boolean
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        display?: iconOnly | url | title | card | embed,
        force?: boolean
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        currencyCode?: string,
        precision?: number,
        format?: currency | accounting | financial
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        width: number | string,
        height: number | string,
        style: auto | circle
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        precision?: number,
        useThousandsSeparator?: boolean
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        table: {
          id: string,
          type: table,
          tableType: table | view | database,
          href: string,
          browserLink: string,
          name: string,
          parent?: {
            id: string,
            type: page,
            href: string,
            browserLink: string,
            name: string
          }
        }
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        options?: {
          name: string,
          backgroundColor?: string,
          foregroundColor?: string
        }[]
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        maximum: number,
        icon: star | circle | fire | bug | diamond | bell | thumbsup | heart | chili | smiley | lightning | currency | coffee | person | battery | cocktail | cloud | sun | checkmark | lightbulb
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        minimum?: number | string,
        maximum?: number | string,
        step?: number | string,
        displayType?: slider | progress,
        showValue?: boolean
      } | {
        type: text | person | lookup | number | percent | currency | date | dateTime | time | duration | email | link | slider | scale | image | imageReference | attachments | button | checkbox | select | packObject | reaction | canvas | other,
        isArray: boolean,
        format?: string
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Controls

### get

`controls.get`

Get a control and its value

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.controls.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `controlIdOrName` | `string` | Yes | ID or name of the control. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `control` | Yes | — |
| `href` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `parent` | `object` | No | — |
| `controlType` | `aiBlock \| button \| checkbox \| datePicker \| dateRangePicker \| dateTimePicker \| lookup \| multiselect \| select \| scale \| slider \| reaction \| textbox \| timePicker` | Yes | — |
| `value` | `string \| number \| boolean \| (string \| number \| boolean \| (string \| number \| boolean)[])[]` | Yes | — |

<AccordionGroup>
  <Accordion title="parent full type">
    ```ts theme={null}
    {
      id: string,
      type: page,
      href: string,
      browserLink: string,
      name: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`controls.list`

List controls in a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.controls.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `sortBy` | `name` | No | Determines how to sort the given objects. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: control,
      href: string,
      name: string,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Docs

### copy

`docs.copy`

Create a copy of an existing doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.docs.copy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `title` | `string` | No | Title of the new doc. Defaults to 'Untitled'. |
| `sourceDoc` | `string` | Yes | ID of the doc to copy. |
| `timezone` | `string` | No | The timezone to use for the newly created doc. |
| `folderId` | `string` | No | The ID of the folder within which to create this doc. Defaults to your "My docs" folder in the oldest workspace you joined; this is subject to change. You can get this ID by opening the folder in the docs list on your computer and grabbing the `folderId` query parameter. |
| `initialPage` | `object` | No | — |

<AccordionGroup>
  <Accordion title="initialPage full type">
    ```ts theme={null}
    {
      name?: string,
      subtitle?: string,
      iconName?: string,
      imageUrl?: string,
      parentPageId?: string,
      pageContent?: {
        type: canvas,
        canvasContent: {
          format: html | markdown,
          content: string
        }
      } | {
        type: embed,
        url: string,
        renderMethod?: compatibility | standard
      } | {
        type: syncPage,
        mode: page,
        includeSubpages: boolean,
        sourcePageId: string,
        sourceDocId: string
      } | {
        type: syncPage,
        mode: document,
        sourceDocId: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `doc` | Yes | — |
| `href` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `icon` | `object` | No | — |
| `name` | `string` | Yes | — |
| `owner` | `string` | Yes | — |
| `ownerName` | `string` | Yes | — |
| `docSize` | `object` | No | — |
| `sourceDoc` | `object` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |
| `published` | `object` | No | — |
| `folder` | `object` | Yes | — |
| `workspace` | `object` | Yes | — |
| `workspaceId` | `string` | Yes | — |
| `folderId` | `string` | Yes | — |
| `requestId` | `string` | No | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="docSize full type">
    ```ts theme={null}
    {
      totalRowCount: number,
      tableAndViewCount: number,
      baseTableCount?: number,
      pageCount: number,
      overApiSizeLimit: boolean
    }
    ```
  </Accordion>

  <Accordion title="sourceDoc full type">
    ```ts theme={null}
    {
      id: string,
      type: doc,
      href: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="published full type">
    ```ts theme={null}
    {
      description?: string,
      browserLink: string,
      imageLink?: string,
      discoverable: boolean,
      earnCredit: boolean,
      mode: view | play | edit,
      categories: {
        name: string
      }[]
    }
    ```
  </Accordion>

  <Accordion title="folder full type">
    ```ts theme={null}
    {
      id: string,
      type: folder,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>

  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### create

`docs.create`

Create a new doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.docs.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `title` | `string` | No | Title of the new doc. Defaults to 'Untitled'. |
| `sourceDoc` | `string` | No | An optional doc ID from which to create a copy. |
| `timezone` | `string` | No | The timezone to use for the newly created doc. |
| `folderId` | `string` | No | The ID of the folder within which to create this doc. Defaults to your "My docs" folder in the oldest workspace you joined; this is subject to change. You can get this ID by opening the folder in the docs list on your computer and grabbing the `folderId` query parameter. |
| `initialPage` | `object` | No | — |

<AccordionGroup>
  <Accordion title="initialPage full type">
    ```ts theme={null}
    {
      name?: string,
      subtitle?: string,
      iconName?: string,
      imageUrl?: string,
      parentPageId?: string,
      pageContent?: {
        type: canvas,
        canvasContent: {
          format: html | markdown,
          content: string
        }
      } | {
        type: embed,
        url: string,
        renderMethod?: compatibility | standard
      } | {
        type: syncPage,
        mode: page,
        includeSubpages: boolean,
        sourcePageId: string,
        sourceDocId: string
      } | {
        type: syncPage,
        mode: document,
        sourceDocId: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `doc` | Yes | — |
| `href` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `icon` | `object` | No | — |
| `name` | `string` | Yes | — |
| `owner` | `string` | Yes | — |
| `ownerName` | `string` | Yes | — |
| `docSize` | `object` | No | — |
| `sourceDoc` | `object` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |
| `published` | `object` | No | — |
| `folder` | `object` | Yes | — |
| `workspace` | `object` | Yes | — |
| `workspaceId` | `string` | Yes | — |
| `folderId` | `string` | Yes | — |
| `requestId` | `string` | No | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="docSize full type">
    ```ts theme={null}
    {
      totalRowCount: number,
      tableAndViewCount: number,
      baseTableCount?: number,
      pageCount: number,
      overApiSizeLimit: boolean
    }
    ```
  </Accordion>

  <Accordion title="sourceDoc full type">
    ```ts theme={null}
    {
      id: string,
      type: doc,
      href: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="published full type">
    ```ts theme={null}
    {
      description?: string,
      browserLink: string,
      imageLink?: string,
      discoverable: boolean,
      earnCredit: boolean,
      mode: view | play | edit,
      categories: {
        name: string
      }[]
    }
    ```
  </Accordion>

  <Accordion title="folder full type">
    ```ts theme={null}
    {
      id: string,
      type: folder,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>

  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`docs.delete`

Permanently delete a doc

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.docs.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |

**Output:** *empty object*

***

### get

`docs.get`

Get metadata for a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.docs.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `doc` | Yes | — |
| `href` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `icon` | `object` | No | — |
| `name` | `string` | Yes | — |
| `owner` | `string` | Yes | — |
| `ownerName` | `string` | Yes | — |
| `docSize` | `object` | No | — |
| `sourceDoc` | `object` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |
| `published` | `object` | No | — |
| `folder` | `object` | Yes | — |
| `workspace` | `object` | Yes | — |
| `workspaceId` | `string` | Yes | — |
| `folderId` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="docSize full type">
    ```ts theme={null}
    {
      totalRowCount: number,
      tableAndViewCount: number,
      baseTableCount?: number,
      pageCount: number,
      overApiSizeLimit: boolean
    }
    ```
  </Accordion>

  <Accordion title="sourceDoc full type">
    ```ts theme={null}
    {
      id: string,
      type: doc,
      href: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="published full type">
    ```ts theme={null}
    {
      description?: string,
      browserLink: string,
      imageLink?: string,
      discoverable: boolean,
      earnCredit: boolean,
      mode: view | play | edit,
      categories: {
        name: string
      }[]
    }
    ```
  </Accordion>

  <Accordion title="folder full type">
    ```ts theme={null}
    {
      id: string,
      type: folder,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>

  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`docs.list`

List docs the user can access

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.docs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `isOwner` | `boolean` | No | Show only docs owned by the user. |
| `isPublished` | `boolean` | No | Show only published docs. |
| `query` | `string` | No | Search term used to filter down results. |
| `sourceDoc` | `string` | No | Show only docs copied from the specified doc ID. |
| `isStarred` | `boolean` | No | If true, returns docs that are starred. If false, returns docs that are not starred. |
| `inGallery` | `boolean` | No | Show only docs visible within the gallery. |
| `workspaceId` | `string` | No | Show only docs belonging to the given workspace. |
| `folderId` | `string` | No | Show only docs belonging to the given folder. |
| `minimumAccess` | `readonly \| write \| comment` | No | Show only docs where the user has at least this access. Uses the same access values as doc permissions (`readonly`, `comment`, `write`). `write` includes both editors and managers. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: doc,
      href: string,
      browserLink: string,
      icon?: {
        name: string,
        type: string,
        browserLink: string
      },
      name: string,
      owner: string,
      ownerName: string,
      docSize?: {
        totalRowCount: number,
        tableAndViewCount: number,
        baseTableCount?: number,
        pageCount: number,
        overApiSizeLimit: boolean
      },
      sourceDoc?: {
        id: string,
        type: doc,
        href: string,
        browserLink: string
      },
      createdAt: string,
      updatedAt: string,
      published?: {
        description?: string,
        browserLink: string,
        imageLink?: string,
        discoverable: boolean,
        earnCredit: boolean,
        mode: view | play | edit,
        categories: {
          name: string
        }[]
      },
      folder: {
        id: string,
        type: folder,
        browserLink: string,
        name?: string
      },
      workspace: {
        id: string,
        type: workspace,
        organizationId?: string,
        browserLink: string,
        name?: string
      },
      workspaceId: string,
      folderId: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### publish

`docs.publish`

Publish a doc or update its publish settings

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.docs.publish({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `slug` | `string` | No | Slug for the published doc. |
| `discoverable` | `boolean` | No | If true, indicates that the doc is discoverable. |
| `categoryNames` | `string[]` | No | The names of categories to apply to the document. |
| `mode` | `view \| play \| edit` | No | Which interaction mode the published doc should use. |

**Output**

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

***

### unpublish

`docs.unpublish`

Unpublish a doc

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.docs.unpublish({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |

**Output:** *empty object*

***

### update

`docs.update`

Update the title or icon of a doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.docs.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `title` | `string` | No | Title of the doc. |
| `iconName` | `string` | No | Name of the icon. |

**Output:** *empty object*

***

## Domains

### add

`domains.add`

Add a custom domain to a published doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.domains.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `customDocDomain` | `string` | Yes | The custom domain. |

**Output:** *empty object*

***

### delete

`domains.delete`

Remove a custom domain from a published doc

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.domains.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `customDocDomain` | `string` | Yes | A custom domain for a published doc. |

**Output:** *empty object*

***

### getProvider

`domains.getProvider`

Identify the registrar of a custom domain

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.domains.getProvider({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `customDocDomain` | `string` | Yes | A custom domain for a published doc. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `provider` | `GoDaddy \| Namecheap \| Hover (Tucows) \| Network Solutions \| Google Domains \| Other` | Yes | — |

***

### list

`domains.list`

List custom domains of a published doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.domains.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `customDocDomains` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="customDocDomains full type">
    ```ts theme={null}
    {
      customDocDomain: string,
      hasCertificate: boolean,
      hasDnsDocId: boolean,
      setupStatus: pending | succeeded | failed,
      domainStatus: connected | notConnected,
      lastVerifiedTimestamp?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`domains.update`

Update a custom domain of a published doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.domains.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `customDocDomain` | `string` | Yes | A custom domain for a published doc. |
| `body` | `object` | Yes | Credentials patch for the system connection. |

<AccordionGroup>
  <Accordion title="body full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** *empty object*

***

## Folders

### create

`folders.create`

Create a folder in a workspace

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.folders.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Name of the folder. |
| `workspaceId` | `string` | Yes | ID of the workspace where the folder should be created. |
| `description` | `string` | No | Description of the folder. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `folder` | Yes | — |
| `name` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `description` | `string` | No | — |
| `icon` | `object` | No | — |
| `iconColor` | `DARK_BLUE \| DARK_YELLOW \| DARK_PURPLE \| DARK_PINK \| DARK_ORANGE \| DARK_GREEN \| DARK_RED \| DARK_GRAY \| LIGHT_BLUE \| LIGHT_YELLOW \| LIGHT_PURPLE \| LIGHT_PINK \| LIGHT_ORANGE \| LIGHT_GREEN \| LIGHT_RED \| LIGHT_GRAY` | No | — |
| `createdAt` | `string` | No | — |
| `canEdit` | `boolean` | No | — |
| `workspace` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`folders.delete`

Delete a folder

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.folders.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `folderId` | `string` | Yes | ID of the folder. |

**Output:** *empty object*

***

### get

`folders.get`

Get metadata about a folder

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.folders.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `folderId` | `string` | Yes | ID of the folder. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `folder` | Yes | — |
| `name` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `description` | `string` | No | — |
| `icon` | `object` | No | — |
| `iconColor` | `DARK_BLUE \| DARK_YELLOW \| DARK_PURPLE \| DARK_PINK \| DARK_ORANGE \| DARK_GREEN \| DARK_RED \| DARK_GRAY \| LIGHT_BLUE \| LIGHT_YELLOW \| LIGHT_PURPLE \| LIGHT_PINK \| LIGHT_ORANGE \| LIGHT_GREEN \| LIGHT_RED \| LIGHT_GRAY` | No | — |
| `createdAt` | `string` | No | — |
| `canEdit` | `boolean` | No | — |
| `workspace` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`folders.list`

List folders the user can access

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.folders.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | Show only folders belonging to the given workspace. |
| `isStarred` | `boolean` | No | If true, returns folders that are starred. If false, returns folders that are not starred. If not specified, returns all folders. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: folder,
      name: string,
      browserLink: string,
      description?: string,
      icon?: {
        name: string,
        type: string,
        browserLink: string
      },
      iconColor?: DARK_BLUE | DARK_YELLOW | DARK_PURPLE | DARK_PINK | DARK_ORANGE | DARK_GREEN | DARK_RED | DARK_GRAY | LIGHT_BLUE | LIGHT_YELLOW | LIGHT_PURPLE | LIGHT_PINK | LIGHT_ORANGE | LIGHT_GREEN | LIGHT_RED | LIGHT_GRAY,
      createdAt?: string,
      canEdit?: boolean,
      workspace: {
        id: string,
        type: workspace,
        organizationId?: string,
        browserLink: string,
        name?: string
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`folders.update`

Update the name or description of a folder

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.folders.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `folderId` | `string` | Yes | ID of the folder. |
| `name` | `string` | No | Name of the folder. |
| `description` | `string` | No | Description of the folder. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `folder` | Yes | — |
| `name` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `description` | `string` | No | — |
| `icon` | `object` | No | — |
| `iconColor` | `DARK_BLUE \| DARK_YELLOW \| DARK_PURPLE \| DARK_PINK \| DARK_ORANGE \| DARK_GREEN \| DARK_RED \| DARK_GRAY \| LIGHT_BLUE \| LIGHT_YELLOW \| LIGHT_PURPLE \| LIGHT_PINK \| LIGHT_ORANGE \| LIGHT_GREEN \| LIGHT_RED \| LIGHT_GRAY` | No | — |
| `createdAt` | `string` | No | — |
| `canEdit` | `boolean` | No | — |
| `workspace` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="workspace full type">
    ```ts theme={null}
    {
      id: string,
      type: workspace,
      organizationId?: string,
      browserLink: string,
      name?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Formulas

### get

`formulas.get`

Get a named formula and its value

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.formulas.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `formulaIdOrName` | `string` | Yes | ID or name of the formula. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `formula` | Yes | — |
| `href` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `parent` | `object` | No | — |
| `value` | `string \| number \| boolean \| (string \| number \| boolean \| (string \| number \| boolean)[])[]` | Yes | — |

<AccordionGroup>
  <Accordion title="parent full type">
    ```ts theme={null}
    {
      id: string,
      type: page,
      href: string,
      browserLink: string,
      name: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`formulas.list`

List named formulas in a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.formulas.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `sortBy` | `name` | No | Determines how to sort the given objects. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: formula,
      href: string,
      name: string,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Assets

### upload

`packAssets.upload`

Get a signed URL to upload a Pack asset

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packAssets.upload({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packAssetType` | `logo \| cover \| exampleImage \| agentImage` | Yes | — |
| `imageHash` | `string` | Yes | The SHA-256 hash of the image to be uploaded. |
| `mimeType` | `string` | Yes | The media type of the image being sent. |
| `filename` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uploadUrl` | `string` | Yes | — |
| `packAssetUploadedPathName` | `string` | Yes | — |
| `headers` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="headers full type">
    ```ts theme={null}
    Record<string, string>
    ```
  </Accordion>
</AccordionGroup>

***

### uploadComplete

`packAssets.uploadComplete`

Mark the upload of a Pack asset as complete

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packAssets.uploadComplete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packAssetId` | `string` | Yes | Unique identifier for a Pack asset. |
| `packAssetType` | `logo \| cover \| exampleImage \| agentImage` | Yes | Pack asset type. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | Yes | — |
| `assetId` | `string` | Yes | — |

***

## Pack Categories

### add

`packCategories.add`

Add a publishing category to a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packCategories.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `categoryName` | `string` | Yes | Name of the publishing category. |

**Output:** *empty object*

***

### delete

`packCategories.delete`

Remove a publishing category from a Pack

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.packCategories.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `categoryName` | `string` | Yes | Name of a publishing category |

**Output:** *empty object*

***

### list

`packCategories.list`

List the publishing categories of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packCategories.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="categories full type">
    ```ts theme={null}
    {
      categoryId: string,
      categoryName: string,
      categorySlug?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Connections

### getOauthConfig

`packConnections.getOauthConfig`

Get the OAuth configuration of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packConnections.getOauthConfig({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `maskedClientId` | `string` | Yes | — |
| `maskedClientSecret` | `string` | Yes | — |
| `authorizationUrl` | `string` | Yes | — |
| `tokenUrl` | `string` | Yes | — |
| `tokenPrefix` | `string` | No | — |
| `scopes` | `string` | No | — |
| `redirectUri` | `string` | Yes | — |
| `useDynamicClientRegistration` | `boolean` | No | — |

***

### getSystemConnection

`packConnections.getSystemConnection`

Get the system connection metadata of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packConnections.getSystemConnection({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output:** `object`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      type: header,
      maskedToken?: string,
      headerName: string,
      tokenPrefix: string
    } | {
      type: multiHeader,
      headers: {
        headerName: string,
        maskedToken: string,
        tokenPrefix?: string
      }[],
      presets: {
        headerName: string,
        tokenPrefix?: string
      }[]
    } | {
      type: urlParam,
      params: {
        key: string,
        maskedValue: string
      }[],
      domain: string,
      presetKeys: string[]
    } | {
      type: httpBasic,
      maskedUsername?: string,
      maskedPassword?: string
    } | {
      type: custom,
      params: {
        key: string,
        maskedValue: string
      }[],
      domain: string,
      presetKeys: string[]
    } | {
      type: oauth2ClientCredentials,
      location: automatic | body | header,
      maskedClientId: string,
      maskedClientSecret: string
    } | {
      type: googleServiceAccount,
      maskedServiceAccountKey: string
    } | {
      type: awsAssumeRole,
      service: string,
      roleArn: string,
      externalId: string
    } | {
      type: awsAccessKey,
      service: string,
      maskedAccessKeyId: string,
      maskedSecretAccessKey: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### patchSystemConnection

`packConnections.patchSystemConnection`

Patch the system connection credentials of a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packConnections.patchSystemConnection({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `body` | `object` | Yes | Credentials patch for the system connection. |

<AccordionGroup>
  <Accordion title="body full type">
    ```ts theme={null}
    {
      type: header,
      token?: string
    } | {
      type: multiHeader,
      tokensToPatch?: {
        key: string,
        value: string
      }[]
    } | {
      type: urlParam,
      paramsToPatch?: {
        key: string,
        value: string
      }[]
    } | {
      type: httpBasic,
      username?: string,
      password?: string
    } | {
      type: custom,
      paramsToPatch?: {
        key: string,
        value: string
      }[]
    } | {
      type: oauth2ClientCredentials,
      clientId?: string,
      clientSecret?: string
    } | {
      type: googleServiceAccount,
      serviceAccountKey?: string
    } | {
      type: awsAssumeRole,
      roleArn?: string,
      externalId?: string
    } | {
      type: awsAccessKey,
      accessKeyId?: string,
      secretAccessKey?: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `object`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      type: header,
      maskedToken?: string,
      headerName: string,
      tokenPrefix: string
    } | {
      type: multiHeader,
      headers: {
        headerName: string,
        maskedToken: string,
        tokenPrefix?: string
      }[],
      presets: {
        headerName: string,
        tokenPrefix?: string
      }[]
    } | {
      type: urlParam,
      params: {
        key: string,
        maskedValue: string
      }[],
      domain: string,
      presetKeys: string[]
    } | {
      type: httpBasic,
      maskedUsername?: string,
      maskedPassword?: string
    } | {
      type: custom,
      params: {
        key: string,
        maskedValue: string
      }[],
      domain: string,
      presetKeys: string[]
    } | {
      type: oauth2ClientCredentials,
      location: automatic | body | header,
      maskedClientId: string,
      maskedClientSecret: string
    } | {
      type: googleServiceAccount,
      maskedServiceAccountKey: string
    } | {
      type: awsAssumeRole,
      service: string,
      roleArn: string,
      externalId: string
    } | {
      type: awsAccessKey,
      service: string,
      maskedAccessKeyId: string,
      maskedSecretAccessKey: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### setOauthConfig

`packConnections.setOauthConfig`

Set the OAuth client credentials of a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packConnections.setOauthConfig({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `clientId` | `string` | No | — |
| `clientSecret` | `string` | No | — |
| `redirectUri` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `maskedClientId` | `string` | Yes | — |
| `maskedClientSecret` | `string` | Yes | — |
| `authorizationUrl` | `string` | Yes | — |
| `tokenUrl` | `string` | Yes | — |
| `tokenPrefix` | `string` | No | — |
| `scopes` | `string` | No | — |
| `redirectUri` | `string` | Yes | — |
| `useDynamicClientRegistration` | `boolean` | No | — |

***

### setSystemConnection

`packConnections.setSystemConnection`

Set the system connection credentials of a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packConnections.setSystemConnection({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `credentials` | `object` | Yes | Credentials of a Pack connection. |

<AccordionGroup>
  <Accordion title="credentials full type">
    ```ts theme={null}
    {
      type: header,
      token: string
    } | {
      type: multiHeader,
      tokens: {
        key: string,
        value: string
      }[]
    } | {
      type: urlParam,
      params: {
        key: string,
        value: string
      }[]
    } | {
      type: httpBasic,
      username: string,
      password?: string
    } | {
      type: custom,
      params: {
        key: string,
        value: string
      }[]
    } | {
      type: oauth2ClientCredentials,
      clientId: string,
      clientSecret: string
    } | {
      type: googleServiceAccount,
      serviceAccountKey: string
    } | {
      type: awsAssumeRole,
      roleArn: string,
      externalId: string
    } | {
      type: awsAccessKey,
      accessKeyId: string,
      secretAccessKey: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `object`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      type: header,
      maskedToken?: string,
      headerName: string,
      tokenPrefix: string
    } | {
      type: multiHeader,
      headers: {
        headerName: string,
        maskedToken: string,
        tokenPrefix?: string
      }[],
      presets: {
        headerName: string,
        tokenPrefix?: string
      }[]
    } | {
      type: urlParam,
      params: {
        key: string,
        maskedValue: string
      }[],
      domain: string,
      presetKeys: string[]
    } | {
      type: httpBasic,
      maskedUsername?: string,
      maskedPassword?: string
    } | {
      type: custom,
      params: {
        key: string,
        maskedValue: string
      }[],
      domain: string,
      presetKeys: string[]
    } | {
      type: oauth2ClientCredentials,
      location: automatic | body | header,
      maskedClientId: string,
      maskedClientSecret: string
    } | {
      type: googleServiceAccount,
      maskedServiceAccountKey: string
    } | {
      type: awsAssumeRole,
      service: string,
      roleArn: string,
      externalId: string
    } | {
      type: awsAccessKey,
      service: string,
      maskedAccessKeyId: string,
      maskedSecretAccessKey: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Featured Docs

### list

`packFeaturedDocs.list`

List the featured docs of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packFeaturedDocs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      doc: {
        id: string,
        type: doc,
        href: string,
        browserLink: string
      },
      isPinned: boolean,
      docStatus?: docInaccessibleOrDoesNotExist | invalidPublishedDocUrl,
      publishedUrl?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`packFeaturedDocs.update`

Replace the featured docs of a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packFeaturedDocs.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `items` | `object[]` | Yes | A list of docs to set as the featured docs for a Pack. |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      url: string,
      isPinned?: boolean
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output:** *empty object*

***

## Pack Invitations

### create

`packInvitations.create`

Invite a user to collaborate on a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packInvitations.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `email` | `string` | Yes | Email address of the user to invite |
| `access` | `none \| view \| test \| edit \| admin` | Yes | — |

**Output**

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

***

### listForUser

`packInvitations.listForUser`

List pending Pack invitations for the user

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packInvitations.listForUser({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      invitation: {
        invitationId: string,
        packId: number,
        inviteeEmail: string,
        inviterUserId: number,
        access: none | view | test | edit | admin,
        createdAt: string,
        expiresAt: string
      },
      pack: {
        id: number,
        logoUrl?: string,
        coverUrl?: string,
        exampleImages?: {
          filename: string,
          imageUrl: string,
          assetId: string,
          altText?: string,
          mimeType?: string
        }[],
        agentImages?: {
          filename: string,
          imageUrl: string,
          assetId: string,
          altText?: string,
          mimeType?: string
        }[],
        workspaceId: string,
        categories: {
          categoryId: string,
          categoryName: string,
          categorySlug?: string
        }[],
        certified?: boolean,
        certifiedAgent?: boolean,
        sourceCodeVisibility?: private | shared,
        packEntrypoints?: go | docs[],
        verifiedVersion?: string,
        name: string,
        description: string,
        shortDescription: string,
        agentShortDescription?: string,
        agentDescription?: string,
        supportEmail?: string,
        termsOfServiceUrl?: string,
        privacyPolicyUrl?: string
      },
      makers: {
        name: string,
        pictureLink?: string,
        slug?: string,
        jobTitle?: string,
        employer?: string,
        description?: string,
        loginId: string
      }[],
      networkDomains: string[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Listings

### deleteDraft

`packListings.deleteDraft`

Delete the listing draft of a Pack

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.packListings.deleteDraft({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output:** *empty object*

***

### get

`packListings.get`

Get the public listing of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packListings.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `workspaceId` | `string` | No | ID of the target workspace (if applicable) for checking installation privileges. |
| `docId` | `string` | No | ID of the target document for checking installation privileges |
| `ingestionId` | `string` | No | ID of the target ingestion for checking limit settings |
| `installContext` | `workspace \| doc` | No | Type of installation context for which Pack information is being requested. |
| `releaseChannel` | `LIVE \| LATEST` | No | Release channel for which Pack information is being requested. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | — |
| `packVersion` | `string` | Yes | — |
| `releaseId` | `number` | No | — |
| `lastReleasedAt` | `string` | No | — |
| `logoUrl` | `string` | Yes | — |
| `logo` | `object` | Yes | — |
| `coverUrl` | `string` | No | — |
| `cover` | `object` | No | — |
| `exampleImages` | `object[]` | No | — |
| `agentImages` | `object[]` | No | — |
| `name` | `string` | Yes | — |
| `description` | `string` | Yes | — |
| `shortDescription` | `string` | Yes | — |
| `agentShortDescription` | `string` | No | — |
| `agentDescription` | `string` | No | — |
| `supportEmail` | `string` | No | — |
| `termsOfServiceUrl` | `string` | No | — |
| `privacyPolicyUrl` | `string` | No | — |
| `categories` | `object[]` | Yes | — |
| `makers` | `object[]` | Yes | — |
| `certified` | `boolean` | No | — |
| `certifiedAgent` | `boolean` | No | — |
| `minimumFeatureSet` | `Basic \| Pro \| Team \| Enterprise` | No | — |
| `unrestrictedFeatureSet` | `Basic \| Pro \| Team \| Enterprise` | No | — |
| `externalMetadataUrl` | `string` | Yes | — |
| `standardPackPlan` | `object` | No | — |
| `bundledPackPlan` | `object` | No | — |
| `sourceCodeVisibility` | `private \| shared` | No | — |
| `sdkVersion` | `string` | Yes | — |
| `packCategoryType` | `connector \| agent \| customAgent` | Yes | — |
| `discoverability` | `public \| nomosOrganization \| group \| grammarlyInstitution \| workspace \| private` | Yes | — |
| `userAccess` | `object` | Yes | — |
| `codaHelpCenterUrl` | `string` | No | — |
| `configuration` | `object` | No | — |

<AccordionGroup>
  <Accordion title="logo full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }
    ```
  </Accordion>

  <Accordion title="cover full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }
    ```
  </Accordion>

  <Accordion title="exampleImages full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="agentImages full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="categories full type">
    ```ts theme={null}
    {
      categoryId: string,
      categoryName: string,
      categorySlug?: string
    }[]
    ```
  </Accordion>

  <Accordion title="makers full type">
    ```ts theme={null}
    {
      name: string,
      pictureLink?: string,
      slug?: string,
      jobTitle?: string,
      employer?: string,
      description?: string
    }[]
    ```
  </Accordion>

  <Accordion title="standardPackPlan full type">
    ```ts theme={null}
    {
      packPlanId: string,
      packId: number,
      pricing: {
        type: Free
      } | {
        type: MonthlyDocMaker,
        amount: number,
        currency: USD
      },
      createdAt: string
    }
    ```
  </Accordion>

  <Accordion title="bundledPackPlan full type">
    ```ts theme={null}
    {
      packPlanId: string,
      packId: number,
      pricing: {
        type: BundledWithTier,
        minimumFeatureSet: Pro | Team | Enterprise
      },
      createdAt: string
    }
    ```
  </Accordion>

  <Accordion title="userAccess full type">
    ```ts theme={null}
    {
      canEdit: boolean,
      canTest: boolean,
      canView: boolean,
      canInstall: boolean,
      canPurchase: boolean,
      requiresTrial: boolean,
      canConnectAccount: boolean,
      usesSystemConnection?: boolean,
      organization?: {
        canRequestAccess: boolean,
        hasRequestedAccess: boolean,
        requiresConfiguration: boolean,
        allowedConfigurations?: {
          configurationId: string,
          name: string,
          policy?: Record<string, string | number | boolean | null | object | array>,
          hasSharedConnection?: boolean
        }[],
        allowedPackIds?: number[],
        incompatibleDocPermissions?: {
          principal: {
            type: email,
            email: string
          } | {
            type: group,
            groupId: string,
            groupName: string
          } | {
            type: domain,
            domain: string
          } | {
            type: workspace,
            workspaceId: string
          } | {
            type: anyone
          } | {
            type: internalAccess,
            internalAccessType: string
          },
          id: string,
          access: readonly | write | comment | none
        }[],
        incompatibleDocOwner?: {
          name: string,
          loginId: string,
          type: user,
          pictureLink?: string
        },
        incompatibleDocFolder?: {
          id: string,
          type: folder,
          browserLink: string,
          name?: string
        },
        isDocOwner?: boolean
      } | {
        canRequestAccess: boolean,
        hasRequestedAccess: boolean,
        requiresConfiguration: boolean,
        allowedConfigurations?: {
          configurationId: string,
          name: string,
          policy?: Record<string, string | number | boolean | null | object | array>,
          hasSharedConnection?: boolean
        }[],
        allowedPackIds?: number[]
      },
      ingestionLimitSettings?: {
        tableSettings?: Record<string, { maxBytesPerSyncTableOverride?: number | null, excludeIngestionByDefault?: boolean, parameterLimits?: Record<string, { default: string, allowed: string[] }> }>,
        maxBytesPerSyncTableDefault?: number | null,
        allowedTablesCount: number
      }
    }
    ```
  </Accordion>

  <Accordion title="configuration full type">
    ```ts theme={null}
    {
      configurationId: string,
      name: string,
      policy?: Record<string, string | number | boolean | null | object | array>,
      hasSharedConnection?: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`packListings.list`

List the Pack listings the user can access

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packListings.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packAccessTypes` | `none \| view \| test \| edit \| admin[]` | No | Pack access types. |
| `packIds` | `number[]` | No | Which Pack IDs to fetch. |
| `onlyWorkspaceId` | `string` | No | Use only this workspace (not all of a user's workspaces) to check for Packs shared via workspace ACL. |
| `parentWorkspaceIds` | `string[]` | No | Filter to only Packs whose parent workspace is one of the given IDs. |
| `excludePublicPacks` | `boolean` | No | Only get Packs shared with users/workspaces, not publicly. |
| `packEntrypoint` | `go \| docs` | No | Entrypoint for which this Pack call is being made. Used to filter non relevant Packs |
| `certifiedAgentsOnly` | `boolean` | No | Only include Packs that are certified for agent use. Depending on server configuration, may also include Packs that the user is an admin of. |
| `packCategories` | `connector \| agent \| customAgent[]` | No | Filter Packs by one or more category types. |
| `sortBy` | `packId \| name \| packVersion \| packVersionModifiedAt \| agentDirectorySort` | No | Specify a sort order for the returned Pack listings returned. |
| `orderBy` | `packId \| name \| packVersion \| packVersionModifiedAt \| agentDirectorySort` | No | Deprecated: use sortBy instead. |
| `direction` | `ascending \| descending` | No | Direction to sort results in. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `installContext` | `workspace \| doc` | No | Type of installation context for which Pack information is being requested. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      packId: number,
      packVersion: string,
      releaseId?: number,
      lastReleasedAt?: string,
      logoUrl: string,
      logo: {
        filename: string,
        imageUrl: string,
        assetId: string,
        altText?: string,
        mimeType?: string
      },
      coverUrl?: string,
      cover?: {
        filename: string,
        imageUrl: string,
        assetId: string,
        altText?: string,
        mimeType?: string
      },
      exampleImages?: {
        filename: string,
        imageUrl: string,
        assetId: string,
        altText?: string,
        mimeType?: string
      }[],
      agentImages?: {
        filename: string,
        imageUrl: string,
        assetId: string,
        altText?: string,
        mimeType?: string
      }[],
      name: string,
      description: string,
      shortDescription: string,
      agentShortDescription?: string,
      agentDescription?: string,
      supportEmail?: string,
      termsOfServiceUrl?: string,
      privacyPolicyUrl?: string,
      categories: {
        categoryId: string,
        categoryName: string,
        categorySlug?: string
      }[],
      makers: {
        name: string,
        pictureLink?: string,
        slug?: string,
        jobTitle?: string,
        employer?: string,
        description?: string
      }[],
      certified?: boolean,
      certifiedAgent?: boolean,
      minimumFeatureSet?: Basic | Pro | Team | Enterprise,
      unrestrictedFeatureSet?: Basic | Pro | Team | Enterprise,
      externalMetadataUrl: string,
      standardPackPlan?: {
        packPlanId: string,
        packId: number,
        pricing: {
          type: Free
        } | {
          type: MonthlyDocMaker,
          amount: number,
          currency: USD
        },
        createdAt: string
      },
      bundledPackPlan?: {
        packPlanId: string,
        packId: number,
        pricing: {
          type: BundledWithTier,
          minimumFeatureSet: Pro | Team | Enterprise
        },
        createdAt: string
      },
      sourceCodeVisibility?: private | shared,
      sdkVersion: string,
      packCategoryType: connector | agent | customAgent
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Logs

### getDetails

`packLogs.getDetails`

Get the details of a Pack ingestion log entry

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packLogs.getDetails({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `tenantId` | `string` | Yes | ID of the tenant. |
| `rootIngestionId` | `string` | Yes | ID of the root ingestion. |
| `logId` | `string` | Yes | The id of the log to retrieve. |
| `detailsKey` | `string` | Yes | The key of the details to retrieve. |

**Output:** `object`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      type: fetcher,
      request: string,
      response?: string
    } | {
      type: invocation,
      result?: {
        stringVal: string,
        int64Val: number,
        doubleVal: number,
        objectVal: string,
        boolVal: boolean,
        dateVal: number
      },
      resultDetail?: string,
      continuationJson?: string,
      completionJson?: string,
      deletedItemIdsJson?: string,
      permissionsContextJson?: string
    } | {
      type: agentRuntime,
      input?: string,
      output?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`packLogs.list`

List the execution logs of a Pack in a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packLogs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `logTypes` | `custom \| fetcher \| invocation \| internal \| auth \| ingestionLifecycle \| ingestionDebug \| agentRuntime \| mcp[]` | No | Only return logs of the given types. |
| `beforeTimestamp` | `string` | No | Only return logs before the given time (non-inclusive). |
| `afterTimestamp` | `string` | No | Only return logs after the given time (non-inclusive). |
| `order` | `asc \| desc` | No | Specifies if the logs will be returned in time desc or asc. Default is desc. |
| `q` | `string` | No | A search query that follows Lucene syntax. |
| `requestIds` | `string[]` | No | Only return logs matching provided request IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    (
      {
        type: custom,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: invocation,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        cacheHit?: boolean,
        duration?: number,
        error?: {
          message: string,
          stack?: string
        }
      } | {
        type: fetcher,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        requestSizeBytes?: number,
        responseCode?: number,
        responseSizeBytes?: number,
        method?: GET | POST | PUT | DELETE | PATCH | HEAD,
        baseUrl?: string,
        cacheHit?: boolean,
        duration?: number
      } | {
        type: internal,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: auth,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        path: string,
        errorMessage?: string,
        errorStack?: string
      } | {
        type: ingestionLifecycle,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: ingestionDebug,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: agentRuntime,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        turnType: string,
        durationMs?: number,
        name?: string,
        model?: string,
        tokenUsage?: string,
        instructions?: string,
        fromAgent?: string,
        toAgent?: string
      } | {
        type: mcp,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message?: string,
        error?: {
          message: string,
          stack?: string
        }
      }
    )[]
    ```
  </Accordion>
</AccordionGroup>

***

### listGrouped

`packLogs.listGrouped`

List the execution logs of a Pack in a doc grouped by invocation

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packLogs.listGrouped({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `beforeTimestamp` | `string` | No | Only return logs before the given time (non-inclusive). |
| `afterTimestamp` | `string` | No | Only return logs after the given time (non-inclusive). |
| `order` | `asc \| desc` | No | Specifies if the logs will be returned in time desc or asc. Default is desc. |
| `q` | `string` | No | A search query that follows Lucene syntax. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |
| `incompleteRelatedLogs` | `boolean` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    (
      {
        type: invocation,
        invocationLog: {
          type: invocation,
          context: {
            docId: string,
            packId: string,
            packVersion: string,
            formulaName: string,
            userId: string,
            connectionId: string,
            connectionName?: string,
            requestId: string,
            requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
            createdAt: string,
            logId: string,
            docObjectId?: string,
            docRowId?: string,
            docColumnId?: string,
            isSyncTable?: boolean,
            isContinuedSyncTable?: boolean,
            autocompleteParameterName?: string,
            invocationSource?: string,
            detailsKey: string,
            ingestionChildExecutionIndex?: number,
            ingestionId?: string,
            rootIngestionId?: string,
            ingestionExecutionId?: string,
            ingestionStage?: string,
            ingestionParentStage?: string,
            ingestionExecutionAttempt?: number,
            ingestionParentItemId?: string,
            ingestionProcessId?: string,
            additionalMetadata?: {
            },
            agentSessionId?: string,
            agentInstanceId?: string,
            executingAgentInstanceId?: string
          },
          cacheHit?: boolean,
          duration?: number,
          error?: {
            message: string,
            stack?: string
          }
        },
        relatedLogs: (
          {
            type: custom,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: invocation,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            cacheHit?: boolean,
            duration?: number,
            error?: {
              message: string,
              stack?: string
            }
          } | {
            type: fetcher,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            requestSizeBytes?: number,
            responseCode?: number,
            responseSizeBytes?: number,
            method?: GET | POST | PUT | DELETE | PATCH | HEAD,
            baseUrl?: string,
            cacheHit?: boolean,
            duration?: number
          } | {
            type: internal,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: auth,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            path: string,
            errorMessage?: string,
            errorStack?: string
          } | {
            type: ingestionLifecycle,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: ingestionDebug,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: agentRuntime,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            turnType: string,
            durationMs?: number,
            name?: string,
            model?: string,
            tokenUsage?: string,
            instructions?: string,
            fromAgent?: string,
            toAgent?: string
          } | {
            type: mcp,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message?: string,
            error?: {
              message: string,
              stack?: string
            }
          }
        )[]
      } | {
        type: auth,
        authLog: {
          type: auth,
          context: {
            docId: string,
            packId: string,
            packVersion: string,
            formulaName: string,
            userId: string,
            connectionId: string,
            connectionName?: string,
            requestId: string,
            requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
            createdAt: string,
            logId: string,
            docObjectId?: string,
            docRowId?: string,
            docColumnId?: string,
            isSyncTable?: boolean,
            isContinuedSyncTable?: boolean,
            autocompleteParameterName?: string,
            invocationSource?: string,
            detailsKey: string,
            ingestionChildExecutionIndex?: number,
            ingestionId?: string,
            rootIngestionId?: string,
            ingestionExecutionId?: string,
            ingestionStage?: string,
            ingestionParentStage?: string,
            ingestionExecutionAttempt?: number,
            ingestionParentItemId?: string,
            ingestionProcessId?: string,
            additionalMetadata?: {
            },
            agentSessionId?: string,
            agentInstanceId?: string,
            executingAgentInstanceId?: string
          },
          path: string,
          errorMessage?: string,
          errorStack?: string
        },
        relatedLogs: (
          {
            type: custom,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: invocation,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            cacheHit?: boolean,
            duration?: number,
            error?: {
              message: string,
              stack?: string
            }
          } | {
            type: fetcher,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            requestSizeBytes?: number,
            responseCode?: number,
            responseSizeBytes?: number,
            method?: GET | POST | PUT | DELETE | PATCH | HEAD,
            baseUrl?: string,
            cacheHit?: boolean,
            duration?: number
          } | {
            type: internal,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: auth,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            path: string,
            errorMessage?: string,
            errorStack?: string
          } | {
            type: ingestionLifecycle,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: ingestionDebug,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: agentRuntime,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            turnType: string,
            durationMs?: number,
            name?: string,
            model?: string,
            tokenUsage?: string,
            instructions?: string,
            fromAgent?: string,
            toAgent?: string
          } | {
            type: mcp,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message?: string,
            error?: {
              message: string,
              stack?: string
            }
          }
        )[]
      }
    )[]
    ```
  </Accordion>
</AccordionGroup>

***

### listGroupedIngestion

`packLogs.listGroupedIngestion`

List the logs of a Pack ingestion grouped by invocation

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packLogs.listGroupedIngestion({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `tenantId` | `string` | Yes | ID of the tenant. |
| `rootIngestionId` | `string` | Yes | ID of the root ingestion. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `ingestionExecutionId` | `string` | No | ID of the ingestion execution. |
| `beforeTimestamp` | `string` | No | Only return logs before the given time (non-inclusive). |
| `afterTimestamp` | `string` | No | Only return logs after the given time (non-inclusive). |
| `order` | `asc \| desc` | No | Specifies if the logs will be returned in time desc or asc. Default is desc. |
| `q` | `string` | No | A search query that follows Lucene syntax. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |
| `incompleteRelatedLogs` | `boolean` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    (
      {
        type: invocation,
        invocationLog: {
          type: invocation,
          context: {
            docId: string,
            packId: string,
            packVersion: string,
            formulaName: string,
            userId: string,
            connectionId: string,
            connectionName?: string,
            requestId: string,
            requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
            createdAt: string,
            logId: string,
            docObjectId?: string,
            docRowId?: string,
            docColumnId?: string,
            isSyncTable?: boolean,
            isContinuedSyncTable?: boolean,
            autocompleteParameterName?: string,
            invocationSource?: string,
            detailsKey: string,
            ingestionChildExecutionIndex?: number,
            ingestionId?: string,
            rootIngestionId?: string,
            ingestionExecutionId?: string,
            ingestionStage?: string,
            ingestionParentStage?: string,
            ingestionExecutionAttempt?: number,
            ingestionParentItemId?: string,
            ingestionProcessId?: string,
            additionalMetadata?: {
            },
            agentSessionId?: string,
            agentInstanceId?: string,
            executingAgentInstanceId?: string
          },
          cacheHit?: boolean,
          duration?: number,
          error?: {
            message: string,
            stack?: string
          }
        },
        relatedLogs: (
          {
            type: custom,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: invocation,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            cacheHit?: boolean,
            duration?: number,
            error?: {
              message: string,
              stack?: string
            }
          } | {
            type: fetcher,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            requestSizeBytes?: number,
            responseCode?: number,
            responseSizeBytes?: number,
            method?: GET | POST | PUT | DELETE | PATCH | HEAD,
            baseUrl?: string,
            cacheHit?: boolean,
            duration?: number
          } | {
            type: internal,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: auth,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            path: string,
            errorMessage?: string,
            errorStack?: string
          } | {
            type: ingestionLifecycle,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: ingestionDebug,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: agentRuntime,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            turnType: string,
            durationMs?: number,
            name?: string,
            model?: string,
            tokenUsage?: string,
            instructions?: string,
            fromAgent?: string,
            toAgent?: string
          } | {
            type: mcp,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message?: string,
            error?: {
              message: string,
              stack?: string
            }
          }
        )[]
      } | {
        type: auth,
        authLog: {
          type: auth,
          context: {
            docId: string,
            packId: string,
            packVersion: string,
            formulaName: string,
            userId: string,
            connectionId: string,
            connectionName?: string,
            requestId: string,
            requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
            createdAt: string,
            logId: string,
            docObjectId?: string,
            docRowId?: string,
            docColumnId?: string,
            isSyncTable?: boolean,
            isContinuedSyncTable?: boolean,
            autocompleteParameterName?: string,
            invocationSource?: string,
            detailsKey: string,
            ingestionChildExecutionIndex?: number,
            ingestionId?: string,
            rootIngestionId?: string,
            ingestionExecutionId?: string,
            ingestionStage?: string,
            ingestionParentStage?: string,
            ingestionExecutionAttempt?: number,
            ingestionParentItemId?: string,
            ingestionProcessId?: string,
            additionalMetadata?: {
            },
            agentSessionId?: string,
            agentInstanceId?: string,
            executingAgentInstanceId?: string
          },
          path: string,
          errorMessage?: string,
          errorStack?: string
        },
        relatedLogs: (
          {
            type: custom,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: invocation,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            cacheHit?: boolean,
            duration?: number,
            error?: {
              message: string,
              stack?: string
            }
          } | {
            type: fetcher,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            requestSizeBytes?: number,
            responseCode?: number,
            responseSizeBytes?: number,
            method?: GET | POST | PUT | DELETE | PATCH | HEAD,
            baseUrl?: string,
            cacheHit?: boolean,
            duration?: number
          } | {
            type: internal,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: auth,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            path: string,
            errorMessage?: string,
            errorStack?: string
          } | {
            type: ingestionLifecycle,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: ingestionDebug,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message: string,
            level: error | warn | info | debug | trace | "unknown"
          } | {
            type: agentRuntime,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            turnType: string,
            durationMs?: number,
            name?: string,
            model?: string,
            tokenUsage?: string,
            instructions?: string,
            fromAgent?: string,
            toAgent?: string
          } | {
            type: mcp,
            context: {
              docId: string,
              packId: string,
              packVersion: string,
              formulaName: string,
              userId: string,
              connectionId: string,
              connectionName?: string,
              requestId: string,
              requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
              createdAt: string,
              logId: string,
              docObjectId?: string,
              docRowId?: string,
              docColumnId?: string,
              isSyncTable?: boolean,
              isContinuedSyncTable?: boolean,
              autocompleteParameterName?: string,
              invocationSource?: string,
              detailsKey: string,
              ingestionChildExecutionIndex?: number,
              ingestionId?: string,
              rootIngestionId?: string,
              ingestionExecutionId?: string,
              ingestionStage?: string,
              ingestionParentStage?: string,
              ingestionExecutionAttempt?: number,
              ingestionParentItemId?: string,
              ingestionProcessId?: string,
              additionalMetadata?: {
              },
              agentSessionId?: string,
              agentInstanceId?: string,
              executingAgentInstanceId?: string
            },
            message?: string,
            error?: {
              message: string,
              stack?: string
            }
          }
        )[]
      }
    )[]
    ```
  </Accordion>
</AccordionGroup>

***

### listIngestion

`packLogs.listIngestion`

List the logs of a Pack ingestion

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packLogs.listIngestion({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `tenantId` | `string` | Yes | ID of the tenant. |
| `rootIngestionId` | `string` | Yes | ID of the root ingestion. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `logTypes` | `custom \| fetcher \| invocation \| internal \| auth \| ingestionLifecycle \| ingestionDebug \| agentRuntime \| mcp[]` | No | Only return logs of the given types. |
| `ingestionExecutionId` | `string` | No | ID of the ingestion execution. |
| `beforeTimestamp` | `string` | No | Only return logs before the given time (non-inclusive). |
| `afterTimestamp` | `string` | No | Only return logs after the given time (non-inclusive). |
| `ingestionStatus` | `QUEUED \| STARTED \| CANCELLED \| UP_FOR_RETRY \| COMPLETED \| FAILED` | No | Only fetch logs with the given ingestion status. This only works in combination with the onlyExecutionCompletions parameter. |
| `onlyExecutionCompletions` | `boolean` | No | Only fetch logs that represent the completion of a child execution. |
| `order` | `asc \| desc` | No | Specifies if the logs will be returned in time desc or asc. Default is desc. |
| `q` | `string` | No | A search query that follows Lucene syntax. |
| `requestIds` | `string[]` | No | Only return logs matching provided request IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    (
      {
        type: custom,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: invocation,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        cacheHit?: boolean,
        duration?: number,
        error?: {
          message: string,
          stack?: string
        }
      } | {
        type: fetcher,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        requestSizeBytes?: number,
        responseCode?: number,
        responseSizeBytes?: number,
        method?: GET | POST | PUT | DELETE | PATCH | HEAD,
        baseUrl?: string,
        cacheHit?: boolean,
        duration?: number
      } | {
        type: internal,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: auth,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        path: string,
        errorMessage?: string,
        errorStack?: string
      } | {
        type: ingestionLifecycle,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: ingestionDebug,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message: string,
        level: error | warn | info | debug | trace | "unknown"
      } | {
        type: agentRuntime,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        turnType: string,
        durationMs?: number,
        name?: string,
        model?: string,
        tokenUsage?: string,
        instructions?: string,
        fromAgent?: string,
        toAgent?: string
      } | {
        type: mcp,
        context: {
          docId: string,
          packId: string,
          packVersion: string,
          formulaName: string,
          userId: string,
          connectionId: string,
          connectionName?: string,
          requestId: string,
          requestType: "unknown" | connectionNameMetadataRequest | parameterAutocompleteMetadataRequest | postAuthSetupMetadataRequest | propertyOptionsMetadataRequest | getSyncTableSchemaMetadataRequest | getDynamicSyncTableNameMetadataRequest | listSyncTableDynamicUrlsMetadataRequest | searchSyncTableDynamicUrlsMetadataRequest | getDynamicSyncTableDisplayUrlMetadataRequest | getIdentifiersForConnectionRequest | invokeFormulaRequest | invokeSyncFormulaRequest | invokeSyncUpdateFormulaRequest | invokeExecuteGetPermissionsRequest | validateParametersMetadataRequest | mcp,
          createdAt: string,
          logId: string,
          docObjectId?: string,
          docRowId?: string,
          docColumnId?: string,
          isSyncTable?: boolean,
          isContinuedSyncTable?: boolean,
          autocompleteParameterName?: string,
          invocationSource?: string,
          detailsKey: string,
          ingestionChildExecutionIndex?: number,
          ingestionId?: string,
          rootIngestionId?: string,
          ingestionExecutionId?: string,
          ingestionStage?: string,
          ingestionParentStage?: string,
          ingestionExecutionAttempt?: number,
          ingestionParentItemId?: string,
          ingestionProcessId?: string,
          additionalMetadata?: {
          },
          agentSessionId?: string,
          agentInstanceId?: string,
          executingAgentInstanceId?: string
        },
        message?: string,
        error?: {
          message: string,
          stack?: string
        }
      }
    )[]
    ```
  </Accordion>
</AccordionGroup>

***

### listIngestionExecutions

`packLogs.listIngestionExecutions`

List the batch executions of a Pack ingestion

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packLogs.listIngestionExecutions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `tenantId` | `string` | Yes | ID of the tenant. |
| `rootIngestionId` | `string` | Yes | ID of the root ingestion. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `datasource` | `string` | No | Only show batch executions for this datasource (sync table). |
| `executionType` | `FULL \| INCREMENTAL` | No | Only show batch executions with this execution type. |
| `includeDeletedIngestions` | `boolean` | No | Include deleted ingestion executions in the response |
| `ingestionExecutionId` | `string` | No | Only retrieve this single batch execution. |
| `ingestionId` | `string` | No | Only show batch executions for this sync table ingestion. |
| `ingestionStatus` | `QUEUED \| STARTED \| CANCELLED \| UP_FOR_RETRY \| COMPLETED \| FAILED` | No | Only show batch executions with this status. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      completionTimestamp: number,
      creationTimestamp: number,
      dynamicLabel?: string,
      dynamicUrl?: string,
      executionType: FULL | INCREMENTAL,
      fullExecutionId: string,
      ingestionExecutionId: string,
      ingestionId: string,
      ingestionName: string,
      ingestionStatusCounts?: Record<string, number>,
      lastFinishedFullWorkflowExecutionId?: string,
      lastFinishedIncrementalWorkflowExecutionId?: string,
      latestFullWorkflowExecutionId?: string,
      latestIncrementalWorkflowExecutionId?: string,
      latestIngestionSequenceId?: string,
      liveIngestionSequenceId?: string,
      parentSyncTableIngestionId?: string,
      startTimestamp: number,
      totalRowCount?: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Makers

### add

`packMakers.add`

Add a maker to a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packMakers.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `loginId` | `string` | Yes | The email of the Pack maker. |

**Output:** *empty object*

***

### delete

`packMakers.delete`

Remove a maker from a Pack

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.packMakers.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `loginId` | `string` | Yes | Email of a Coda user. |

**Output:** *empty object*

***

### list

`packMakers.list`

List the makers of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packMakers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `makers` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="makers full type">
    ```ts theme={null}
    {
      name: string,
      pictureLink?: string,
      slug?: string,
      jobTitle?: string,
      employer?: string,
      description?: string,
      loginId: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Permissions

### add

`packPermissions.add`

Grant a principal access to a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packPermissions.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `principal` | `object` | Yes | Metadata about a Pack principal. |
| `access` | `none \| view \| test \| edit \| admin` | Yes | — |

<AccordionGroup>
  <Accordion title="principal full type">
    ```ts theme={null}
    {
      type: user,
      email: string
    } | {
      type: workspace,
      workspaceId: string
    } | {
      type: worldwide
    } | {
      type: nomosOrganization,
      nomosOrganizationId: string
    } | {
      type: group,
      groupId: string,
      groupName?: string
    } | {
      type: grammarlyInstitution,
      grammarlyInstitutionId: number
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

***

### delete

`packPermissions.delete`

Remove a permission from a Pack

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.packPermissions.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `permissionId` | `string` | Yes | ID of a permission on a doc. |

**Output:** *empty object*

***

### list

`packPermissions.list`

List the permissions of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packPermissions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `permissionUsers` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      principal: {
        type: user,
        email: string
      } | {
        type: workspace,
        workspaceId: string
      } | {
        type: worldwide
      } | {
        type: nomosOrganization,
        nomosOrganizationId: string
      } | {
        type: group,
        groupId: string,
        groupName?: string
      } | {
        type: grammarlyInstitution,
        grammarlyInstitutionId: number
      },
      access: none | view | test | edit | admin
    }[]
    ```
  </Accordion>

  <Accordion title="permissionUsers full type">
    ```ts theme={null}
    {
      name: string,
      loginId: string,
      type: user,
      pictureLink?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Releases

### create

`packReleases.create`

Release a Pack version

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packReleases.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packVersion` | `string` | Yes | Which semantic Pack version that the release will be created on. |
| `releaseNotes` | `string` | No | Developers notes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | — |
| `releaseNotes` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `releaseId` | `number` | Yes | — |
| `packVersion` | `string` | Yes | — |
| `sdkVersion` | `string` | Yes | — |

***

### list

`packReleases.list`

List the releases of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packReleases.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      packId: number,
      releaseNotes: string,
      createdAt: string,
      releaseId: number,
      packVersion: string,
      sdkVersion: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`packReleases.update`

Update the release notes of a Pack release

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packReleases.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packReleaseId` | `number` | Yes | ID of a Pack release |
| `releaseNotes` | `string` | No | Notes about key features or changes in this release that the Pack maker wants to communicate to users. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | — |
| `releaseNotes` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `releaseId` | `number` | Yes | — |
| `packVersion` | `string` | Yes | — |
| `sdkVersion` | `string` | Yes | — |

***

## Packs

### create

`packs.create`

Create a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packs.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | No | The parent workspace for the Pack. If unspecified, the user's default workspace will be used. |
| `name` | `string` | No | The name for the Pack. |
| `description` | `string` | No | A brief description of the Pack. |
| `sourcePackId` | `number` | No | The ID of the new Pack's source, if this new Pack was forked. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | — |

***

### delete

`packs.delete`

Delete a Pack

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.packs.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output:** *empty object*

***

### get

`packs.get`

Get a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packs.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | — |
| `logoUrl` | `string` | No | — |
| `coverUrl` | `string` | No | — |
| `exampleImages` | `object[]` | No | — |
| `agentImages` | `object[]` | No | — |
| `workspaceId` | `string` | Yes | — |
| `categories` | `object[]` | Yes | — |
| `certified` | `boolean` | No | — |
| `certifiedAgent` | `boolean` | No | — |
| `sourceCodeVisibility` | `private \| shared` | No | — |
| `packEntrypoints` | `go \| docs[]` | No | — |
| `verifiedVersion` | `string` | No | — |
| `name` | `string` | Yes | — |
| `description` | `string` | Yes | — |
| `shortDescription` | `string` | Yes | — |
| `agentShortDescription` | `string` | No | — |
| `agentDescription` | `string` | No | — |
| `supportEmail` | `string` | No | — |
| `termsOfServiceUrl` | `string` | No | — |
| `privacyPolicyUrl` | `string` | No | — |
| `overallRateLimit` | `object` | No | — |
| `perConnectionRateLimit` | `object` | No | — |
| `featuredDocStatus` | `docInaccessibleOrDoesNotExist \| invalidPublishedDocUrl` | No | — |
| `additionalInformation` | `object` | No | — |

<AccordionGroup>
  <Accordion title="exampleImages full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="agentImages full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="categories full type">
    ```ts theme={null}
    {
      categoryId: string,
      categoryName: string,
      categorySlug?: string
    }[]
    ```
  </Accordion>

  <Accordion title="overallRateLimit full type">
    ```ts theme={null}
    {
      intervalSeconds: number,
      operationsPerInterval: number
    }
    ```
  </Accordion>

  <Accordion title="perConnectionRateLimit full type">
    ```ts theme={null}
    {
      intervalSeconds: number,
      operationsPerInterval: number
    }
    ```
  </Accordion>

  <Accordion title="additionalInformation full type">
    ```ts theme={null}
    {
      privacyCollectsPersonalInfo?: boolean | null,
      privacyPersonalInfoCategories?: string[] | null,
      privacyDataUsagePurposes?: string[] | null,
      privacyDataCollectedBy?: string[] | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getConfigurationSchema

`packs.getConfigurationSchema`

Get the JSON Schema of the configuration of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packs.getConfigurationSchema({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |

**Output:** `object`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    Record<string, string | number | boolean | null | object | array>
    ```
  </Accordion>
</AccordionGroup>

***

### list

`packs.list`

List Packs the user can access

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packs.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accessType` | `none \| view \| test \| edit \| admin` | No | Deprecated, use accessTypes instead. Filter to only return the Packs for which the current user has this access type |
| `accessTypes` | `none \| view \| test \| edit \| admin[]` | No | Filter to only return the Packs for which the current user has these access types. |
| `sortBy` | `title \| createdAt \| updatedAt` | No | The sort order of the Packs returned. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `direction` | `ascending \| descending` | No | Direction to sort results in. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `onlyWorkspaceId` | `string` | No | Use only this workspace (not all of a user's workspaces) to check for Packs shared via workspace ACL. |
| `parentWorkspaceIds` | `string[]` | No | Filter to only Packs whose parent workspace is one of the given IDs. |
| `excludePublicPacks` | `boolean` | No | Only get Packs shared with users/workspaces, not publicly. |
| `packEntrypoint` | `go \| docs` | No | Entrypoint for which this Pack call is being made. Used to filter non relevant Packs |
| `excludePackCategories` | `connector \| agent \| customAgent[]` | No | Exclude Packs of one or more category types. Categories not listed stay visible. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: number,
      logoUrl?: string,
      coverUrl?: string,
      exampleImages?: {
        filename: string,
        imageUrl: string,
        assetId: string,
        altText?: string,
        mimeType?: string
      }[],
      agentImages?: {
        filename: string,
        imageUrl: string,
        assetId: string,
        altText?: string,
        mimeType?: string
      }[],
      workspaceId: string,
      categories: {
        categoryId: string,
        categoryName: string,
        categorySlug?: string
      }[],
      certified?: boolean,
      certifiedAgent?: boolean,
      sourceCodeVisibility?: private | shared,
      packEntrypoints?: go | docs[],
      verifiedVersion?: string,
      name: string,
      description: string,
      shortDescription: string,
      agentShortDescription?: string,
      agentDescription?: string,
      supportEmail?: string,
      termsOfServiceUrl?: string,
      privacyPolicyUrl?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`packs.update`

Update the metadata of a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packs.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `overallRateLimit` | `object` | No | Rate limit in Pack settings. |
| `perConnectionRateLimit` | `object` | No | Rate limit in Pack settings. |
| `logo` | `object` | No | Information about an image file for an update Pack request. |
| `cover` | `object` | No | Information about an image file for an update Pack request. |
| `exampleImages` | `object[]` | No | The example images for the Pack. |
| `agentImages` | `object[]` | No | The agent images for the Pack. |
| `sourceCodeVisibility` | `private \| shared` | No | Visibility of a Pack's source code. |
| `packEntrypoints` | `go \| docs[]` | No | Pack entrypoints where this Pack is available |
| `name` | `string` | No | The name of the Pack. |
| `description` | `string` | No | The full description of the Pack. |
| `shortDescription` | `string` | No | A short version of the description of the Pack. |
| `agentShortDescription` | `string` | No | A short description for the Pack as an agent. |
| `agentDescription` | `string` | No | A full description for the Pack as an agent. |
| `supportEmail` | `string` | No | A contact email for the Pack. |
| `termsOfServiceUrl` | `string` | No | A Terms of Service URL for the Pack. |
| `privacyPolicyUrl` | `string` | No | A Privacy Policy URL for the Pack. |

<AccordionGroup>
  <Accordion title="overallRateLimit full type">
    ```ts theme={null}
    {
      intervalSeconds: number,
      operationsPerInterval: number
    }
    ```
  </Accordion>

  <Accordion title="perConnectionRateLimit full type">
    ```ts theme={null}
    {
      intervalSeconds: number,
      operationsPerInterval: number
    }
    ```
  </Accordion>

  <Accordion title="logo full type">
    ```ts theme={null}
    {
      assetId: string,
      filename: string,
      mimeType?: string
    }
    ```
  </Accordion>

  <Accordion title="cover full type">
    ```ts theme={null}
    {
      assetId: string,
      filename: string,
      mimeType?: string
    }
    ```
  </Accordion>

  <Accordion title="exampleImages full type">
    ```ts theme={null}
    {
      assetId: string,
      filename: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="agentImages full type">
    ```ts theme={null}
    {
      assetId: string,
      filename: string,
      mimeType?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | — |
| `logoUrl` | `string` | No | — |
| `coverUrl` | `string` | No | — |
| `exampleImages` | `object[]` | No | — |
| `agentImages` | `object[]` | No | — |
| `workspaceId` | `string` | Yes | — |
| `categories` | `object[]` | Yes | — |
| `certified` | `boolean` | No | — |
| `certifiedAgent` | `boolean` | No | — |
| `sourceCodeVisibility` | `private \| shared` | No | — |
| `packEntrypoints` | `go \| docs[]` | No | — |
| `verifiedVersion` | `string` | No | — |
| `name` | `string` | Yes | — |
| `description` | `string` | Yes | — |
| `shortDescription` | `string` | Yes | — |
| `agentShortDescription` | `string` | No | — |
| `agentDescription` | `string` | No | — |
| `supportEmail` | `string` | No | — |
| `termsOfServiceUrl` | `string` | No | — |
| `privacyPolicyUrl` | `string` | No | — |
| `overallRateLimit` | `object` | No | — |
| `perConnectionRateLimit` | `object` | No | — |
| `featuredDocStatus` | `docInaccessibleOrDoesNotExist \| invalidPublishedDocUrl` | No | — |
| `additionalInformation` | `object` | No | — |

<AccordionGroup>
  <Accordion title="exampleImages full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="agentImages full type">
    ```ts theme={null}
    {
      filename: string,
      imageUrl: string,
      assetId: string,
      altText?: string,
      mimeType?: string
    }[]
    ```
  </Accordion>

  <Accordion title="categories full type">
    ```ts theme={null}
    {
      categoryId: string,
      categoryName: string,
      categorySlug?: string
    }[]
    ```
  </Accordion>

  <Accordion title="overallRateLimit full type">
    ```ts theme={null}
    {
      intervalSeconds: number,
      operationsPerInterval: number
    }
    ```
  </Accordion>

  <Accordion title="perConnectionRateLimit full type">
    ```ts theme={null}
    {
      intervalSeconds: number,
      operationsPerInterval: number
    }
    ```
  </Accordion>

  <Accordion title="additionalInformation full type">
    ```ts theme={null}
    {
      privacyCollectsPersonalInfo?: boolean | null,
      privacyPersonalInfoCategories?: string[] | null,
      privacyDataUsagePurposes?: string[] | null,
      privacyDataCollectedBy?: string[] | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Pack Versions

### getDiff

`packVersions.getDiff`

Get the differences between two Pack versions

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packVersions.getDiff({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `basePackVersion` | `string` | Yes | Semantic version of the previous Pack version. |
| `targetPackVersion` | `string` | Yes | Semantic version of the new Pack version. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `findings` | `string[]` | Yes | — |
| `findingDetails` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="findingDetails full type">
    ```ts theme={null}
    {
      finding: string,
      path: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### getNext

`packVersions.getNext`

Get the next valid version number for a Pack

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packVersions.getNext({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `proposedMetadata` | `string` | No | The metadata for the next version of the Pack. |
| `sdkVersion` | `string` | No | The SDK version the metadata was built on. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextVersion` | `string` | Yes | — |
| `findings` | `string[]` | Yes | — |
| `findingDetails` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="findingDetails full type">
    ```ts theme={null}
    {
      finding: string,
      path: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### getSourceCode

`packVersions.getSourceCode`

Get download URLs for the source code of a Pack version

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packVersions.getSourceCode({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packVersion` | `string` | Yes | Semantic version of a Pack |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `files` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="files full type">
    ```ts theme={null}
    {
      filename: string,
      url: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### list

`packVersions.list`

List the versions of a Pack

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.packVersions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `creationUsers` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      packId: number,
      buildNotes: string,
      createdAt: string,
      creationUserLoginId: string,
      releaseId?: number,
      packVersion: string,
      sdkVersion?: string,
      source?: web | cli
    }[]
    ```
  </Accordion>

  <Accordion title="creationUsers full type">
    ```ts theme={null}
    {
      name: string,
      loginId: string,
      type: user,
      pictureLink?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### register

`packVersions.register`

Register a new Pack version and get an upload URL for its bundle

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packVersions.register({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packVersion` | `string` | Yes | Semantic version of a Pack |
| `bundleHash` | `string` | Yes | The SHA-256 hash of the file to be uploaded. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uploadUrl` | `string` | Yes | — |
| `headers` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="headers full type">
    ```ts theme={null}
    Record<string, string>
    ```
  </Accordion>
</AccordionGroup>

***

### sourceCodeUploadComplete

`packVersions.sourceCodeUploadComplete`

Mark the upload of Pack source code as complete

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packVersions.sourceCodeUploadComplete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packVersion` | `string` | Yes | Semantic version of a Pack |
| `filename` | `string` | Yes | — |
| `codeHash` | `string` | Yes | A SHA-256 hash of the source code used to identify duplicate uploads. |

**Output**

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

***

### uploadComplete

`packVersions.uploadComplete`

Mark the upload of a Pack version bundle as complete

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packVersions.uploadComplete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `packVersion` | `string` | Yes | Semantic version of a Pack |
| `notes` | `string` | No | Developer notes of the new Pack version. |
| `source` | `web \| cli` | No | — |
| `allowOlderSdkVersion` | `boolean` | No | Bypass the Coda protection against SDK version regression when multiple makers build versions. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `deprecationWarnings` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="deprecationWarnings full type">
    ```ts theme={null}
    {
      path: string,
      message: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### uploadSourceCode

`packVersions.uploadSourceCode`

Get a signed URL to upload the source code of a Pack version

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.packVersions.uploadSourceCode({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `packId` | `number` | Yes | ID of a Pack |
| `payloadHash` | `string` | Yes | The SHA-256 hash of the image to be uploaded. |
| `filename` | `string` | Yes | — |
| `packVersion` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uploadUrl` | `string` | Yes | — |
| `uploadedPathName` | `string` | Yes | — |
| `headers` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="headers full type">
    ```ts theme={null}
    Record<string, string>
    ```
  </Accordion>
</AccordionGroup>

***

## Pages

### beginExport

`pages.beginExport`

Start an asynchronous export of page content

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.pages.beginExport({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
| `outputFormat` | `html \| markdown` | Yes | Supported output content formats that can be requested for getting content for an existing page. |

**Output**

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

***

### create

`pages.create`

Create a new page in a doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.pages.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `name` | `string` | No | Name of the page. |
| `subtitle` | `string` | No | Subtitle of the page. |
| `iconName` | `string` | No | Name of the icon. |
| `imageUrl` | `string` | No | Url of the cover image to use. |
| `parentPageId` | `string` | No | The ID of this new page's parent, if creating a subpage. |
| `pageContent` | `object` | No | Content that can be added to a page at creation time, either text (or rich text) or a URL to create a full-page embed. |

<AccordionGroup>
  <Accordion title="pageContent full type">
    ```ts theme={null}
    {
      type: canvas,
      canvasContent: {
        format: html | markdown,
        content: string
      }
    } | {
      type: embed,
      url: string,
      renderMethod?: compatibility | standard
    } | {
      type: syncPage,
      mode: page,
      includeSubpages: boolean,
      sourcePageId: string,
      sourceDocId: string
    } | {
      type: syncPage,
      mode: document,
      sourceDocId: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

***

### delete

`pages.delete`

Delete a page

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.pages.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |

**Output**

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

***

### deleteContent

`pages.deleteContent`

Delete content elements from a page

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.pages.deleteContent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
| `elementIds` | `string[]` | No | IDs of the elements to delete from the page. If omitted or empty, all content will be deleted. |

**Output**

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

***

### get

`pages.get`

Get details about a page

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.pages.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `page` | Yes | — |
| `href` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `subtitle` | `string` | No | — |
| `icon` | `object` | No | — |
| `image` | `object` | No | — |
| `contentType` | `canvas \| embed \| syncPage` | Yes | — |
| `isHidden` | `boolean` | Yes | — |
| `isEffectivelyHidden` | `boolean` | Yes | — |
| `parent` | `object` | No | — |
| `children` | `object[]` | Yes | — |
| `authors` | `object[]` | No | — |
| `createdAt` | `string` | No | — |
| `createdBy` | `object` | No | — |
| `updatedAt` | `string` | No | — |
| `updatedBy` | `object` | No | — |

<AccordionGroup>
  <Accordion title="icon full type">
    ```ts theme={null}
    {
      name: string,
      type: string,
      browserLink: string
    }
    ```
  </Accordion>

  <Accordion title="image full type">
    ```ts theme={null}
    {
      browserLink: string,
      type?: string,
      width?: number,
      height?: number
    }
    ```
  </Accordion>

  <Accordion title="parent full type">
    ```ts theme={null}
    {
      id: string,
      type: page,
      href: string,
      browserLink: string,
      name: string
    }
    ```
  </Accordion>

  <Accordion title="children full type">
    ```ts theme={null}
    {
      id: string,
      type: page,
      href: string,
      browserLink: string,
      name: string
    }[]
    ```
  </Accordion>

  <Accordion title="authors full type">
    ```ts theme={null}
    {
      @context: string,
      @type: Person,
      additionalType?: string,
      name: string,
      email?: string
    }[]
    ```
  </Accordion>

  <Accordion title="createdBy full type">
    ```ts theme={null}
    {
      @context: string,
      @type: Person,
      additionalType?: string,
      name: string,
      email?: string
    }
    ```
  </Accordion>

  <Accordion title="updatedBy full type">
    ```ts theme={null}
    {
      @context: string,
      @type: Person,
      additionalType?: string,
      name: string,
      email?: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getExportStatus

`pages.getExportStatus`

Check the status of a page content export

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.pages.getExportStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
| `requestId` | `string` | Yes | ID of the request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `status` | `string` | Yes | — |
| `href` | `string` | Yes | — |
| `downloadLink` | `string` | No | — |
| `error` | `string` | No | — |

***

### list

`pages.list`

List pages in a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.pages.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: page,
      href: string,
      browserLink: string,
      name: string,
      subtitle?: string,
      icon?: {
        name: string,
        type: string,
        browserLink: string
      },
      image?: {
        browserLink: string,
        type?: string,
        width?: number,
        height?: number
      },
      contentType: canvas | embed | syncPage,
      isHidden: boolean,
      isEffectivelyHidden: boolean,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      },
      children: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }[],
      authors?: {
        @context: string,
        @type: Person,
        additionalType?: string,
        name: string,
        email?: string
      }[],
      createdAt?: string,
      createdBy?: {
        @context: string,
        @type: Person,
        additionalType?: string,
        name: string,
        email?: string
      },
      updatedAt?: string,
      updatedBy?: {
        @context: string,
        @type: Person,
        additionalType?: string,
        name: string,
        email?: string
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### listContent

`pages.listContent`

List the content elements of a page

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.pages.listContent({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
| `limit` | `number` | No | Maximum number of content items to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `contentFormat` | `plainText` | No | The format to return content in. Defaults to plainText. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: line,
      itemContent?: {
        style: blockQuote | bulletedList | checkboxList | code | collapsibleList | h1 | h2 | h3 | numberedList | paragraph | pullQuote,
        format: plainText,
        content: string,
        lineLevel?: number
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`pages.update`

Update the properties or content of a page

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.pages.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `pageIdOrName` | `string` | Yes | ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
| `name` | `string` | No | Name of the page. |
| `subtitle` | `string` | No | Subtitle of the page. |
| `iconName` | `string` | No | Name of the icon. |
| `imageUrl` | `string` | No | Url of the cover image to use. |
| `isHidden` | `boolean` | No | Whether the page is hidden or not. Note that for pages that cannot be hidden, like the sole top-level page in a doc, this will be ignored. |
| `contentUpdate` | `object` | No | — |

<AccordionGroup>
  <Accordion title="contentUpdate full type">
    ```ts theme={null}
    {
      insertionMode: append | prepend | replace,
      elementId?: string,
      canvasContent: {
        format: html | markdown,
        content: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

***

## Permissions

### add

`permissions.add`

Share a doc with a user, domain or anyone

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.permissions.add({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `access` | `readonly \| write \| comment` | Yes | Type of access (excluding none). |
| `principal` | `object` | Yes | Metadata about a principal to add to a doc. |
| `suppressEmail` | `boolean` | No | When true suppresses email notification |

<AccordionGroup>
  <Accordion title="principal full type">
    ```ts theme={null}
    {
      type: email,
      email: string
    } | {
      type: group,
      groupId: string
    } | {
      type: domain,
      domain: string
    } | {
      type: workspace,
      workspaceId: string
    } | {
      type: anyone
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** *empty object*

***

### delete

`permissions.delete`

Remove a sharing permission from a doc

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.permissions.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `permissionId` | `string` | Yes | ID of a permission on a doc. |

**Output:** *empty object*

***

### getAclSettings

`permissions.getAclSettings`

Get the access control settings of a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.permissions.getAclSettings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowEditorsToChangePermissions` | `boolean` | Yes | — |
| `allowCopying` | `boolean` | Yes | — |
| `allowViewersToRequestEditing` | `boolean` | Yes | — |

***

### getSharingMetadata

`permissions.getSharingMetadata`

Get sharing capabilities of the user for a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.permissions.getSharingMetadata({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `canShare` | `boolean` | Yes | — |
| `canShareWithWorkspace` | `boolean` | Yes | — |
| `canShareWithOrg` | `boolean` | Yes | — |
| `canCopy` | `boolean` | Yes | — |

***

### list

`permissions.list`

List the sharing permissions of a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.permissions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      principal: {
        type: email,
        email: string
      } | {
        type: group,
        groupId: string,
        groupName: string
      } | {
        type: domain,
        domain: string
      } | {
        type: workspace,
        workspaceId: string
      } | {
        type: anyone
      } | {
        type: internalAccess,
        internalAccessType: string
      },
      id: string,
      access: readonly | write | comment | none
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### searchPrincipals

`permissions.searchPrincipals`

Search users and groups a doc can be shared with

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.permissions.searchPrincipals({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `query` | `string` | No | Search term used to filter down results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[]` | Yes | — |
| `groups` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="users full type">
    ```ts theme={null}
    {
      name: string,
      loginId: string,
      type: user,
      pictureLink?: string
    }[]
    ```
  </Accordion>

  <Accordion title="groups full type">
    ```ts theme={null}
    {
      type: group,
      groupId: string,
      groupName: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### updateAclSettings

`permissions.updateAclSettings`

Update the access control settings of a doc

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.permissions.updateAclSettings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `allowEditorsToChangePermissions` | `boolean` | No | When true, allows editors to change doc permissions. When false, only doc owner can change doc permissions. |
| `allowCopying` | `boolean` | No | When true, allows doc viewers to copy the doc. |
| `allowViewersToRequestEditing` | `boolean` | No | When true, allows doc viewers to request editing permissions. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowEditorsToChangePermissions` | `boolean` | Yes | — |
| `allowCopying` | `boolean` | Yes | — |
| `allowViewersToRequestEditing` | `boolean` | Yes | — |

***

## Rows

### delete

`rows.delete`

Delete a row from a table

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.rows.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `rowIdOrName` | `string` | Yes | ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |

**Output**

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

***

### deleteMany

`rows.deleteMany`

Delete several rows from a table

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.coda.api.rows.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `rowIds` | `string[]` | Yes | Row IDs to delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | Yes | — |
| `rowIds` | `string[]` | Yes | — |

***

### get

`rows.get`

Get a row in a table

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.rows.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `rowIdOrName` | `string` | Yes | ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
| `useColumnNames` | `boolean` | No | Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors. |
| `valueFormat` | `simple \| simpleWithArrays \| rich` | No | The format that cell values are returned as. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `row` | Yes | — |
| `href` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `index` | `number` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |
| `values` | `object` | Yes | — |
| `parent` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="values full type">
    ```ts theme={null}
    Record<string, string | number | boolean | object | array>
    ```
  </Accordion>

  <Accordion title="parent full type">
    ```ts theme={null}
    {
      id: string,
      type: table,
      tableType: table | view | database,
      href: string,
      browserLink: string,
      name: string,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`rows.list`

List rows in a table

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.rows.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `query` | `string` | No | Query used to filter returned rows, specified as `<column_id_or_name>:<value>`. If you'd like to use a column name instead of an ID, you must quote it (e.g., `"My Column":123`). Also note that `value` is a JSON value; if you'd like to use a string, you must surround it in quotes (e.g., `"groceries"`). |
| `sortBy` | `createdAt \| natural \| updatedAt` | No | Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending. "UpdatedAt" sort ordering is the order of rows based upon when they were last updated. This does not include updates to calculated values. "Natural" sort ordering is the order that the rows appear in the table view in the application. This ordering is only meaningfully defined for rows that are visible (unfiltered). Because of this, using this sort order will imply visibleOnly=true, that is, to only return visible rows. If you pass sortBy=natural and visibleOnly=false explicitly, this will result in a Bad Request error as this condition cannot be satisfied. |
| `useColumnNames` | `boolean` | No | Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors. |
| `valueFormat` | `simple \| simpleWithArrays \| rich` | No | The format that cell values are returned as. |
| `visibleOnly` | `boolean` | No | If true, returns only visible rows and columns for the table. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `syncToken` | `string` | No | An opaque token returned from a previous call that can be used to return results that are relevant to the query since the call where the syncToken was generated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |
| `nextSyncToken` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: row,
      href: string,
      name: string,
      index: number,
      browserLink: string,
      createdAt: string,
      updatedAt: string,
      values: Record<string, string | number | boolean | object | array>
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### pushButton

`rows.pushButton`

Push a button column in a row

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.rows.pushButton({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `rowIdOrName` | `string` | Yes | ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
| `columnIdOrName` | `string` | Yes | ID or name of the column. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | Yes | — |
| `rowId` | `string` | Yes | — |
| `columnId` | `string` | Yes | — |

***

### update

`rows.update`

Update a row in a table

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.rows.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `rowIdOrName` | `string` | Yes | ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
| `disableParsing` | `boolean` | No | If true, the API will not attempt to parse the data in any way. |
| `row` | `object` | Yes | An edit made to a particular row. |

<AccordionGroup>
  <Accordion title="row full type">
    ```ts theme={null}
    {
      cells: {
        column: string,
        value: string | number | boolean | (
          string | number | boolean | (
            string | number | boolean
          )[]
        )[]
      }[]
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

***

### upsert

`rows.upsert`

Insert rows into a table, or update them when key columns match

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.rows.upsert({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `disableParsing` | `boolean` | No | If true, the API will not attempt to parse the data in any way. |
| `rows` | `object[]` | Yes | — |
| `keyColumns` | `string[]` | No | Optional column IDs, URLs, or names (fragile and discouraged), specifying columns to be used as upsert keys. |

<AccordionGroup>
  <Accordion title="rows full type">
    ```ts theme={null}
    {
      cells: {
        column: string,
        value: string | number | boolean | (
          string | number | boolean | (
            string | number | boolean
          )[]
        )[]
      }[]
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestId` | `string` | Yes | — |
| `addedRowIds` | `string[]` | No | — |

***

## Tables

### get

`tables.get`

Get details about a table or view

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.tables.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `tableIdOrName` | `string` | Yes | ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
| `useUpdatedTableLayouts` | `boolean` | No | Return "detail" and "form" for the `layout` field of detail and form layouts respectively (instead of "masterDetail" for both) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `type` | `table` | Yes | — |
| `tableType` | `table \| view \| database` | Yes | — |
| `href` | `string` | Yes | — |
| `browserLink` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `parent` | `object` | Yes | — |
| `parentTable` | `object` | No | — |
| `displayColumn` | `object` | Yes | — |
| `rowCount` | `number` | Yes | — |
| `sorts` | `object[]` | Yes | — |
| `layout` | `default \| areaChart \| barChart \| bubbleChart \| calendar \| card \| detail \| form \| ganttChart \| lineChart \| masterDetail \| pieChart \| scatterChart \| slide \| wordCloud` | Yes | — |
| `filter` | `object` | No | — |
| `createdAt` | `string` | Yes | — |
| `updatedAt` | `string` | Yes | — |

<AccordionGroup>
  <Accordion title="parent full type">
    ```ts theme={null}
    {
      id: string,
      type: page,
      href: string,
      browserLink: string,
      name: string
    }
    ```
  </Accordion>

  <Accordion title="parentTable full type">
    ```ts theme={null}
    {
      id: string,
      type: table,
      tableType: table | view | database,
      href: string,
      browserLink: string,
      name: string,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }
    }
    ```
  </Accordion>

  <Accordion title="displayColumn full type">
    ```ts theme={null}
    {
      id: string,
      type: column,
      href: string
    }
    ```
  </Accordion>

  <Accordion title="sorts full type">
    ```ts theme={null}
    {
      column: {
        id: string,
        type: column,
        href: string
      },
      direction: ascending | descending
    }[]
    ```
  </Accordion>

  <Accordion title="filter full type">
    ```ts theme={null}
    {
      valid: boolean,
      isVolatile?: boolean,
      hasUserFormula?: boolean,
      hasTodayFormula?: boolean,
      hasNowFormula?: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`tables.list`

List tables and views in a doc

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.tables.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `docId` | `string` | Yes | ID of the doc. |
| `limit` | `number` | No | Maximum number of results to return in this query. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |
| `sortBy` | `name` | No | Determines how to sort the given objects. |
| `tableTypes` | `table \| view \| database[]` | No | Comma-separated list of table types to include in results. If omitted, includes tables, views, and databases. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `href` | `string` | No | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      id: string,
      type: table,
      tableType: table | view | database,
      href: string,
      browserLink: string,
      name: string,
      parent?: {
        id: string,
        type: page,
        href: string,
        browserLink: string,
        name: string
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Workspaces

### changeUserRole

`workspaces.changeUserRole`

Change the role of a workspace member

**Risk:** `write`

```ts theme={null}
await corsair.coda.api.workspaces.changeUserRole({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | Yes | ID of the workspace. |
| `email` | `string` | Yes | Email of the user. |
| `newRole` | `Admin \| DocMaker \| Editor` | Yes | — |

**Output**

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

***

### listRoles

`workspaces.listRoles`

List user counts by role over time for a workspace

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.workspaces.listRoles({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | Yes | ID of the workspace. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      month: string,
      activeAdminCount: number,
      activeDocMakerCount: number,
      activeEditorCount: number,
      inactiveAdminCount: number,
      inactiveDocMakerCount: number,
      inactiveEditorCount: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### listUsers

`workspaces.listUsers`

List members of a workspace

**Risk:** `read`

```ts theme={null}
await corsair.coda.api.workspaces.listUsers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workspaceId` | `string` | Yes | ID of the workspace. |
| `includedRoles` | `Admin \| DocMaker \| Editor[]` | No | Show only the members that match the included roles. Multiple roles can be specified with a comma-delimited list. |
| `pageToken` | `string` | No | An opaque token used to fetch the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | — |
| `nextPageToken` | `string` | No | — |
| `nextPageLink` | `string` | No | — |

<AccordionGroup>
  <Accordion title="items full type">
    ```ts theme={null}
    {
      email: string,
      name: string,
      role: Admin | DocMaker | Editor,
      pictureUrl?: string,
      registeredAt: string,
      roleChangedAt?: string,
      lastActiveAt?: string,
      ownedDocs?: number,
      docsLastActiveAt?: string,
      docCollaboratorCount?: number,
      totalDocs?: number,
      totalDocsLastActiveAt?: string,
      totalDocCollaboratorsLast90Days?: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

***


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