# Work through a team task (/workflows/team-tasks)

Sam is interviewing for the Engineering Director job at Example Studio. Alex asks who’s on Friday’s panel. Give your teammate that task on Sam’s application so they can find it when they open the job. [Follow Sam’s application from shortlist to placement](/workflows/headless-ats)

## 1. Assign the task on Sam’s application [#1-assign-the-task-on-sams-application]

Use the job ID and the `jobCandidate.id` from when you added Sam to the job. If you’re picking up an existing application, find it with `jobCandidates` filtered by `jobIds` and `candidateIds`. [Find an application](/api/reference/queries/job-candidates)

Find your teammate with `users`, then run `AssignTask` with your workspace key. Here are example variables for a Friday deadline. Use your own job, application and teammate IDs. [Find a teammate](/api/reference/queries/users) · [Create a task](/api/reference/mutations/create-recruiting-task) · [Download the task calls](/examples/recruiting-tasks.graphql)

```json
{
  "input": {
    "jobId": "84",
    "jobCandidateId": "219",
    "assigneeUserId": "12",
    "title": "Confirm Sam’s interview panel",
    "dueAt": "2027-01-08T12:00:00Z"
  }
}
```

Keep the task ID and version from the response. Run `ApplicationTasks` with Sam’s application ID to see it there. Anyone who can’t see the application also can’t see its task. For work that covers the whole job, such as agreeing the interview budget with Alex, leave out `jobCandidateId`. [Read an application’s tasks](/api/reference/objects/job-candidate#recruiting-tasks)

## 2. See what’s due [#2-see-whats-due]

Run `TeamTasks` with the teammate’s ID in `assigneeUserIds` and a `dueBefore` time. For a desk covering several jobs, one query gives you the whole list. To see work you can pick up now, use `actionableOnly: true`. [Filter and page through tasks](/api/reference/queries/recruiting-tasks)

## 3. Pick it up later or hand it over [#3-pick-it-up-later-or-hand-it-over]

Alex calls back. One interviewer is away until tomorrow. Run `EditTask` with the current version and a future `snoozedUntil`. The task will reappear in the actionable list when that time arrives. Friday’s deadline stays in place. To pick it up earlier, send `snoozedUntil: null`. [Edit or snooze a task](/api/reference/mutations/update-recruiting-task)

```graphql
mutation WaitForThePanel($task: ID!, $version: String!, $tomorrow: DateTime!) {
  updateRecruitingTask(input: {
    recruitingTaskId: $task
    expectedVersion: $version
    snoozedUntil: $tomorrow
  }) {
    recruitingTask { id status snoozedUntil dueAt version }
  }
}
```

If another teammate is covering the job, give `ReassignTask` their ID and the latest version. They’ll see the same task, instructions and deadline. [Hand off the task](/api/reference/mutations/reassign-recruiting-task)

## 4. Close the task [#4-close-the-task]

When the panel confirms, run `ResolveTask` with the task ID, latest version and `DONE`. If Alex cancels the panel, use `DISMISSED`. If someone has edited it in the meantime, you’ll get `STALE_VERSION`. Read the task again before deciding what to do. [Resolve the task](/api/reference/mutations/resolve-recruiting-task)

```graphql
query WhoClosedTheTask($id: ID!) {
  recruitingTask(id: $id) {
    title
    status
    resolvedBy { id name }
    resolvedAt
  }
}
```

You can now tell Alex who followed up and when. [Read a recruiting task](/api/reference/queries/recruiting-task)