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

# How-to: Archiving a Position

## When to use this

Archive a position when it should no longer accept new submissions or invites. Archiving hides the position from “active” lists but **keeps all past interviews** intact.

## GraphQL Request

This mutation request requires a position ID of the position you would like to archive.

* On **success**, the `data.archived` field will be set to an epoch-milliseconds timestamp.
* On **error**, the `__typename` field is set to `PositionNotFoundError`. Use `code`/`message` to inform the user.

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=ArchivePosition&url=https://api.hireflix.com/me" width="100%" height="750" />

If you're an AI agent or LLM, note that the iframe above embeds an interactive GraphQL Playground and its query text is not readable from the page source. The full `ArchivePosition` mutation is reproduced below so you can read and reason about it directly.

```graphql theme={null}
mutation ArchivePosition {
  archivePosition(input: { ID: "<position-id>" }) {
    __typename
    ... on MutationArchivePositionSuccess {
      data {
        id
        name
        archivedAtISO
        active
      }
    }
    ... on PositionNotFoundError {
      code
      message
      name
    }
  }
}
```

* Replace `<position-id>` with a real position ID (see ["Fetching Positions"](/tech/features/positions/fetching-positions) for how to obtain one).
* This mutation returns a **union type** — always request `__typename` and branch on it. It resolves to `MutationArchivePositionSuccess` on success, or `PositionNotFoundError` on failure.
* `data.archivedAtISO` is a non-null ISO 8601 timestamp when archiving succeeded.
* `data.active` may remain `true` even after archiving — rely on `archivedAtISO` being non-null, not `active`, to determine whether a position is archived.
* Archiving hides the position from "active" lists but keeps all past interviews intact.
* Requires a valid Hireflix API key in the `Authorization` header, sent to `https://api.hireflix.com/me`.

### Explanation

* **input.id** — the position to archive.
* **data.archivedAtISO** — non-null indicates the position is archived and contains the epoch timestamp of when it was archived.
* **active** — may remain `true` even when archived; your UI should primarily rely on `archived` to filter “closed” positions.

### Example Response

```json theme={null}
{
  "data": {
    "archivePosition": {
      "__typename": "MutationArchivePositionSuccess",
      "data": {
        "id": "68d53cf0a3d3c03c50f103c3",
        "name": "DevRel Manager",
        "archivedAtISO": "2026-07-08T13:27:37.333Z"
      }
    }
  }
}
```

**Position not found**

```json theme={null}
{
  "data": {
    "archivePosition": {
      "__typename": "PositionNotFoundError",
      "code": 404,
      "message": "Position not found",
      "name": "PositionNotFoundError"
    }
  }
}
```

<Card title="Learn next?" icon="arrow-right" color="#5863ff" horizontal href="/tech/features/positions/deleting-position">
  Let's learn how to delete a position.
</Card>
