> ## Documentation index
> Fetch the complete documentation index at: https://developer.rhombus.com/llms.txt
> Use it to discover all available pages before exploring further.

# Update organization data retention settings

> Update org-level retention (in days) for face events and license plate events, covering both the event metadata and the associated image data. Face values must be between 1 and 730 days; license plate values between 1 and 365 days (orgs grandfathered on the legacy 2-year value may resend it unchanged, but cannot return to it once changed). A null value resets that data class to the platform default.

```http
POST https://api2.rhombussystems.com/api/org/updateDataRetentionSettings
```

EU organizations send the same request to `https://api2.eu.rhombussystems.com`.

## Authentication and parameters

- `x-auth-apikey` (header, required): Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
- `Authorization` (header): instead of an API key, an OAuth access token (`Bearer <token>`) with the `write` scope.
- `x-auth-scheme` (header, string, default: `api-token`): Authentication scheme identifier. Use `api-token` or `partner-api-token` with the `x-auth-apikey` header, `api` or `partner-api` with `x-auth-apikey` plus a client certificate, `api-oauth-token` or `partner-api-oauth-token` with `x-auth-access-token`, and `federated-token` with `x-auth-ft`. A request with `Authorization: Bearer <token>` and no `x-auth-scheme` is treated as OAuth, and `federated-token` may also be sent as the `x-auth-scheme` and `x-auth-ft` query parameters. One of: `api-token`, `api`, `api-oauth-token`, `federated-token`, `partner-api-token`, `partner-api`, `partner-api-oauth-token`.
- `x-auth-org` (header, string<RUUID>): Client organization UUID (22-character RUUID), for partner credentials only. With it the call runs in that client organization with the partner support authority's role. Without it a partner credential runs as the partner organization, which outside the partner endpoints is deprecated (responses carry `Deprecation` and `Sunset: Tue, 05 Jan 2027 00:00:00 GMT`). A malformed value returns 400 `INVALID_AUTH_ORG`; a client organization the partner cannot access returns 403 `PARTNER_CLIENT_ACCESS_DENIED`.

## Request body

Content type: `application/json`. Request object for updating org data retention settings for face and license plate events.

- `dataRetentionSettings` (object | null)

## Response 200

OK. Content type: `application/json`

- `error` (boolean | null)
- `errorCode` (string | null): Stable, machine-readable code for the failure (one of the ApiErrorCode catalog) when error is true. Branch on this, not on errorMsg.
- `errorMsg` (string | null)
- `org` (object | null): List of Rhombus organizations the user has access to
- `warningMsg` (string | null)

## Errors

Also 400, 401, 403, 429, 500, 503 with the standard error body (`errorCode`, `errorMsg`): https://developer.rhombus.com/errors

## OpenAPI

````yaml
openapi: 3.0.1
info:
  title: Rhombus API
  version: "1.0"
servers:
  - description: Production Server
    url: https://api2.rhombussystems.com
security:
  - ApiKeyAuth: []
