Gravatar qr-code API

Operations about QR codes

OpenAPI Specification

gravatar-qr-code-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Gravatar Public avatars qr-code API
  version: 3.0.0
  description: Gravatar's public API endpoints
  contact:
    name: Gravatar
    url: https://gravatar.com
servers:
- url: https://api.gravatar.com/v3
  description: Production server
tags:
- name: qr-code
  description: Operations about QR codes
paths:
  /qr-code/{sha256_hash}:
    get:
      summary: Get QR code for an email address' profile
      description: Returns a QR code for an email address by the given SHA256 hash.
      tags:
      - qr-code
      operationId: getQrCodeBySha256Hash
      parameters:
      - name: sha256_hash
        in: path
        required: true
        description: The SHA256 hash of the email address or profile URL slug.
        schema:
          type: string
      - name: size
        in: query
        required: false
        description: The size of the QR code.
        schema:
          type: integer
      - name: version
        in: query
        required: false
        description: The version of the QR code.
        schema:
          type: string
      - name: utm_medium
        in: query
        required: false
        description: The medium of the UTM parameters. Appended to the URL in the QR code.
        schema:
          type: string
      - name: utm_campaign
        in: query
        required: false
        description: The campaign of the UTM parameters. Appended to the URL in the QR code.
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: The type of center icon to display ('user' for avatar, 'gravatar' for logo, 'none' for no icon).
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          headers:
            X-Gravatar-Profile-Status:
              description: 'The status of the profile. Possible values: ''enabled'', ''disabled'', ''not-found'''
              schema:
                type: string
                examples:
                - enabled
                - disabled
                - not-found
          content:
            image/png:
              schema:
                type: string
                format: binary
        '429':
          description: Rate limit exceeded
          $ref: '#/components/responses/rate_limit_exceeded'
        '500':
          description: Internal server error
components:
  headers:
    X-RateLimit-Remaining:
      description: The number of remaining requests in the current period.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: The time at which the current rate limit period resets, in Unix timestamp format.
      schema:
        type: integer
    X-RateLimit-Limit:
      description: The number of allowed requests in the current period.
      schema:
        type: integer
  schemas:
    Error:
      type: object
      description: An error response from the API.
      properties:
        error:
          type: string
          description: The error message
        code:
          type: string
          description: The error code for the error message
      required:
      - error
  responses:
    rate_limit_exceeded:
      description: Rate Limit Exceeded
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rate_limit_exceeded:
              value:
                error: Rate limit exceeded
                code: rate_limit_exceeded
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Bearer token to authenticate the request. Full profile information is only available in authenticated requests.
    oauth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://public-api.wordpress.com/oauth2/authorize
          scopes: {}
      description: WordPress OAuth token to authenticate the request.