---
title: Sudo mode
summary: >-
  Sudo mode allows users to perform privileged actions after going through a
  re-authentication flow.
url: https://www.fastly.com/documentation/reference/api/utils/sudo
---

Sudo mode allows users to perform privileged actions after going through a re-authentication flow.

Sudo mode is an elevated security state in which a user will be re-authenticated to allow them to temporarily perform privileged actions via the API such as the creation of [Automation tokens](https://www.fastly.com/documentation/reference/api/auth-tokens/automation/). It does not upgrade or otherwise change the roles of the user. The user can only perform these actions until the sudo expiry time is reached.

## Error states

The following error states may be returned from requesting sudo access.

A response with a JSON body containing an error code is returned on error.

| Status | Code        | Description                                                |
| ------ | ----------- | ---------------------------------------------------------- |
| 403    | `forbidden` | The supplied username/password combination is not correct. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `expiry_time` | string | A UTC time-stamp of when sudo access will expire. If blank, sudo access expires five minutes after the request. |

## API endpoints

### Request Sudo access

**POST** `/sudo`

Re-authenticate to allow the provided user to obtain sudo access.
