Dialect Blink API

The Blink API from Dialect — 2 operation(s) for blink.

OpenAPI Specification

dialect-blink-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Dialect Alerts V2 Blink API
  description: Dialect Alerts API supporting both subscriber and app authentication methods.
  version: 2.2.0-beta
servers:
- url: https://alerts-api.dial.to
  description: Dialect Production
- url: https://alerts.dialectapi.to
  description: Dialect Production
security: []
tags:
- name: Blink
paths:
  /v1/blink:
    get:
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blink'
        '502':
          description: Failed to fetch data from Blink Provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionError'
      operationId: getFullBlink
      summary: Get Full Blink
      tags:
      - Blink
      description: Retrieve complete interactive Blink with all available actions and metadata
      parameters:
      - in: query
        name: apiUrl
        schema:
          type: string
          format: uri
          description: Blink API URL
          default: https://jito.dial.to/stake
          example: https://jito.dial.to/stake
        required: true
    post:
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/TransactionResponse'
                - $ref: '#/components/schemas/PostResponse'
                - $ref: '#/components/schemas/ExternalLinkResponse'
                - $ref: '#/components/schemas/SignMessageResponse'
        '502':
          description: Failed to fetch data from Blink Provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionError'
      operationId: executeBlinkAction
      summary: Execute Blink Action
      tags:
      - Blink
      description: Returns a ready-to-sign transaction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionPostRequest'
      parameters:
      - in: query
        name: apiUrl
        schema:
          type: string
          format: uri
          description: Blink API URL
          default: https://jito.dial.to/stake
          example: https://jito.dial.to/stake
        required: true
  /v1/blink/chain:
    post:
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - transaction
                      - message
                      - post
                      - external-link
                    message:
                      type: string
                    links:
                      type: object
                      properties:
                        next:
                          $ref: '#/components/schemas/NextActionLink'
                      required:
                      - next
                - $ref: '#/components/schemas/CompletedAction'
        '502':
          description: Failed to fetch data from Blink Provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionError'
      operationId: executeChainedAction
      summary: Execute Chained Action
      tags:
      - Blink
      description: Endpoint for action chaining (multi-step workflows)
      parameters:
      - in: query
        name: apiUrl
        schema:
          type: string
          format: uri
          description: Blink API URL
          default: https://jito.dial.to/stake
          example: https://jito.dial.to/stake
        required: true
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/NextActionPostRequest'
              - $ref: '#/components/schemas/MessageNextActionPostRequest'
