Unlock Protocol Email Subscriptions API

The Email Subscriptions API from Unlock Protocol — 2 operation(s) for email subscriptions.

OpenAPI Specification

unlock-protocol-email-subscriptions-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Unlock Locksmith Applications Email Subscriptions API
  version: '2'
  description: Locksmith provides backend functionality for enabling ticketing, metadata storage, and notification hooks.
  license:
    name: MIT
servers:
- url: https://locksmith.unlock-protocol.com
  description: Production Server
- url: https://staging-locksmith.unlock-protocol.com
  description: Staging Server
tags:
- name: Email Subscriptions
paths:
  /v2/email-subscriptions/unsubscribe/{network}/locks/{lockAddress}:
    post:
      operationId: unsubscribeEmail
      security:
      - User: []
      description: Unsubscribe email from lock
      parameters:
      - $ref: '#/components/parameters/Network'
      - $ref: '#/components/parameters/LockAddress'
      responses:
        200:
          description: Successfully unsubscribed email from lock
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        400:
          $ref: '#/components/responses/400.Invalid'
        500:
          $ref: '#/components/responses/500.InternalError'
      tags:
      - Email Subscriptions
  /v2/email-subscriptions/subscribe/{network}/locks/{lockAddress}:
    post:
      operationId: reSubscribeEmail
      security:
      - User: []
      description: resubscribe emails from lock
      parameters:
      - $ref: '#/components/parameters/Network'
      - $ref: '#/components/parameters/LockAddress'
      responses:
        200:
          description: Successfully subscribed email from lock
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        400:
          $ref: '#/components/responses/400.Invalid'
        500:
          $ref: '#/components/responses/500.InternalError'
      tags:
      - Email Subscriptions
components:
  schemas:
    GenericInvalidBodyError:
      type: object
      nullable: false
      properties:
        message:
          type: string
          default: Response body schema is invalid.
          nullable: false
        error:
          type: string
          nullable: true
    GenericServerError:
      type: object
      nullable: false
      properties:
        message:
          type: string
          default: There was an error in fullfiling the request.
          nullable: false
  responses:
    400.Invalid:
      description: Invalid input received. Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericInvalidBodyError'
    500.InternalError:
      description: Unable to fullfil request due to internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericServerError'
  parameters:
    Network:
      in: path
      name: network
      required: true
      description: Network id.
      schema:
        type: integer
    LockAddress:
      in: path
      name: lockAddress
      required: true
      description: Lock address.
      schema:
        type: string
  securitySchemes:
    User:
      type: http
      scheme: bearer
      bearerFormat: JWT
    Application:
      type: apiKey
      name: api-key
      in: query