PushPress ApiKeys API

Programmatic API key management.

OpenAPI Specification

pushpress-apikeys-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PushPress Platform ApiKeys API
  description: 'The PushPress Platform API lets developers integrate with the PushPress gym and fitness business management platform. It exposes gym members (customers), check-ins (class, appointment, event, and open-facility), appointments, classes and class types, events, plan enrollments, membership plans, company details, staff/member invitations, transactional messaging (email, SMS, push, notifications), API key management, and platform webhook subscriptions for real-time events.


    All requests are REST over HTTPS. Every request is authenticated with an API key passed in the `API-KEY` header, and is scoped to a single gym location (company) by the `company-id` header.


    Endpoint PATHS and HTTP METHODS in this document are grounded in PushPress''s live public API reference and the official Speakeasy-generated PushPress SDK (`@pushpress/pushpress`, production server `https://api.pushpress.com/v3`). Request and response SCHEMAS are modeled by API Evangelist to a reasonable fidelity and should be verified against the authoritative PushPress OpenAPI before code generation.'
  version: '3.0'
  contact:
    name: PushPress
    url: https://www.pushpress.com
  x-grounding:
    pathsAndMethods: confirmed
    schemas: modeled
    sources:
    - https://ppe.apidocumentation.com/
    - https://github.com/PushPress/pushpress-ts
    - https://www.npmjs.com/package/@pushpress/pushpress
servers:
- url: https://api.pushpress.com/v3
  description: Production
- url: https://api.pushpressstage.com/v3
  description: Staging
- url: https://api.pushpressdev.com/v3
  description: Development
security:
- api_key: []
tags:
- name: ApiKeys
  description: Programmatic API key management.
paths:
  /keys:
    get:
      operationId: listApiKeys
      tags:
      - ApiKeys
      summary: List API keys
      description: Lists the API keys for the company.
      responses:
        '200':
          description: A list of API keys.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createApiKey
      tags:
      - ApiKeys
      summary: Create a new API key
      description: Creates a new API key for the company.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyInput'
      responses:
        '200':
          description: The created API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /keys/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getApiKey
      tags:
      - ApiKeys
      summary: Get API key
      description: Retrieves a single API key by ID.
      responses:
        '200':
          description: The requested API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /keys/{id}/revoke:
    parameters:
    - $ref: '#/components/parameters/Id'
    patch:
      operationId: revokeApiKey
      tags:
      - ApiKeys
      summary: Revoke an API key
      description: Revokes an API key so it can no longer be used.
      responses:
        '200':
          description: The revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    ApiKeyInput:
      type: object
      properties:
        name:
          type: string
          description: Human-readable label for the key.
        scopes:
          type: array
          items:
            type: string
    ApiKey:
      type: object
      properties:
        keyUuid:
          type: string
        apiKey:
          type: string
          description: The secret key value, returned only on creation.
        name:
          type: string
        status:
          type: string
          enum:
          - active
          - revoked
        createdAt:
          type: integer
          format: int64
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    Id:
      name: id
      in: path
      required: true
      description: The identifier of the resource.
      schema:
        type: string
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: API-KEY
      description: API key issued in the PushPress developer portal, passed in the `API-KEY` request header. Requests are also scoped to a single gym location with a `company-id` header.