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

# Create or update a subscription group

> Create or update a subscription group.



## OpenAPI

````yaml put /api/admin/subscription-groups/
openapi: 3.1.0
info:
  title: Tranthor API
  description: Tranthor API Swagger Documentation
  version: 0.0.1
servers: []
security: []
paths:
  /api/admin/subscription-groups/:
    put:
      tags:
        - Subscription Groups
      description: Create or update a subscription group.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                workspaceId:
                  type: string
                name:
                  type: string
                channel:
                  anyOf:
                    - type: string
                      enum:
                        - Email
                    - type: string
                      enum:
                        - MobilePush
                    - type: string
                      enum:
                        - Sms
                    - type: string
                      enum:
                        - Webhook
                    - type: string
                      enum:
                        - Whatsapp
                type:
                  anyOf:
                    - type: string
                      enum:
                        - OptIn
                    - type: string
                      enum:
                        - OptOut
                description:
                  anyOf:
                    - type: 'null'
                    - maxLength: 200
                      type: string
              required:
                - id
                - workspaceId
                - name
                - channel
                - type
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  workspaceId:
                    type: string
                  name:
                    type: string
                  channel:
                    anyOf:
                      - type: string
                        enum:
                          - Email
                      - type: string
                        enum:
                          - MobilePush
                      - type: string
                        enum:
                          - Sms
                      - type: string
                        enum:
                          - Webhook
                      - type: string
                        enum:
                          - Whatsapp
                  type:
                    anyOf:
                      - type: string
                        enum:
                          - OptIn
                      - type: string
                        enum:
                          - OptOut
                  description:
                    anyOf:
                      - type: 'null'
                      - maxLength: 200
                        type: string
                  createdAt:
                    type: number
                  updatedAt:
                    type: number
                required:
                  - id
                  - workspaceId
                  - name
                  - channel
                  - type
                  - createdAt
                  - updatedAt
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  rowErrors:
                    type: array
                    items:
                      type: object
                      properties:
                        row:
                          type: number
                        error:
                          type: string
                      required:
                        - row
                        - error
                required:
                  - message
        '404':
          description: An empty String
          content:
            application/json:
              schema:
                description: An empty String
                type: string
      security:
        - adminApiKey: []
components:
  securitySchemes:
    adminApiKey:
      type: http
      scheme: bearer
      description: >-
        An Admin API key, sent as `Authorization: Bearer <key>`. Create one in
        Settings.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.