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

# Update subscription status

> Updates the status of a subscription, allowing actions such as cancelation, immediate cancelation, or resumption.

**Business Use-case:** Useful for managing the lifecycle of subscriptions, including cancelation and resumption.

**Path Parameters:**
- `id`: Subscription ID (path parameter, required).

**Request Body:**
- `action`: The action to perform on the subscription (required: `cancel`, `cancel_immediately`, or `resume`).

**Responses:**
- `200`: Subscription updated successfully.
- `400`: Bad request if action is invalid.
- `401`: Unauthorized if `x-store-id` is missing.
- `404`: Not Found if the subscription does not exist.



## OpenAPI

````yaml /api-reference/blink-api.json patch /v1/subscriptions/{id}
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security:
  - storeIdHeader: []
tags:
  - name: Invoices
    description: Unified merchant of record invoices for products and subscriptions.
  - name: Geo Pricing
    description: Resolve Purchasing Power Parity (PPP) localized pricing.
paths:
  /v1/subscriptions/{id}:
    patch:
      tags:
        - Subscriptions
      summary: Update subscription status
      description: >-
        Updates the status of a subscription, allowing actions such as
        cancelation, immediate cancelation, or resumption.


        **Business Use-case:** Useful for managing the lifecycle of
        subscriptions, including cancelation and resumption.


        **Path Parameters:**

        - `id`: Subscription ID (path parameter, required).


        **Request Body:**

        - `action`: The action to perform on the subscription (required:
        `cancel`, `cancel_immediately`, or `resume`).


        **Responses:**

        - `200`: Subscription updated successfully.

        - `400`: Bad request if action is invalid.

        - `401`: Unauthorized if `x-store-id` is missing.

        - `404`: Not Found if the subscription does not exist.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: x-store-id
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: 41871deb-1887-43cb-8eb4-06699ddead86
      responses:
        '200':
          description: Subscription updated successfully
          content:
            application/json:
              schema:
                $ref: 7306c200-c7ea-40e8-bf85-b4c5791834a6
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
components:
  securitySchemes:
    storeIdHeader:
      type: apiKey
      in: header
      name: x-store-id

````