# Timers
URL: https://docs.awellhealth.com/api-reference/reference/timers

> For the complete documentation index, see [llms.txt](https://docs.awellhealth.com/llms.txt).



Query and expire the timers that delay steps in a care flow.

## Queries [#queries]

### `activityTimer` [#activitytimer]

Returns the timer for a given activity in a care flow.

**Arguments**

| Argument      | Type      | Required | Description             |
| ------------- | --------- | -------- | ----------------------- |
| `activity_id` | `String!` | Yes      | The ID of the activity  |
| `careflow_id` | `String!` | Yes      | The ID of the care flow |

**Returns:** `ActivityTimerPayload!`

**Example**

```graphql
query ActivityTimer($activity_id: String!, $careflow_id: String!) {
  activityTimer(activity_id: $activity_id, careflow_id: $careflow_id) {
    code
    success
    timer {
      activity_id
      careflow_id
      completion_reason
      created_at
      id
      job_id
      name
      readable_explanation
      resource_id
      scheduled_date
      status
      type
      updated_at
    }
  }
}
```

Variables:

```json
{
  "activity_id": "<string>",
  "careflow_id": "<string>"
}
```

### `careflowTimers` [#careflowtimers]

Returns the timers for a care flow, optionally filtered by status.

**Arguments**

| Argument      | Type      | Required | Description                   |
| ------------- | --------- | -------- | ----------------------------- |
| `careflow_id` | `String!` | Yes      | The ID of the care flow       |
| `status`      | `String`  | No       | The timer status to filter by |

**Returns:** `CareflowTimersPayload!`

**Example**

```graphql
query CareflowTimers($careflow_id: String!, $status: String) {
  careflowTimers(careflow_id: $careflow_id, status: $status) {
    code
    success
    timers {
      activity_id
      careflow_id
      completion_reason
      created_at
      id
      job_id
      name
      readable_explanation
      resource_id
      scheduled_date
      status
      type
      updated_at
    }
  }
}
```

Variables:

```json
{
  "careflow_id": "<string>",
  "status": "<string>"
}
```

## Mutations [#mutations]

### `expireTimer` [#expiretimer]

Expires a timer, allowing the step it delays to proceed.

**Arguments**

| Argument | Type                | Required | Description                              |
| -------- | ------------------- | -------- | ---------------------------------------- |
| `input`  | `ExpireTimerInput!` | Yes      | The input specifying the timer to expire |

**Returns:** `EmptyPayload!`

**Example**

```graphql
mutation ExpireTimer($input: ExpireTimerInput!) {
  expireTimer(input: $input) {
    code
    success
  }
}
```

Variables:

```json
{
  "input": {
    "activity_id": "<string>",
    "user_name": "<string>"
  }
}
```
