Skip to content

Delete an admin

DELETE/admins/{adminId}

Partner API · Partner Admins

Delete a PDB Admin for Central while internally just revoking PDB access.

Required permissionaccount_management:write

Parameters

Name In Type Required Description
X-Partner-ID header string (uuid) Yes Partner ID.
adminId path string (uuid) Yes Partner administrator ID.

Request samples

curl -X DELETE "https://api.central.sophos.com/partner/v1/admins/<adminId>" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>"

import requests

response = requests.delete(
    "https://api.central.sophos.com/partner/v1/admins/<adminId>",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Partner-ID": "<partner-id>",
    },
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Partner-ID" = "<partner-id>"
}
Invoke-RestMethod -Method DELETE -Uri "https://api.central.sophos.com/partner/v1/admins/<adminId>" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("DELETE", "https://api.central.sophos.com/partner/v1/admins/<adminId>", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Partner-ID", "<partner-id>")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api.central.sophos.com/partner/v1/admins/<adminId>", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Partner-ID": "<partner-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

202 — The request to delete the admin has been accepted by the server.

Errors

Status Meaning
400 Bad request.
401 Authentication required.
403 Forbidden.
404 Not Found.
409 Can't remove last Super admin.
500 Internal server error.

All error responses share the same shape — see the error response object.

Response examples

202

{}

See the guide for a narrative walkthrough of this API.