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

# Pocket webhooks

> Pocket incoming webhooks in Corsair: the event paths to subscribe to, the payload each event carries, and the response data.

The Pocket plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see [Overview](https://docs.corsair.dev/plugins/heypocket/overview.md) for setup context and the exact URL shape).

> [!NOTE]
>
> **New to Corsair?** See [webhooks](https://docs.corsair.dev/concepts/webhooks.md) and [hooks](https://docs.corsair.dev/concepts/hooks.md).

## Webhook map

* `actionItems`
  * `regenerated` (`actionItems.regenerated`)
  * `updated` (`actionItems.updated`)
* `mindMap`
  * `completed` (`mindMap.completed`)
* `recording`
  * `created` (`recording.created`)
  * `deleted` (`recording.deleted`)
  * `merged` (`recording.merged`)
* `speakers`
  * `labeled` (`speakers.labeled`)
* `summary`
  * `completed` (`summary.completed`)
  * `regenerated` (`summary.regenerated`)
  * `updated` (`summary.updated`)
* `test`
  * `sample` (`test.sample`)
* `transcript`
  * `edited` (`transcript.edited`)
* `transcription`
  * `completed` (`transcription.completed`)
* `translation`
  * `completed` (`translation.completed`)

## HTTP handler setup

```ts app/api/webhook/route.ts theme={null}
import { processWebhook } from "corsair";
import { corsair } from "@/server/corsair";

export async function POST(request: Request) {
    const headers = Object.fromEntries(request.headers);
    // With multiTenancy, give each tenant its own URL (/api/webhook?tenantId=acme):
    // the query says whose account, secret and hooks handle the delivery.
    const query = Object.fromEntries(new URL(request.url).searchParams);
    // The raw text, not request.json(): signatures are checked over the exact bytes sent.
    const body = await request.text();
    const result = await processWebhook(corsair, headers, body, query);
    if (!result.plugin) {
        return Response.json({ success: false }, { status: 404 });
    }
    // A refusal (bad signature) carries no status and answers 400; a handler
    // that threw comes back with 500, so the sender retries it.
    const status =
        result.response?.success === false ? (result.response.statusCode ?? 400) : 200;
    return Response.json(result.response ?? { success: true }, {
        status,
        headers: result.responseHeaders,
    });
}
```

## Events

## Action Items

### Regenerated

`actionItems.regenerated`

Action items were regenerated (action\_items.regenerated).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `action_items.regenerated` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: action_items.regenerated,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        actionItems: {
            regenerated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

### Updated

`actionItems.updated`

Someone edited or completed an action item (action\_items.updated).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `action_items.updated` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: action_items.updated,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        actionItems: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Mind Map

### Completed

`mindMap.completed`

The mind map is ready (mind\_map.completed).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `mind_map.completed` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: mind_map.completed,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        mindMap: {
            completed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Recording

### Created

`recording.created`

A recording was created or uploaded (recording.created).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `recording.created` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: recording.created,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        recording: {
            created: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

### Deleted

`recording.deleted`

A recording was deleted (recording.deleted).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `recording.deleted` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: recording.deleted,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        recording: {
            deleted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

### Merged

`recording.merged`

Two or more recordings were merged (recording.merged).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `recording.merged` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: recording.merged,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        recording: {
            merged: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Speakers

### Labeled

`speakers.labeled`

Pocket named at least one speaker automatically (speakers.labeled).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `speakers.labeled` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: speakers.labeled,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        speakers: {
            labeled: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Summary

### Completed

`summary.completed`

All post-processing is done: summary, action items, tags and mind maps (summary.completed).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `summary.completed` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: summary.completed,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        summary: {
            completed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

### Regenerated

`summary.regenerated`

The full summary package was regenerated (summary.regenerated).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `summary.regenerated` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: summary.regenerated,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        summary: {
            regenerated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

### Updated

`summary.updated`

The summary text was regenerated (summary.updated).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `summary.updated` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: summary.updated,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        summary: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Test

### Sample

`test.sample`

A sample event from the webhook's Test button (test).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `test` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: test,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        test: {
            sample: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Transcript

### Edited

`transcript.edited`

Someone edited transcript text or speaker names (transcript.edited).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `transcript.edited` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: transcript.edited,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        transcript: {
            edited: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Transcription

### Completed

`transcription.completed`

The transcript of a recording is ready; the payload carries it (transcription.completed).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `transcription.completed` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: transcription.completed,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        transcription: {
            completed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***

## Translation

### Completed

`translation.completed`

A transcript translation is ready (translation.completed).

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `translation.completed` | Yes | — |
| `timestamp` | `string` | Yes | When Pocket sent this delivery (ISO 8601). |
| `user` | `object` | Yes | The recording owner. |
| `organization` | `object \| null` | No | Set on deliveries to an organization webhook. |
| `recording` | `object \| null` | No | — |
| `summarizations` | `Record<string, JsonValue> \| JsonValue[] \| null` | No | — |
| `transcript` | `object[] \| null` | No | — |
| `speakers` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }
> ```

> [accordion] organization full type
>
> ```ts theme={null}
> {
>   id: string
> } | null
> ```

> [accordion] recording full type
>
> ```ts theme={null}
> {
>   id: string,
>   title?: string | null,
>   description?: string | null,
>   duration?: number | null,
>   language?: string | null,
>   recordingAt?: string | null,
>   createdAt?: string | null
> } | null
> ```

> [accordion] transcript full type
>
> ```ts theme={null}
> {
>   speaker?: string | null,
>   speakerName?: string | null,
>   text?: string | null,
>   start?: number | null,
>   end?: number | null
> }[] | null
> ```

> [accordion] speakers full type
>
> ```ts theme={null}
> Record<string, {
>   name?: string | null,
>   speakerId?: string | null
> }> | null
> ```

> [accordion] Response data full type
>
> ```ts theme={null}
> {
>   event: translation.completed,
>   timestamp: string,
>   user: {
>     id: string,
>     email?: string | null
>   },
>   organization?: {
>     id: string
>   } | null,
>   recording?: {
>     id: string,
>     title?: string | null,
>     description?: string | null,
>     duration?: number | null,
>     language?: string | null,
>     recordingAt?: string | null,
>     createdAt?: string | null
>   } | null,
>   summarizations?: Record<string, JsonValue> | JsonValue[] | null,
>   transcript?: {
>     speaker?: string | null,
>     speakerName?: string | null,
>     text?: string | null,
>     start?: number | null,
>     end?: number | null
>   }[] | null,
>   speakers?: Record<string, {
>     name?: string | null,
>     speakerId?: string | null
>   }> | null
> }
> ```

**`webhookHooks` example**

```ts theme={null}
heypocket({
    webhookHooks: {
        translation: {
            completed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***


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