paths:
  /api/org/updateDataRetentionSettings:
    post:
      description: Update org-level retention (in days) for face events and license plate events, covering both the event metadata and the associated image data. Face values must be between 1 and 730 days; license plate values between 1 and 365 days (orgs grandfathered on the legacy 2-year value may resend it unchanged, but cannot return to it once changed). A null value resets that data class to the platform default.
      operationId: updateDataRetentionSettings
      parameters:
        - description: "Authentication scheme identifier. Use `api-token` or `partner-api-token` with the `x-auth-apikey` header, `api` or `partner-api` with `x-auth-apikey` plus a client certificate, `api-oauth-token` or `partner-api-oauth-token` with `x-auth-access-token`, and `federated-token` with `x-auth-ft`. A request with `Authorization: Bearer <token>` and no `x-auth-scheme` is treated as OAuth, and `federated-token` may also be sent as the `x-auth-scheme` and `x-auth-ft` query parameters."
          example: api-token
          in: header
          name: x-auth-scheme
          required: false
          schema:
            default: api-token
            enum:
              - api-token
              - api
              - api-oauth-token
              - federated-token
              - partner-api-token
              - partner-api
              - partner-api-oauth-token
            type: string
        - description: "Client organization UUID (22-character RUUID), for partner credentials only. With it the call runs in that client organization with the partner support authority's role. Without it a partner credential runs as the partner organization, which outside the partner endpoints is deprecated (responses carry `Deprecation` and `Sunset: Tue, 05 Jan 2027 00:00:00 GMT`). A malformed value returns 400 `INVALID_AUTH_ORG`; a client organization the partner cannot access returns 403 `PARTNER_CLIENT_ACCESS_DENIED`."
          in: header
          name: x-auth-org
          required: false
          schema:
            format: RUUID
            maxLength: 22
            minLength: 22
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Org_UpdateDataRetentionSettingsWSRequest"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Org_UpdateDataRetentionSettingsWSResponse"
          description: OK
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
      security:
        - ApiKeyAuth: []
        - oauth2:
            - write
      summary: Update organization data retention settings
      tags:
        - Org Webservice
