# Get subscriptions

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/dns-shield/subscriptions:
    get:
      summary: Get subscriptions
      deprecated: false
      description: >-
        Retrieve all DNS Shield subscriptions (both Monthly and LTD) for the
        authenticated user. This endpoint returns comprehensive details about
        each subscription including status, pricing, billing cycle, slot
        capacity, and usage.
      tags:
        - dns shield
      parameters:
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: x-workspace-key
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: x-service-provider
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        subscriptionId:
                          type: string
                        status:
                          type: string
                        lookupKey:
                          type: string
                        periodStart:
                          type: string
                        periodEnd:
                          type: string
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                        cancelledByUser:
                          type: boolean
                        invoiceLink:
                          type: string
                        paymentFailureMessage:
                          type: 'null'
                        price:
                          type: integer
                        billingCycle:
                          type: string
                        totalSlots:
                          type: string
                        totalUsedSlots:
                          type: integer
                        planType:
                          type: string
                          nullable: true
                      required:
                        - id
                        - subscriptionId
                        - status
                        - lookupKey
                        - periodStart
                        - periodEnd
                        - createdAt
                        - updatedAt
                        - cancelledByUser
                        - invoiceLink
                        - paymentFailureMessage
                        - price
                        - billingCycle
                        - totalSlots
                        - totalUsedSlots
                        - planType
                      x-apidog-orders:
                        - id
                        - subscriptionId
                        - status
                        - lookupKey
                        - periodStart
                        - periodEnd
                        - createdAt
                        - updatedAt
                        - cancelledByUser
                        - invoiceLink
                        - paymentFailureMessage
                        - price
                        - billingCycle
                        - totalSlots
                        - totalUsedSlots
                        - planType
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: DNS Shield subscriptions retrieved
                data:
                  - id: sub-uuid-1
                    subscriptionId: ltd_pro_abc123xyz
                    status: ACTIVE
                    lookupKey: dns_shield_pro_ltd_2
                    periodStart: '2024-01-15T00:00:00.000Z'
                    periodEnd: '2099-12-31T23:59:59.000Z'
                    createdAt: '2024-01-15T10:30:00.000Z'
                    updatedAt: '2024-02-01T14:20:00.000Z'
                    cancelledByUser: false
                    invoiceLink: <https://invoice.stripe.com/i/acct_xxxx/test_xxxx>
                    paymentFailureMessage: null
                    price: 299900
                    billingCycle: LTD
                    totalSlots: '500'
                    totalUsedSlots: 350
                    planType: PRO
                  - id: sub-uuid-2
                    subscriptionId: sub_1AbcDefGhiJklMnop
                    status: ACTIVE
                    lookupKey: zap_dns_shield
                    periodStart: '2024-02-01T00:00:00.000Z'
                    periodEnd: '2024-03-01T00:00:00.000Z'
                    createdAt: '2024-02-01T08:15:00.000Z'
                    updatedAt: '2024-02-01T08:15:00.000Z'
                    cancelledByUser: false
                    invoiceLink: <https://invoice.stripe.com/i/acct_yyyy/test_yyyy>
                    paymentFailureMessage: null
                    price: 15000
                    billingCycle: MONTHLY
                    totalSlots: '999999'
                    totalUsedSlots: 50
                    planType: null
                  - id: sub-uuid-3
                    subscriptionId: ltd_starter_def456uvw
                    status: CANCELLED
                    lookupKey: dns_shield_starter_ltd
                    periodStart: '2023-12-01T00:00:00.000Z'
                    periodEnd: '2024-01-15T00:00:00.000Z'
                    createdAt: '2023-12-01T12:00:00.000Z'
                    updatedAt: '2024-01-15T09:00:00.000Z'
                    cancelledByUser: true
                    invoiceLink: <https://invoice.stripe.com/i/acct_zzzz/test_zzzz>
                    paymentFailureMessage: null
                    price: 9900
                    billingCycle: LTD
                    totalSlots: '30'
                    totalUsedSlots: 30
                    planType: STARTER
          headers: {}
          x-apidog-name: Success
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      errorId:
                        type: string
                    required:
                      - errorId
                    x-apidog-orders:
                      - errorId
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 401
                message: Invalid API key
                data:
                  errorId: unique-error-id
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      errorId:
                        type: string
                    required:
                      - errorId
                    x-apidog-orders:
                      - errorId
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 500
                message: Internal server error
                data:
                  errorId: unique-error-id
          headers: {}
          x-apidog-name: Internal Server Error
      security: []
      x-apidog-folder: dns shield
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-25781447-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
