# appendRunEvents

```graphql
mutation AppendRunEvents($command: RunsAppendRunEventsCommand!) {
  appendRunEvents(command: $command) {
    latestEventId
    latestExternalEventSequence
    appendedCount
    acknowledgedEventIds
    recoveryCheckpoint {
      snapshotEventId
      snapshotExternalSequence
      checkpointEventId
    }
    runId
    modelCallCaptures {
      eventId
      modelCallId
      runId
      projectId
    }
    toolCallAdmissions {
      occurrenceId
      admissionEventId
      startEventId
      toolCallId
      publicToolCallId
      runId
      projectId
    }
  }
}
```

Append run events.

## Arguments

| Name             | Type                             | Required | Description                                                                                                                                                                         |
| ---------------- | -------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`        | RunsAppendRunEventsCommand!      | Yes      |                                                                                                                                                                                     |
| `command.runId`  | ID!                              | Yes      |                                                                                                                                                                                     |
| `command.input`  | RunsAppendRunEventsCommandInput! | Yes      |                                                                                                                                                                                     |
| `idempotencyKey` | String                           |          | Retry key for this append (1–128 characters); overrides Idempotency-Key. Task and Workflow runs require this argument or the Idempotency-Key HTTP header; Agent runs may omit both. |

## Variables

```json
{
  "command": {
    "runId": "string",
    "input": {
      "events": [
        {}
      ]
    }
  }
}
```

## Responses

| Status | Description                                          |
| ------ | ---------------------------------------------------- |
| 200    | The RunsAppendEventsResult! in data.appendRunEvents. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation AppendRunEvents($command: RunsAppendRunEventsCommand!) {\n  appendRunEvents(command: $command) {\n    latestEventId\n    latestExternalEventSequence\n    appendedCount\n    acknowledgedEventIds\n    recoveryCheckpoint {\n      snapshotEventId\n      snapshotExternalSequence\n      checkpointEventId\n    }\n    runId\n    modelCallCaptures {\n      eventId\n      modelCallId\n      runId\n      projectId\n    }\n    toolCallAdmissions {\n      occurrenceId\n      admissionEventId\n      startEventId\n      toolCallId\n      publicToolCallId\n      runId\n      projectId\n    }\n  }\n}",
  "variables": {
    "command": {
      "runId": "string",
      "input": {
        "events": [
          {}
        ]
      }
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "appendRunEvents": {
      "latestEventId": 0,
      "latestExternalEventSequence": 0,
      "appendedCount": 0,
      "acknowledgedEventIds": [0],
      "recoveryCheckpoint": {
        "snapshotEventId": 0,
        "snapshotExternalSequence": 0,
        "checkpointEventId": 0
      },
      "runId": "string",
      "modelCallCaptures": [
        {
          "eventId": "string",
          "modelCallId": "string",
          "runId": "string",
          "projectId": "string"
        }
      ],
      "toolCallAdmissions": [
        {
          "occurrenceId": "string",
          "admissionEventId": "string",
          "startEventId": "string",
          "toolCallId": "string",
          "publicToolCallId": "string",
          "runId": "string",
          "projectId": "string"
        }
      ]
    }
  }
}
```