components:
  schemas:
    Org_UpdateDataRetentionSettingsWSRequest:
      description: Request object for updating org data retention settings for face and license plate events.
      properties:
        dataRetentionSettings:
          $ref: "#/components/schemas/DataRetentionSettingsType"
      type: object
    DataRetentionSettingsType:
      nullable: true
      properties:
        faceEventRetentionDays:
          format: int32
          nullable: true
          type: integer
        licensePlateEventRetentionDays:
          format: int32
          nullable: true
          type: integer
      type: object
    Org_UpdateDataRetentionSettingsWSResponse:
      description: Response object for updating org data retention settings.
      properties:
        error:
          nullable: true
          type: boolean
        errorCode:
          description: Stable, machine-readable code for the failure (one of the ApiErrorCode catalog) when error is true. Branch on this, not on errorMsg.
          nullable: true
          type: string
        errorMsg:
          nullable: true
          type: string
        org:
          $ref: "#/components/schemas/OrgV2Type"
        warningMsg:
          nullable: true
          type: string
      type: object
    OrgV2Type:
      description: List of Rhombus organizations the user has access to
      nullable: true
      properties:
        accountBillingContactEmail:
          nullable: true
          type: string
        accountOwnerEmail:
          nullable: true
          type: string
        accountTechnicalContactEmail:
          nullable: true
          type: string
        accountTechnicalContacts:
          items:
            nullable: true
            type: string
          nullable: true
          type: array
        address1:
          nullable: true
          type: string
        address2:
          nullable: true
          type: string
        allowedLoginIpRanges:
          items:
            nullable: true
            type: string
          nullable: true
          type: array
        applyMobileSessionLimit:
          nullable: true
          type: boolean
        audioAnalysisEnabled:
          nullable: true
          type: boolean
        audioRecordingEnabled:
          nullable: true
          type: boolean
        bandwidthReportsDisabled:
          nullable: true
          type: boolean
        companyLogoUrl:
          nullable: true
          type: string
        companyLogoUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        connectivityBatchWindowSecs:
          format: int32
          nullable: true
          type: integer
        countryCode:
          nullable: true
          type: string
        createdAtMillis:
          format: int64
          nullable: true
          type: integer
        criticalStatusEnabled:
          nullable: true
          type: boolean
        dataRetentionSettings:
          $ref: "#/components/schemas/DataRetentionSettingsType"
        defaultPlayerViewLiveType:
          $ref: "#/components/schemas/PlayerViewLiveTypeEnum"
        deleted:
          nullable: true
          type: boolean
        deletedAtMillis:
          format: int64
          nullable: true
          type: integer
        developmentPartnerOrg:
          nullable: true
          type: boolean
        firmwareUpdateSettings:
          $ref: "#/components/schemas/FirmwareUpdateSettingsType"
        firmwareUpdateSettingsOverrides:
          description: Overrides default firmware update settings.
          items:
            $ref: "#/components/schemas/FirmwareUpdateSettingsOverrideType"
          nullable: true
          type: array
        inactivityTimeout:
          format: int32
          nullable: true
          type: integer
        itemizedInvoice:
          nullable: true
          type: boolean
        keypadLogoUrl:
          nullable: true
          type: string
        keypadLogoUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        llmUsageEnabled:
          nullable: true
          type: boolean
        managedClientPolicy:
          $ref: "#/components/schemas/ManagedClientPolicyType"
        managingPartnerOrgUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        maxAllowedSegmentMaxBytesMap:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        mfaEnabled:
          nullable: true
          type: boolean
        mobileSessionLimitInDays:
          format: int32
          nullable: true
          type: integer
        motionGridDisabled:
          nullable: true
          type: boolean
        motionLightweightDisabled:
          nullable: true
          type: boolean
        mspDesignation:
          $ref: "#/components/schemas/MspDesignationType"
        name:
          nullable: true
          type: string
        newCameraFramerateMap:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        newCameraResolutionMap:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        newCameraSegmentMaxBytesMap:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        newCameraVideoTargetQualityMap:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        newCameraZeroMotionVideoQualityMap:
          additionalProperties:
            format: int32
            nullable: true
            type: integer
          nullable: true
          type: object
        notifyForHardwareFailureTickets:
          nullable: true
          type: boolean
        paneLinks:
          items:
            $ref: "#/components/schemas/OrgPaneLinkType"
          nullable: true
          type: array
        partnerAccessAllowedUntil:
          format: int32
          nullable: true
          type: integer
        postalCode:
          nullable: true
          type: string
        rhombusKeyLogoUrl:
          nullable: true
          type: string
        rhombusKeyLogoUuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        salesforceAccountId:
          nullable: true
          type: string
        shareAiTrainingMediaWithRhombus:
          nullable: true
          type: boolean
        subscriptionEndDate:
          format: int64
          nullable: true
          type: integer
        subscriptionStatus:
          $ref: "#/components/schemas/SubscriptionStatusEnum"
        subscriptionType:
          $ref: "#/components/schemas/SubscriptionTypeEnum"
        supportAccessAllowedUntil:
          format: int32
          nullable: true
          type: integer
        tenantUrl:
          nullable: true
          type: string
        thumbstripDisabled:
          nullable: true
          type: boolean
        type:
          $ref: "#/components/schemas/OrgTypeEnum"
        uapSettings:
          $ref: "#/components/schemas/UAPSettingsType"
        uuid:
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          format: RUUID
          nullable: true
          type: string
        v3AuthNumDaysSkip2FAForTrustedDevices:
          format: int32
          nullable: true
          type: integer
      type: object
    PlayerViewLiveTypeEnum:
      enum:
        - REALTIME
        - BUFFERED
      type: string
    FirmwareUpdateSettingsType:
      nullable: true
      properties:
        intervalsV2:
          items:
            $ref: "#/components/schemas/FirmwareUpdateIntervalType"
          nullable: true
          type: array
        mode:
          $ref: "#/components/schemas/FirmwareUpdateModeEnum"
      type: object
    FirmwareUpdateIntervalType:
      nullable: true
      properties:
        minuteOfWeekStart:
          format: int32
          nullable: true
          type: integer
        minuteOfWeekStop:
          format: int32
          nullable: true
          type: integer
      type: object
    FirmwareUpdateModeEnum:
      enum:
        - MANUAL
        - SCHEDULED
      type: string
    FirmwareUpdateSettingsOverrideType:
      description: Overrides default firmware update settings.
      nullable: true
      properties:
        deviceTypes:
          items:
            $ref: "#/components/schemas/DeviceTypeEnum"
          nullable: true
          type: array
          uniqueItems: true
        firmwareUpdateSettings:
          $ref: "#/components/schemas/FirmwareUpdateSettingsType"
      type: object
    DeviceTypeEnum:
      enum:
        - BLE_TRACKER
        - CAMERA
        - DOOR_SENSOR
        - ENVIRONMENTAL_SENSOR
        - OCCUPANCY_SENSOR
        - AUDIO_GATEWAY
        - EXECUTABLE
        - BADGE_READER
        - DOOR_CONTROLLER
        - BLE_BUTTON
        - IO_BOARD
        - ENVIRONMENTAL_GATEWAY
        - NVR
        - ROBOT
        - UNKNOWN
      type: string
    ManagedClientPolicyType:
      properties:
        clientSuperAdminAssignable:
          nullable: true
          type: boolean
      type: object
    MspDesignationType:
      nullable: true
      properties:
        agreementRef:
          nullable: true
          type: string
        approvals:
          items:
            $ref: "#/components/schemas/MspApproval"
          nullable: true
          type: array
        contractSignedDate:
          format: int64
          nullable: true
          type: integer
        keyId:
          nullable: true
          type: string
        proposedAtMillis:
          format: int64
          nullable: true
          type: integer
        salesforceAccountId:
          nullable: true
          type: string
        signature:
          description: Base64 ECDSA (P-256, SHA-256) signature over the canonical designation payload.
          nullable: true
          type: string
        signedAtMillis:
          format: int64
          nullable: true
          type: integer
        source:
          description: "How the designation landed: SALESFORCE_PULL or ADMIN_SYNC."
          nullable: true
          type: string
        status:
          $ref: "#/components/schemas/MspDesignationStatusEnum"
      type: object
    MspApproval:
      nullable: true
      properties:
        adminUser:
          nullable: true
          type: string
        timestampMillis:
          format: int64
          nullable: true
          type: integer
      type: object
    MspDesignationStatusEnum:
      enum:
        - PENDING_APPROVAL
        - ACTIVE
        - REVOKED
        - UNKNOWN
      type: string
    OrgPaneLinkType:
      nullable: true
      properties:
        description:
          nullable: true
          type: string
        label:
          nullable: true
          type: string
        paneId:
          nullable: true
          type: string
        permissionGroupUuids:
          items:
            nullable: true
            type: string
          nullable: true
          type: array
        tier:
          $ref: "#/components/schemas/LicenseEnum"
        userUuids:
          items:
            nullable: true
            type: string
          nullable: true
          type: array
      type: object
    LicenseEnum:
      enum:
        - STARTER
        - STANDARD
        - ENTERPRISE
        - LEGACY
      type: string
    SubscriptionStatusEnum:
      enum:
        - TRIAL
        - PAID
        - RESELLER
        - LOST
        - UNKNOWN
      type: string
    SubscriptionTypeEnum:
      enum:
        - STARTER
        - PROFESSIONAL
        - ENTERPRISE
        - UNKNOWN
      type: string
    OrgTypeEnum:
      enum:
        - PARTNER
        - CUSTOMER
        - UNKNOWN
      type: string
    UAPSettingsType:
      nullable: true
      properties:
        enabled:
          nullable: true
          type: boolean
        text:
          nullable: true
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header set to `api-token` (or `partner-api-token` for partner endpoints).
      in: header
      name: x-auth-apikey
      type: apiKey
    oauth2:
      description: 'OAuth 2.0 authorization code flow with PKCE (`S256`). Send the access token as `Authorization: Bearer <token>`. Each operation lists the scopes it requires; a token without them is refused 403 with `WWW-Authenticate: Bearer error="insufficient_scope"`.'
      flows:
        authorizationCode:
          authorizationUrl: https://console.rhombus.com/oauth/authorize
          refreshUrl: https://auth-web.rhombussystems.com/oauth/token
          scopes:
            physical: Unlock doors and elevators, lockdown, alarms, speakers and robots
            read: View cameras, footage and settings
            write: Change settings and data
          tokenUrl: https://auth-web.rhombussystems.com/oauth/token
      type: oauth2
````
