# Sync Subscription

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/public/v1/subscription/paymentHash/sync:
    post:
      summary: Sync Subscription
      deprecated: false
      description: >-
        Triggers real-time sync from VPN server. Returns updated
        bandwidth/expiry.
      tags:
        - 🔐 Authenticated
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer {{apiKey}}
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  subscription:
                    type: object
                    properties:
                      id:
                        type: string
                      bandwidth_used:
                        type: integer
                      bandwidth_limit:
                        type: integer
                      last_synced_at:
                        type: string
                      expiresAt:
                        type: string
                    required:
                      - id
                      - bandwidth_used
                      - bandwidth_limit
                      - last_synced_at
                      - expiresAt
                    x-apidog-orders:
                      - id
                      - bandwidth_used
                      - bandwidth_limit
                      - last_synced_at
                      - expiresAt
                required:
                  - success
                  - subscription
                x-apidog-orders:
                  - success
                  - subscription
              example:
                success: true
                subscription:
                  id: sub-xyz789
                  bandwidth_used: 2489
                  bandwidth_limit: 100000
                  last_synced_at: '2026-01-15T14:20:00.000Z'
                  expiresAt: '2026-02-01T10:30:00.000Z'
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: 🔐 Authenticated
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/361232/apis/api-4063137-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: bearer
      scheme: bearer
      description: Authenticate using your TunnelSats API Key (sk_live_...).
    NostrAuth:
      type: bearer
      scheme: bearer
      description: >-
        NIP-98 Nostr Authentication. The 'token' should be the base64-encoded
        NIP-98 event JSON.
servers:
  - url: https://tunnelsats.com
    description: Prod Env
security: []

```