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

# API reference

## Universal arguments

When Tuple executes your trigger, it passes in useful information via environment variables. These take the form `TUPLE_TRIGGER_[name]`.

These arguments vary by trigger; however, there are three universal arguments that are available to every trigger that gets executed:

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CURRENT_USER_EMAIL` | Your email |
| `TUPLE_TRIGGER_CURRENT_USER_FULL_NAME` | Your full name |
| `TUPLE_TRIGGER_CLI` | The path to the [Tuple CLI](https://docs.tuple.app/cli/overview.md), such as `/usr/local/bin/tuple` on macOS. Use it instead of a bare `tuple`, which may not be on the trigger's `PATH`. The path is set even when the CLI isn't installed, so check `[ -x "$TUPLE_TRIGGER_CLI" ]` if your script should keep going without it. |

## Events

The complete list of lifecycle events that you can respond to with triggers.

### Call initiated

`call-initiated`

Fired when you start an outgoing call to another person via the popover interface.

![Calling someone via the popover UI](https://mintcdn.com/tuple-0f82e5be/KrzhTF2unbKcB628/images/triggers/call-initiated-popover.png?fit=max\&auto=format\&n=KrzhTF2unbKcB628\&q=85\&s=53c40aa982529961d17a0d922d3a46c2)

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALLEE_EMAIL` | The email of the person you're calling. |
| `TUPLE_TRIGGER_CALLEE_FULL_NAME` | The full name of the person you're calling. |

### Call incoming

`call-incoming`

Fired when another participant calls your machine.

![Receiving an incoming call](https://mintcdn.com/tuple-0f82e5be/KrzhTF2unbKcB628/images/triggers/call-incoming.png?fit=max\&auto=format\&n=KrzhTF2unbKcB628\&q=85\&s=00f9ec89e9d720704162a0d3acd83f07)

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALL_ID` | The ID of the incoming call. Pass it to [`tuple call accept --call`](https://docs.tuple.app/cli/commands#call-accept) to answer this call. |
| `TUPLE_TRIGGER_CALLER_EMAIL` | The email of the person calling you. |
| `TUPLE_TRIGGER_CALLER_FULL_NAME` | The full name of the person calling you. |

### Call rejected

`call-rejected`

Fired when the person you're calling rejects your call.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALLEE_EMAIL` | The email of the person you're calling. |
| `TUPLE_TRIGGER_CALLEE_FULL_NAME` | The full name of the person you're calling. |

### Call timed out

`call-timed-out`

Fired when your outgoing call times out.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALLEE_EMAIL` | The email of the person you're calling. |
| `TUPLE_TRIGGER_CALLEE_FULL_NAME` | The full name of the person you're calling. |

### Call connected

`call-connected`

Fired when your call is fully connected.

(Receives no additional arguments)

### Call ended

`call-ended`

Fired when your call ends.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALL_LENGTH` | The duration that you were on the call in seconds. |

### Call capture started

`call-capture-started`

Fired when a call capture starts. Capture can be stopped and restarted within a single call, and each recording session fires its own started/complete pair — use `TUPLE_TRIGGER_RECORDING_ID` to address the exact session that just started rather than guessing from "the most recent call."

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALL_ID` | The ID of the call this capture belongs to. |
| `TUPLE_TRIGGER_RECORDING_ID` | A UUID identifying the specific recording session that just started. Pass to `tuple capture show --recording <uuid>` to read exactly this session. |

### Call capture complete

`call-capture-complete`

Fired when a call capture finishes, either because the call ended or capture was disabled. Each started/complete pair is scoped to one recording session; use `TUPLE_TRIGGER_RECORDING_ID` so a summarizer trigger operates on that session only and doesn't double-summarize a call whose capture was restarted.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_CALL_ID` | The ID of the call this capture belongs to. |
| `TUPLE_TRIGGER_RECORDING_ID` | A UUID identifying the specific recording session that just finished. Pass to `tuple capture show --recording <uuid>` to read exactly this session's records. |

A minimal `call-capture-complete` handler that exports just the session that finished:

```sh theme={null}
#!/bin/sh
"$TUPLE_TRIGGER_CLI" capture export "$HOME/Documents/captures/$TUPLE_TRIGGER_RECORDING_ID.jsonl" \
  --recording "$TUPLE_TRIGGER_RECORDING_ID"
```

### Room joined

`room-joined`

Fired when you or someone else joins one of your team's rooms.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_IS_SELF` | "true" when this is being fired because you joined a room. "false" when it was someone else. |
| `TUPLE_TRIGGER_ROOM_NAME` | The name of the room being joined. |
| `TUPLE_TRIGGER_EMAIL` | The email of the person joining the room. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person joining the room. |

### Room left

`room-left`

Fired when you or someone else leaves one of your team's rooms.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_IS_SELF` | "true" when this event was fired because you left a room. "false" when someone else did. |
| `TUPLE_TRIGGER_ROOM_NAME` | The name of the room being left. |
| `TUPLE_TRIGGER_EMAIL` | The email of the person leaving the room. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person leaving the room. |

### Screen share started

`screen-share-started`

Fired when you or someone else starts sharing their screen on a call.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_IS_SELF` | "true" when the event was fired because you started sharing your screen. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL` | The email of the person sharing their screen. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person sharing their screen. |

### Screen share ended

`screen-share-ended`

Fired when you or someone else stops sharing their screen on a call.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_IS_SELF` | "true" when you stopped sharing your screen. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL` | The email of the person stopping their screen share. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person stopping their screen share. |

### Webcam share started

`webcam-share-started`

Fired when you or someone else starts sharing their webcam on a call.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_IS_SELF` | "true" when you started sharing your webcam. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL` | The email of the person sharing their webcam. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person sharing their webcam. |

### Webcam share ended

`webcam-share-ended`

Fired when you or someone else stops sharing their webcam on a call.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_IS_SELF` | "true" when you stopped sharing your webcam. "false" when someone else did. |
| `TUPLE_TRIGGER_EMAIL` | The email of the person no longer sharing their webcam. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person no longer sharing their webcam. |

### Participant joined

`participant-joined`

Fired whenever someone joins your call, whether it's a call starting, someone being added, or someone joining the room you're in.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_EMAIL` | The email of the person that joined your call. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person that joined your call. |

### Participant left

`participant-left`

Fired whenever someone leaves your call.

| Argument | Details |
| - | - |
| `TUPLE_TRIGGER_EMAIL` | The email of the person that left your call. |
| `TUPLE_TRIGGER_FULL_NAME` | The full name of the person that left your call. |


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