Update version control user identity to a service account

Update the target version control user identity to a service account

Securitybearer
Request
path Parameters
id
required
number
Request Body schema: application/json
required
serviceAccount
required
boolean

Determines service account state

serviceAccountReason
required
string <= 30000 characters

Reason why this account is being marked as a service account

Responses
200
400

Malformed data and/or validation errors

401

Invalid Authorization

402

Response Code 402

You must pay to activate this feature

403

You are not allowed to perform this action

404

Record Not Found

412

Response Code: 412

You must accept the Drata terms and conditions to use the API

500

Internal server error

put/user-identities/version-control/{id}/service-account
Request samples
application/json
{
  • "serviceAccount": true,
  • "serviceAccountReason": "This account is used to deploy"
}
Response samples
application/json
{
  • "id": 1,
  • "identityId": "1a2b3c",
  • "username": "Username",
  • "email": "[email protected]",
  • "connectedAt": "2025-07-01T16:45:55.246Z",
  • "disconnectedAt": "2025-07-01T16:45:55.246Z",
  • "serviceAccount": "2025-07-01T16:45:55.246Z",
  • "serviceAccountReason": "This user is used to deploy code",
  • "user": {
    • "id": 1,
    • "email": "[email protected]",
    • "firstName": "Sally",
    • "lastName": "Smith",
    • "jobTitle": "CEO",
    • "drataTermsAgreedAt": "2025-07-01T16:45:55.246Z",
    • "createdAt": "2025-07-01T16:45:55.246Z",
    • "updatedAt": "2025-07-01T16:45:55.246Z",
    • "roles": [
      • "ROLE",
      • "ANOTHER_ROLE"
      ],
    • "backgroundChecks": [
      • {
        • "id": 1,
        • "userId": 1,
        • "status": "OK",
        • "caseId": "abc123",
        • "caseInvitationId": "abc123",
        • "manualCheckDate": "2020-07-06",
        • "manuallyCheckUrl": "url.com",
        • "type": "CERTN",
        • "source": "DRATA",
        • "reportData": "string",
        • "user": { },
        • "outOfScopeReason": "abc123",
        • "outOfScopeAt": "2025-07-01T16:45:55.246Z",
        • "invitationEmail": "[email protected]",
        • "linkedAt": "2025-07-01T16:45:55.246Z",
        • "createdAt": "2025-07-01T16:45:55.246Z",
        • "updatedAt": "2025-07-01T16:45:55.246Z"
        }
      ],
    • "identities": [
      • {
        • "id": 1,
        • "identityId": "1a2b3c",
        • "username": "Username",
        • "connectedAt": "2025-07-01T16:45:55.246Z",
        • "disconnectedAt": "2025-07-01T16:45:55.246Z",
        • "hasMfa": true,
        • "user": { },
        • "connection": {
          • "id": "1",
          • "clientType": "GOOGLE",
          • "state": "ACTIVE",
          • "connected": false,
          • "connectedAt": "2025-07-01T16:45:55.246Z",
          • "failedAt": "2025-07-01T16:45:55.246Z",
          • "companyId": "12341234",
          • "assignmentId": "FLk12AsS",
          • "user": { },
          • "accountId": "string",
          • "clientId": "drata.com",
          • "clientAlias": "My-connection-alias-1",
          • "manuallyUpdatedAt": "2025-07-01T16:45:55.246Z",
          • "aliasUpdatedAt": "2025-07-01T16:45:55.246Z",
          • "deletedAt": "2025-07-01T16:45:55.246Z",
          • "requestorId": "328d3016-71f3-4485-af20-06ce8044da18",
          • "product": { },
          • "writeAccessEnabled": false,
          • "sourcePreference": "LABEL",
          • "securityLabel": "Jira Security Label",
          • "jqlQuery": "project = IT AND type = \"Offboarding\"",
          • "authorized": true,
          • "workspaces": [],
          • "providerTypes": [
            • 5
            ],
          • "code": 10010,
          • "groupLabel": "Everyone"
          },
        • "hasIdp": true,
        • "secondaryEmail": "[email protected]",
        • "firstName": "John",
        • "lastName": "Doe",
        • "startedAt": "2025-07-01T16:45:55.246Z",
        • "separatedAt": "2025-07-01T16:45:55.246Z",
        • "isContractor": true,
        • "jobTitle": "Engineer",
        • "managerId": "x00jk12-2312",
        • "managerName": "string"
        }
      ]
    },
  • "serviceAccountDesignator": {
    • "id": 1,
    • "email": "[email protected]",
    • "firstName": "Sally",
    • "lastName": "Smith",
    • "jobTitle": "CEO",
    • "drataTermsAgreedAt": "2025-07-01T16:45:55.246Z",
    • "createdAt": "2025-07-01T16:45:55.246Z",
    • "updatedAt": "2025-07-01T16:45:55.246Z",
    • "roles": [
      • "ROLE",
      • "ANOTHER_ROLE"
      ],
    • "backgroundChecks": [
      • {
        • "id": 1,
        • "userId": 1,
        • "status": "OK",
        • "caseId": "abc123",
        • "caseInvitationId": "abc123",
        • "manualCheckDate": "2020-07-06",
        • "manuallyCheckUrl": "url.com",
        • "type": "CERTN",
        • "source": "DRATA",
        • "reportData": "string",
        • "user": { },
        • "outOfScopeReason": "abc123",
        • "outOfScopeAt": "2025-07-01T16:45:55.246Z",
        • "invitationEmail": "[email protected]",
        • "linkedAt": "2025-07-01T16:45:55.246Z",
        • "createdAt": "2025-07-01T16:45:55.246Z",
        • "updatedAt": "2025-07-01T16:45:55.246Z"
        }
      ],
    • "identities": [
      • {
        • "id": 1,
        • "identityId": "1a2b3c",
        • "username": "Username",
        • "connectedAt": "2025-07-01T16:45:55.246Z",
        • "disconnectedAt": "2025-07-01T16:45:55.246Z",
        • "hasMfa": true,
        • "user": { },
        • "connection": {
          • "id": "1",
          • "clientType": "GOOGLE",
          • "state": "ACTIVE",
          • "connected": false,
          • "connectedAt": "2025-07-01T16:45:55.246Z",
          • "failedAt": "2025-07-01T16:45:55.246Z",
          • "companyId": "12341234",
          • "assignmentId": "FLk12AsS",
          • "user": { },
          • "accountId": "string",
          • "clientId": "drata.com",
          • "clientAlias": "My-connection-alias-1",
          • "manuallyUpdatedAt": "2025-07-01T16:45:55.246Z",
          • "aliasUpdatedAt": "2025-07-01T16:45:55.246Z",
          • "deletedAt": "2025-07-01T16:45:55.246Z",
          • "requestorId": "328d3016-71f3-4485-af20-06ce8044da18",
          • "product": { },
          • "writeAccessEnabled": false,
          • "sourcePreference": "LABEL",
          • "securityLabel": "Jira Security Label",
          • "jqlQuery": "project = IT AND type = \"Offboarding\"",
          • "authorized": true,
          • "workspaces": [],
          • "providerTypes": [
            • 5
            ],
          • "code": 10010,
          • "groupLabel": "Everyone"
          },
        • "hasIdp": true,
        • "secondaryEmail": "[email protected]",
        • "firstName": "John",
        • "lastName": "Doe",
        • "startedAt": "2025-07-01T16:45:55.246Z",
        • "separatedAt": "2025-07-01T16:45:55.246Z",
        • "isContractor": true,
        • "jobTitle": "Engineer",
        • "managerId": "x00jk12-2312",
        • "managerName": "string"
        }
      ]
    },
  • "hasMfa": true,
  • "connection": {
    • "id": "1",
    • "clientType": "GOOGLE",
    • "state": "ACTIVE",
    • "connected": false,
    • "connectedAt": "2025-07-01T16:45:55.246Z",
    • "failedAt": "2025-07-01T16:45:55.246Z",
    • "companyId": "12341234",
    • "assignmentId": "FLk12AsS",
    • "user": {
      • "id": 1,
      • "email": "[email protected]",
      • "firstName": "Sally",
      • "lastName": "Smith",
      • "jobTitle": "CEO",
      • "drataTermsAgreedAt": "2025-07-01T16:45:55.246Z",
      • "createdAt": "2025-07-01T16:45:55.246Z",
      • "updatedAt": "2025-07-01T16:45:55.246Z",
      • "roles": [
        • "ROLE",
        • "ANOTHER_ROLE"
        ],
      • "backgroundChecks": [
        • {
          • "id": 1,
          • "userId": 1,
          • "status": "OK",
          • "caseId": "abc123",
          • "caseInvitationId": "abc123",
          • "manualCheckDate": "2020-07-06",
          • "manuallyCheckUrl": "url.com",
          • "type": "CERTN",
          • "source": "DRATA",
          • "reportData": "string",
          • "user": { },
          • "outOfScopeReason": "abc123",
          • "outOfScopeAt": "2025-07-01T16:45:55.246Z",
          • "invitationEmail": "[email protected]",
          • "linkedAt": "2025-07-01T16:45:55.246Z",
          • "createdAt": "2025-07-01T16:45:55.246Z",
          • "updatedAt": "2025-07-01T16:45:55.246Z"
          }
        ],
      • "identities": [
        • {
          • "id": 1,
          • "identityId": "1a2b3c",
          • "username": "Username",
          • "connectedAt": "2025-07-01T16:45:55.246Z",
          • "disconnectedAt": "2025-07-01T16:45:55.246Z",
          • "hasMfa": true,
          • "user": { },
          • "connection": { },
          • "hasIdp": true,
          • "secondaryEmail": "[email protected]",
          • "firstName": "John",
          • "lastName": "Doe",
          • "startedAt": "2025-07-01T16:45:55.246Z",
          • "separatedAt": "2025-07-01T16:45:55.246Z",
          • "isContractor": true,
          • "jobTitle": "Engineer",
          • "managerId": "x00jk12-2312",
          • "managerName": "string"
          }
        ]
      },
    • "accountId": "string",
    • "clientId": "drata.com",
    • "clientAlias": "My-connection-alias-1",
    • "manuallyUpdatedAt": "2025-07-01T16:45:55.246Z",
    • "aliasUpdatedAt": "2025-07-01T16:45:55.246Z",
    • "deletedAt": "2025-07-01T16:45:55.246Z",
    • "requestorId": "328d3016-71f3-4485-af20-06ce8044da18",
    • "product": { },
    • "writeAccessEnabled": false,
    • "sourcePreference": "LABEL",
    • "securityLabel": "Jira Security Label",
    • "jqlQuery": "project = IT AND type = \"Offboarding\"",
    • "authorized": true,
    • "workspaces": [],
    • "providerTypes": [
      • 5
      ],
    • "code": 10010,
    • "groupLabel": "Everyone"
    },
  • "lastCheckedAt": "2025-07-01T16:45:55.246Z",
  • "createdAt": "2025-07-01T16:45:55.246Z",
  • "updatedAt": "2025-07-01T16:45:55.246Z",
  • "writeAccess": "2025-07-01T16:45:55.246Z",
  • "pushProductionCodeAccess": "2025-07-01T16:45:55.246Z"
}