Happy Scribe Organization Memberships API

Manage members and roles within an organization.

OpenAPI Specification

happyscribe-organization-memberships-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Happy Scribe Exports Organization Memberships API
  description: The Happy Scribe API turns audio and video into text and subtitles programmatically. Submit work through the Orders API (automatic/machine or professional/human service), manage the resulting transcriptions, export finished transcripts into 15+ formats (SRT, VTT, STL, DOCX, PDF, TXT, JSON, CSV, XLSX, and editing-suite formats), and administer organizations and their members. Files are ingested by public URL or via a signed upload. All requests are REST over HTTPS and authenticated with a Bearer API token from your Happy Scribe account settings. Base URL https://www.happyscribe.com/api/v1. Endpoint paths and fields are grounded in the public developer documentation (dev.happyscribe.com); request/response schemas below are honestly modeled from that documentation and may not enumerate every field.
  version: '1.0'
  contact:
    name: Happy Scribe
    url: https://dev.happyscribe.com
servers:
- url: https://www.happyscribe.com/api/v1
  description: Happy Scribe API v1
security:
- bearerAuth: []
tags:
- name: Organization Memberships
  description: Manage members and roles within an organization.
paths:
  /organization_memberships:
    get:
      operationId: listOrganizationMemberships
      tags:
      - Organization Memberships
      summary: List organization memberships
      description: Lists memberships, optionally filtered by organization.
      parameters:
      - name: organization_id
        in: query
        required: false
        description: Filter memberships by organization.
        schema:
          type: string
      responses:
        '200':
          description: A list of memberships.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/OrganizationMembership'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createOrganizationMembership
      tags:
      - Organization Memberships
      summary: Add a member to an organization
      description: Adds a user to an organization by email, with a role.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - organization_id
              - email
              properties:
                organization_id:
                  type: string
                email:
                  type: string
                  format: email
                role:
                  type: string
                  enum:
                  - admin
                  - member
      responses:
        '201':
          description: The created membership.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembership'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /organization_memberships/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    patch:
      operationId: updateOrganizationMembership
      tags:
      - Organization Memberships
      summary: Update a membership
      description: Updates a member's role in an organization.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: string
                  enum:
                  - admin
                  - member
      responses:
        '200':
          description: The updated membership.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembership'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
    delete:
      operationId: deleteOrganizationMembership
      tags:
      - Organization Memberships
      summary: Remove a member
      description: Removes a member from an organization.
      responses:
        '204':
          description: The membership was removed.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Missing or invalid Bearer token.
      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 unique identifier of the resource.
      schema:
        type: string
  schemas:
    OrganizationMembership:
      type: object
      properties:
        id:
          type: string
        email:
          type: string
          format: email
        name:
          type: string
        role:
          type: string
          enum:
          - admin
          - member
        organizationId:
          type: string
        organizationName:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API token from your Happy Scribe account settings, passed as `Authorization: Bearer YOUR_API_TOKEN`.'