Prolific Workspaces API

Top-level containers that hold projects, fund studies, and scope teams.

Documentation

Specifications

Other Resources

OpenAPI Specification

prolific-research-workspaces-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Prolific Bonuses Workspaces API
  description: 'The Prolific API is a versioned REST interface for the Prolific online research participant recruitment platform. Researchers use it to programmatically create and publish studies, review and approve submissions, manage participant groups, projects and workspaces, apply demographic filters and requirements, pay bonuses, message participants, and subscribe to event webhooks (hooks). The API is served from https://api.prolific.com/api/v1 and follows a standard REST pattern: a collection endpoint (.../resource/) for GET (list) and POST (create), and an element endpoint (.../resource/{id}/) for GET, PATCH/PUT, and DELETE. All requests are authenticated with an API token supplied in the Authorization header as "Token <your token>".'
  version: v1
  contact:
    name: Prolific
    url: https://docs.prolific.com/api-reference
  license:
    name: Proprietary
    url: https://www.prolific.com/terms
servers:
- url: https://api.prolific.com/api/v1
  description: Prolific API v1
security:
- tokenAuth: []
tags:
- name: Workspaces
  description: Top-level containers that hold projects, fund studies, and scope teams.
paths:
  /workspaces/:
    get:
      operationId: listWorkspaces
      tags:
      - Workspaces
      summary: Get user's workspaces
      responses:
        '200':
          description: A list of workspaces.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createWorkspace
      tags:
      - Workspaces
      summary: Create a workspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
      responses:
        '201':
          description: The created workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /workspaces/{workspace_id}/:
    parameters:
    - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getWorkspace
      tags:
      - Workspaces
      summary: Get workspace
      responses:
        '200':
          description: A workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateWorkspace
      tags:
      - Workspaces
      summary: Update a workspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: The updated workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /workspaces/{workspace_id}/balance/:
    parameters:
    - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getWorkspaceBalance
      tags:
      - Workspaces
      summary: Get workspace balance
      responses:
        '200':
          description: The workspace wallet balance.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    WorkspaceId:
      name: workspace_id
      in: path
      required: true
      schema:
        type: string
      description: The workspace ID.
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        owner:
          type: string
        naivety_distribution_rate:
          type: number
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            detail:
              type: string
            error_code:
              type: integer
  responses:
    Unauthorized:
      description: Authentication credentials were missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API token supplied as "Token <your token>".