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

# Get subscription by id

> Fetches subscription details by the specific subscription ID.



## OpenAPI

````yaml get /v1/subscriptions/{id}
openapi: 3.0.1
info:
  title: Webhook Subscriptions API
  description: Webhook Subscriptions definitions
  termsOfService: https://pleo.io/terms/
  contact:
    email: partner-ecosystem-team@pleo.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 11.7.0
servers:
  - url: https://external.pleo.io
    description: Production server
  - url: https://external.staging.pleo.io
    description: Staging server
security:
  - bearerAuth: []
  - basicAuth: []
tags:
  - name: Webhook Subscriptions
    description: >-
      The Webhooks functionality sends real-time event notifications to
      third-party integrations. To receive notifications, you must register for
      webhook subscriptions. This API enables you to perform CRUD (Create, Read,
      Update, and Delete) subscription operations.
  - name: Event Types
  - name: Subscriptions
paths:
  /v1/subscriptions/{id}:
    get:
      tags:
        - Subscriptions
      summary: Get subscription by id
      description: Fetches subscription details by the specific subscription ID.
      operationId: getSubscriptionById
      parameters:
        - name: id
          in: path
          description: The unique identifier of the subscription
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: The subscription details are returned.
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '404':
          description: The subscription record could not be found.
components:
  schemas:
    SubscriptionResponse:
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SubscriptionModel'
    SubscriptionModel:
      required:
        - createdAt
        - endpointUrl
        - eventTypes
        - id
        - status
        - updatedAt
      type: object
      properties:
        createdAt:
          type: string
          description: The time when the subscription was created
          format: date-time
          readOnly: true
          example: '2022-01-01T00:00:00Z'
        customHeaders:
          type: object
          additionalProperties:
            type: string
            description: Key values as headers to be sent to the webhooks vendor
            example: '{"user":"pass"}'
          description: Key values as headers to be sent to the webhooks vendor
          example:
            user: pass
        deletedAt:
          type: string
          description: The time when the subscription was deleted
          format: date-time
          readOnly: true
          example: '2022-01-01T00:00:00Z'
        deletedBy:
          type: string
          description: The identifier of the user who deleted the subscription
          readOnly: true
          example: urn:pleo:organisation:12345678-1234-1234-1234-123456789012
        endpointAuth:
          $ref: '#/components/schemas/EndpointAuth'
        endpointUrl:
          type: string
          description: The URL where the events should be sent
          readOnly: true
          example: https://example.com/webhook
        eventTypes:
          uniqueItems: true
          type: array
          description: The type of the event
          readOnly: true
          example: v1.export-job.created
          items:
            type: string
            description: The type of the event
            readOnly: true
            example: v1.export-job.created
        id:
          type: string
          description: The unique identifier of the subscription
          format: uuid
          readOnly: true
          example: 123e4567-e89b-12d3-a456-426614174000
        status:
          type: string
          description: The status of the subscription
          example: ACTIVE
          enum:
            - INACTIVE
            - ACTIVE
        updatedAt:
          type: string
          description: The last time the subscription was updated
          format: date-time
          readOnly: true
          example: '2022-01-10T00:00:00Z'
    EndpointAuth:
      type: object
      properties:
        credentials:
          $ref: '#/components/schemas/AuthCredential'
        type:
          type: string
          description: Authentication type for the endpoint. Default is NONE
          example: NONE
          enum:
            - NONE
            - BASIC
      description: Authentication details for the endpoint
    AuthCredential:
      type: object
      properties:
        password:
          type: string
          description: Password for basic authentication
          example: password
        token:
          type: string
          description: Token for bearer authentication
          example: token
        username:
          type: string
          description: Username for basic authentication
          example: username
      description: Authentication credentials
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Bearer <token>`
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      description: >-
        Basic HTTP authentication using API key. Use your API key as the
        username and leave the password empty. The credentials will be Base64
        encoded automatically.
      scheme: basic

````