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

# Get the org's per-domain data-retention policy

> Returns this organization's message-body redaction, closed-conversation hard-delete, and audit-log purge retention policy plus the allowed min/max windows (GDPR Art. 5(1)(e) storage-limitation). All three domains are disabled by default. Read-only — this endpoint returns the policy; redaction and deletion are carried out asynchronously by scheduled background sweeps.



## OpenAPI

````yaml /openapi.yaml get /api/v1/compliance/data-retention
openapi: 3.1.0
info:
  title: Devotel CPaaS API
  description: Orbit by Devotel — Communications Platform as a Service API
  version: 1.0.0
  contact:
    name: Devotel
    url: https://devotel.io
    email: support@devotel.io
  license:
    name: Proprietary
servers:
  - url: https://api.orbit.devotel.io
    description: Production
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Messages
    description: >-
      Send and manage messages across all channels (SMS, WhatsApp, RCS, Email,
      Viber, etc.)
  - name: Fax
    description: >-
      List and track fax (MMS/T.38) transmissions on Telnyx-backed fax numbers
      (sending flows through the Messaging API)
  - name: Agents
    description: AI agent creation, configuration, and execution
  - name: Voice
    description: Voice calls, IVR, conferencing, and SIP trunking
  - name: OnCall
    description: On-call rotations and escalation policy planning for incident alerting
  - name: Webhooks
    description: Webhook endpoint management and delivery logs
  - name: Numbers
    description: Phone number search, provisioning, and configuration
  - name: Brand Identity
    description: >-
      Unified cross-channel brand trust posture (10DLC, toll-free, WhatsApp,
      RCS, branded calling, number KYC)
  - name: Contacts
    description: Contact management, segmentation, and lifecycle tracking
  - name: Campaigns
    description: Marketing campaign orchestration and analytics
  - name: Flows
    description: Automation flow builder and execution engine
  - name: Templates
    description: Message template management and approval workflows
  - name: Settings
    description: Organization, channel, and user preference settings
  - name: Verify
    description: OTP generation and verification across channels
  - name: Push
    description: Push notification delivery via FCM and APNs
  - name: Integrations
    description: Third-party service connections and OAuth management
  - name: CDP
    description: >-
      Customer Data Platform — activation surface (CRM object sync, streaming
      destinations, ad-audience activation)
  - name: Files
    description: >-
      Server-to-server media upload, listing, retrieval, and deletion
      (signed-URL backed)
  - name: Commerce
    description: >-
      Omnichannel conversational-commerce — persistent cart + checkout state
      machine, channel-agnostic hosted pay-by-link, native WhatsApp checkout,
      and AP2-style agent payment mandates.
  - name: Sync
    description: >-
      Real-time shared-state primitive (Twilio Sync parity) — Documents, Maps,
      Lists, and ephemeral Streams, with change events relayed over the
      /api/v1/ws/sync WebSocket gateway
paths:
  /api/v1/compliance/data-retention:
    get:
      tags:
        - Compliance
      summary: Get the org's per-domain data-retention policy
      description: >-
        Returns this organization's message-body redaction, closed-conversation
        hard-delete, and audit-log purge retention policy plus the allowed
        min/max windows (GDPR Art. 5(1)(e) storage-limitation). All three
        domains are disabled by default. Read-only — this endpoint returns the
        policy; redaction and deletion are carried out asynchronously by
        scheduled background sweeps.
      responses:
        '200':
          description: The org's resolved per-domain data-retention policy.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DataRetentionPolicyView'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
components:
  schemas:
    DataRetentionPolicyView:
      type: object
      description: >-
        The org's resolved per-domain data-retention policy (GDPR Art. 5(1)(e)
        storage-limitation) plus the allowed min/max windows. All three domains
        are disabled by default. This endpoint records policy only; redaction
        and deletion are carried out asynchronously by scheduled background
        sweeps, not at the moment you read or write this policy.
      required:
        - messages
        - conversations
        - audit_logs
        - bounds
      additionalProperties: false
      properties:
        messages:
          type: object
          description: >-
            Message-body redaction policy. When enabled, the message body and
            recipient/sender identifiers are redacted after N days while
            billing-grade metadata (status, segments, price, carrier error) and
            the DLR/audit trail survive intact.
          required:
            - redact_body_after_days
          additionalProperties: false
          properties:
            redact_body_after_days:
              type: integer
              description: >-
                Days after which a message body is redacted. `0` means the
                scheduled sweep is disabled; any other value is within
                [bounds.messages.redact_body_min_days,
                bounds.messages.redact_body_max_days].
        conversations:
          type: object
          description: >-
            Closed-conversation hard-delete policy. When enabled, a conversation
            row is hard-deleted once it has been CLOSED longer than the window;
            attached message rows are not cascaded, so billing/audit metadata
            survives.
          required:
            - enabled
            - delete_closed_after_days
          additionalProperties: false
          properties:
            enabled:
              type: boolean
              description: Whether the closed-conversation purge runs for this org.
            delete_closed_after_days:
              type: integer
              description: >-
                Days a conversation must have been closed before it is purged,
                within [bounds.conversations.delete_closed_min_days,
                bounds.conversations.delete_closed_max_days].
        audit_logs:
          type: object
          description: >-
            Audit-log purge policy. When enabled, `audit_logs` rows older than
            the window are hard-deleted. The minimum window is a regulatory
            FLOOR protecting the SOC2 examination window.
          required:
            - enabled
            - delete_after_days
          additionalProperties: false
          properties:
            enabled:
              type: boolean
              description: Whether the audit-log purge runs for this org.
            delete_after_days:
              type: integer
              description: >-
                Days an audit row must exist before it is purged, within
                [bounds.audit_logs.delete_min_days,
                bounds.audit_logs.delete_max_days].
        bounds:
          type: object
          description: The allowed min/max windows the UI uses to clamp inputs.
          required:
            - messages
            - conversations
            - audit_logs
          additionalProperties: false
          properties:
            messages:
              type: object
              required:
                - redact_body_min_days
                - redact_body_max_days
              additionalProperties: false
              properties:
                redact_body_min_days:
                  type: integer
                redact_body_max_days:
                  type: integer
            conversations:
              type: object
              required:
                - delete_closed_min_days
                - delete_closed_max_days
              additionalProperties: false
              properties:
                delete_closed_min_days:
                  type: integer
                delete_closed_max_days:
                  type: integer
            audit_logs:
              type: object
              required:
                - delete_min_days
                - delete_max_days
              additionalProperties: false
              properties:
                delete_min_days:
                  type: integer
                delete_max_days:
                  type: integer
    ResponseMeta:
      type: object
      required:
        - request_id
        - timestamp
      additionalProperties: false
      properties:
        request_id:
          type: string
          description: Unique request identifier (also returned as X-Request-Id header)
        timestamp:
          type: string
          format: date-time
        docs_url:
          type: string
          format: uri
          nullable: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Dashboard JWT token from Clerk
    ApiKey:
      type: apiKey
      name: X-API-Key
      in: header
      description: Server-to-server API key (dv_live_sk_*)

````