components:
  schemas:
    NextActionLink:
      anyOf:
      - type: object
        properties:
          type:
            type: string
            const: post
          href:
            type: string
        required:
        - type
        - href
      - type: object
        properties:
          type:
            type: string
            const: inline
          action:
            type: object
            properties:
              type:
                type: string
                enum:
                - action
                - completed
              icon:
                type: string
              title:
                type: string
              description:
                type: string
              extendedDescription:
                type: string
              label:
                type: string
              disabled:
                type: boolean
              links:
                type: object
                properties:
                  actions:
                    type: array
                    items:
                      $ref: '#/components/schemas/LinkedAction'
                required:
                - actions
              error:
                $ref: '#/components/schemas/ActionError'
              context:
                $ref: '#/components/schemas/BlinkContext'
              preview:
                $ref: '#/components/schemas/BlinkPreview'
            required:
            - type
            - icon
            - title
            - description
            - label
            - context
            - preview
        required:
        - type
        - action
      description: Next Action Link
    MessageNextActionPostRequest:
      type: object
      properties:
        account:
          type: string
        signature:
          type: string
        state:
          type: string
        data:
          anyOf:
          - type: string
          - $ref: '#/components/schemas/SignMessageData'
      required:
      - account
      - signature
      - data
      description: Message Next Action Post Request
    ActionError:
      type: object
      properties:
        message:
          type: string
      required:
      - message
      description: Error
    BlinkProvider:
      type: object
      properties:
        name:
          type: string
        icon:
          type: string
      required:
      - name
      description: Blink Provider
    LinkedAction:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/LinkedActionType'
        href:
          type: string
        label:
          type: string
        parameters:
          type: array
          items: {}
      required:
      - type
      - href
      - label
      description: Linked Action
    NextActionPostRequest:
      type: object
      properties:
        signature:
          type: string
        state:
          type: string
        account:
          type: string
        data:
          type: object
          additionalProperties:
            anyOf:
            - type: string
            - type: array
              items:
                type: string
      required:
      - account
      description: Next Action Post Request
    CompletedAction:
      type: object
      properties:
        type:
          type: string
          const: completed
        icon:
          type: string
        title:
          type: string
        description:
          type: string
        label:
          type: string
        disabled:
          type: boolean
        error:
          type: string
        message:
          type: string
      required:
      - type
      - icon
      - title
      - description
      - label
      description: Completed Action
    BlinkPreview:
      type: object
      properties:
        image:
          type: string
        title:
          type: string
        description:
          type: string
        cta:
          type: string
        context:
          $ref: '#/components/schemas/BlinkContext'
      required:
      - image
      - title
      - description
      - context
      description: Blink Preview
    SignMessageData:
      type: object
      properties:
        domain:
          type: string
        address:
          type: string
        statement:
          type: string
        nonce:
          type: string
          minLength: 8
        issuedAt:
          type: string
        chainId:
          type: string
      required:
      - domain
      - address
      - statement
      - nonce
      - issuedAt
      description: Sign Message Data
    ExternalLinkResponse:
      type: object
      properties:
        type:
          type: string
          const: external-link
        message:
          type: string
        links:
          type: object
          properties:
            next:
              $ref: '#/components/schemas/NextActionLink'
          required:
          - next
        externalLink:
          type: string
      required:
      - type
      - externalLink
      description: External Link Response
    LinkedActionType:
      type: string
      enum:
      - transaction
      - message
      - post
      - external-link
      - inline-link
      description: Linked Action Type
    Blink:
      type: object
      properties:
        type:
          type: string
          enum:
          - action
          - completed
        icon:
          type: string
        title:
          type: string
        description:
          type: string
        extendedDescription:
          type: string
        label:
          type: string
        disabled:
          type: boolean
        links:
          type: object
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/LinkedAction'
            dataTable:
              type: string
        error:
          $ref: '#/components/schemas/ActionError'
        context:
          $ref: '#/components/schemas/BlinkContext'
        preview:
          $ref: '#/components/schemas/BlinkPreview'
        message:
          type: string
      required:
      - type
      - icon
      - title
      - description
      - label
      - context
      - preview
      description: Blink
    SignMessageResponse:
      type: object
      properties:
        type:
          type: string
          const: message
        message:
          type: string
        links:
          type: object
          properties:
            next:
              $ref: '#/components/schemas/PostNextActionLink'
          required:
          - next
        data:
          anyOf:
          - type: string
          - $ref: '#/components/schemas/SignMessageData'
        state:
          type: string
      required:
      - type
      - links
      - data
      description: Sign Message Response
    TransactionResponse:
      type: object
      properties:
        type:
          type: string
          const: transaction
        message:
          type: string
        links:
          type: object
          properties:
            next:
              $ref: '#/components/schemas/NextActionLink'
          required:
          - next
        transaction:
          type: string
        lifecycle:
          type: object
          properties:
            executing:
              type: object
              properties:
                message:
                  type: string
            success:
              type: object
              properties:
                message:
                  type: string
                links:
                  type: object
                  properties:
                    actions:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            const: inline-link
                          label:
                            type: string
                          link:
                            type: string
                        required:
                        - type
                        - label
                        - link
                  required:
                  - actions
            error:
              type: object
              properties:
                message:
                  type: string
      required:
      - type
      - transaction
      description: Transaction Response
    PostResponse:
      type: object
      properties:
        type:
          type: string
          const: post
        message:
          type: string
        links:
          type: object
          properties:
            next:
              $ref: '#/components/schemas/NextActionLink'
          required:
          - next
      required:
      - type
      description: Post Response
    ActionPostRequest:
      type: object
      properties:
        type:
          type: string
          enum:
          - transaction
          - message
          - post
          - external-link
        account:
          type: string
        data:
          type: object
          additionalProperties:
            anyOf:
            - type: string
            - type: array
              items:
                type: string
      required:
      - account
      description: Action Post Request
    PostNextActionLink:
      type: object
      properties:
        type:
          type: string
          const: post
        href:
          type: string
      required:
      - type
      - href
      description: Post Next Action Link
    BlinkContext:
      type: object
      properties:
        url:
          type: string
        websiteUrl:
          type: string
        category:
          type: string
        provider:
          $ref: '#/components/schemas/BlinkProvider'
      required:
      - url
      description: Blink Context
  securitySchemes:
    subscriber:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication for subscriber calls.
    application:
      type: apiKey
      description: API key to authorize app-level requests.
      name: x-dialect-api-key
      in: header