Skip to main content
PUT
/
auth
/
service-accounts
/
{serviceAccountId}
/
deactivate
Deactivate Service Account
curl --request PUT \
  --url https://api.dfns.io/auth/service-accounts/{serviceAccountId}/deactivate \
  --header 'Authorization: Bearer <token>' \
  --header 'X-DFNS-USERACTION: <api-key>'
{
  "userInfo": {
    "username": "<string>",
    "name": "<string>",
    "userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
    "kind": "CustomerEmployee",
    "credentialUuid": "<string>",
    "orgId": "<string>",
    "permissions": [
      "<string>"
    ],
    "isActive": true,
    "isServiceAccount": true,
    "isRegistered": true,
    "permissionAssignments": [
      {
        "permissionName": "<string>",
        "permissionId": "<string>",
        "assignmentId": "<string>",
        "operations": [
          "<string>"
        ]
      }
    ]
  },
  "accessTokens": [
    {
      "accessToken": "<string>",
      "dateCreated": "<string>",
      "credId": "<string>",
      "isActive": true,
      "kind": "Pat",
      "linkedUserId": "<string>",
      "linkedAppId": "<string>",
      "name": "<string>",
      "orgId": "<string>",
      "permissionAssignments": [
        {
          "permissionName": "<string>",
          "permissionId": "<string>",
          "assignmentId": "<string>",
          "operations": [
            "<string>"
          ]
        }
      ],
      "publicKey": "<string>",
      "tokenId": "<string>"
    }
  ]
}

Authentication

✅ Organization User (CustomerEmployee)
❌ Delegated User (EndUser)
❌ Personal Access Token not allowed
✅ Service Account

Required Permissions

Auth:ServiceAccounts:Deactivate: Always required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

X-DFNS-USERACTION
string
header
required

User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows

Path Parameters

serviceAccountId
string
required
Minimum length: 1

Response

200 - application/json

Success

userInfo
object
required
accessTokens
object[]
required
I