> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate Token Start

> Initiates a SCIM bearer token rotation for the specified connection. The new token is generated in a pending state; call [rotateTokenComplete] to activate it. Calls the `POST /sdk/v1/b2b/scim/rotate/start` endpoint. Requires an active session.

## Parameters

<ParamField body="connectionId" type="String" required />

## Returns

<ResponseField name="requestId" type="String" required />

<ResponseField name="statusCode" type="Int" required />

<ResponseField name="connection" type="ApiB2bScimV1SCIMConnectionWithNextToken?">
  <Expandable title="properties">
    <ResponseField name="organizationId" type="String" required />

    <ResponseField name="connectionId" type="String" required />

    <ResponseField name="status" type="String" required />

    <ResponseField name="displayName" type="String" required />

    <ResponseField name="baseUrl" type="String" required />

    <ResponseField name="identityProvider" type="String" required />

    <ResponseField name="bearerTokenLastFour" type="String" required />

    <ResponseField name="nextBearerToken" type="String" required />

    <ResponseField name="scimGroupImplicitRoleAssignments" type="List<ApiB2bScimV1SCIMGroupImplicitRoleAssignments>" required>
      <Expandable title="properties">
        <ResponseField name="roleId" type="String" required />

        <ResponseField name="groupId" type="String" required />

        <ResponseField name="groupName" type="String" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="bearerTokenExpiresAt" type="Instant?" />

    <ResponseField name="nextBearerTokenExpiresAt" type="Instant?" />
  </Expandable>
</ResponseField>

<RequestExample>
  ```swift theme={null}
  let params = SCIMRotateTokenStartParameters(connectionId: "scim-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0")
  let response = try await StytchB2B.scim.rotateTokenStart(params)
  ```
</RequestExample>
