Skip to main content

When to use this

Use delete only when you need to permanently remove a position.
Deleting is permanent. Make sure no teams still rely on this position and that you’ve exported any needed data. Prefer Archiving a position to stop new invites while keeping past interviews.

GraphQL Request

Please make sure to replace the position ID. Reminder: Deleting a position deletes all data related to it, including all interviews. Don’t forget to update the Hireflix API Key in the headers.

Explanation

  • input.positionId – the position you want to remove.
  • deletePosition (union) – returns one of two possible types. Check __typename to determine which one you got:
    • MutationDeletePositionSuccess: the deletion succeeded. Data returns a boolean-like result (implementation dependent).
    • PositionNotFoundError: the position couldn’t be found. Code and message describe the error.
Treat any GraphQL errors, as well as a PositionNotFoundError response, as a failed delete.

Example Response

If the deletion fails — for example, if the position doesn’t exist — you’ll get an error response instead:

Learn next?

Let’s learn how to create and use webhooks.