> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revilico.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# Share a run

> Gives people read access to a run: its status, results, outputs and files (not its inputs, which stay with the owner). They can share it on. They must be active members of the run's owner's organization; give each as an email or a `user_…` id from GET /v1/org/members. The owner, or anyone the run is shared with, can share it. Nobody is notified, except that the owner gets an email when someone else shares their run. Sharing with someone who already has it is not an error.

**Scope:** `runs:write`.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/runs/{runId}/shares
openapi: 3.1.0
info:
  title: Revilico API
  version: 1.0.0
  description: >-
    Run Revilico's computational chemistry and biology engines from your own
    code: upload input files, start runs, follow them and read their results.
servers:
  - url: https://public-api.revilico.bio
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Who you are, your credits and what your runs have used.
  - name: Engines
    description: The engines you can run, their parameter schemas and examples.
  - name: Files
    description: 'Upload input files: create an upload, then PUT the bytes.'
  - name: Runs
    description: Start, follow and cancel engine runs.
  - name: Results and outputs
    description: 'Read what a run produced: results, files and outputs.'
  - name: Projects
    description: Group runs into the projects you see in the web app.
  - name: Sharing
    description: >-
      Share runs with people in your organization, as in the web app's Pipeline
      sharing.
  - name: Notes
    description: >-
      RevNotes: read, write and share the rich-text notes and note folders of
      the web app's RevNotes panel, in markdown or HTML.
  - name: Drive
    description: >-
      Your RevDrive files and shared drives, as in the web app: browse, read,
      use files as run inputs, save outputs, and organize. Ids: `dfile_…` and
      `dfld_…` in a personal Drive, `drive_…` for a shared drive, `sdfile_…` and
      `sdfld_…` in one.
  - name: Engine runs
    description: >-
      Start a run of one engine, with that engine's parameters and input files.
      Same endpoint as **Start a run**.
  - name: Health
    description: Service status. Needs no API key.
paths:
  /v1/runs/{runId}/shares:
    post:
      tags:
        - Sharing
      summary: Share a run
      description: >-
        Gives people read access to a run: its status, results, outputs and
        files (not its inputs, which stay with the owner). They can share it on.
        They must be active members of the run's owner's organization; give each
        as an email or a `user_…` id from GET /v1/org/members. The owner, or
        anyone the run is shared with, can share it. Nobody is notified, except
        that the owner gets an email when someone else shares their run. Sharing
        with someone who already has it is not an error.


        **Scope:** `runs:write`.
      operationId: sharing.share
      parameters:
        - name: runId
          in: path
          required: true
          description: Run id, `run_…`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                users:
                  minItems: 1
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    minLength: 1
                  description: >-
                    Who to share with: each an email address or a user id
                    (`user_…`) from GET /v1/org/members. They must be active
                    members of the run owner's organization.
              required:
                - users
              additionalProperties: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareRunResult'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    ShareRunResult:
      type: object
      properties:
        runId:
          type: string
        shared:
          type: array
          items:
            $ref: '#/components/schemas/Share'
          description: Every requested user, now with access.
        created:
          type: number
          description: Shares this request added.
        alreadyShared:
          type: number
          description: Requested users who already had the run.
        notice:
          type: string
      required:
        - runId
        - shared
        - created
        - alreadyShared
        - notice
    Share:
      type: object
      properties:
        id:
          type: string
          description: Share id, `share_…`.
        user:
          $ref: '#/components/schemas/OrgMember'
          description: Who the run is shared with.
        sharedBy:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            email:
              type: string
          required:
            - name
            - email
          description: >-
            Who shared it: the owner, or someone it was shared with who shared
            it on.
        via:
          type: string
          enum:
            - share
            - compound_review
          description: >-
            share: shared directly. compound_review: given by a compound review
            the user is in; it goes when they leave the review, and can only be
            removed there.
        sharedAt:
          type: string
          format: date-time
      required:
        - id
        - user
        - sharedBy
        - via
        - sharedAt
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - INVALID_ID
                - INVALID_PARAMETERS
                - INPUT_LIMIT_EXCEEDED
                - NOT_FOUND
                - FORBIDDEN
                - METHOD_NOT_ALLOWED
                - CONFLICT
                - PAYLOAD_TOO_LARGE
                - MISSING_CREDENTIALS
                - INVALID_CREDENTIALS
                - WRONG_ENVIRONMENT
                - CREDENTIALS_EXPIRED
                - CREDENTIALS_REVOKED
                - ACCOUNT_INACTIVE
                - API_ACCESS_NOT_ENABLED
                - INSUFFICIENT_SCOPE
                - SESSION_REQUIRED
                - TOO_MANY_AUTH_FAILURES
                - API_KEY_LIMIT_REACHED
                - ENGINE_NOT_ENABLED
                - DOCS_NOT_AVAILABLE
                - INSUFFICIENT_CREDITS
                - RUN_NOT_COMPLETE
                - ENGINE_SUBMIT_FAILED
                - RATE_LIMITED
                - SERVICE_UNAVAILABLE
                - INTERNAL_ERROR
              description: Stable within /v1; branch on this, not on the message.
            message:
              type: string
              description: Readable explanation, for people.
            details:
              description: >-
                Extra context, e.g. `issues` ({ path, message }[]) for
                validation errors.
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
          required:
            - code
            - message
      required:
        - error
    OrgMember:
      type: object
      properties:
        id:
          type: string
          description: User id, `user_…`.
        name:
          type:
            - string
            - 'null'
        email:
          type: string
      required:
        - id
        - name
        - email
  responses:
    '400':
      description: >-
        The request is malformed. `error.code` is one of `VALIDATION_FAILED`,
        `INVALID_ID`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_FAILED
              message: The request is malformed.
    '401':
      description: >-
        The API key is missing or not valid. `error.code` is one of
        `MISSING_CREDENTIALS`, `INVALID_CREDENTIALS`, `WRONG_ENVIRONMENT`,
        `CREDENTIALS_EXPIRED`, `CREDENTIALS_REVOKED`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: MISSING_CREDENTIALS
              message: The API key is missing or not valid.
    '403':
      description: >-
        The key may not do this. `error.code` is one of `INSUFFICIENT_SCOPE`,
        `API_ACCESS_NOT_ENABLED`, `ENGINE_NOT_ENABLED`, `ACCOUNT_INACTIVE`,
        `FORBIDDEN`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INSUFFICIENT_SCOPE
              message: The key may not do this.
    '404':
      description: Not found, or not visible to you. `error.code` is one of `NOT_FOUND`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Not found, or not visible to you.
    '422':
      description: >-
        The parameters or input files don't fit the engine. `error.code` is one
        of `INVALID_PARAMETERS`, `INPUT_LIMIT_EXCEEDED`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_PARAMETERS
              message: The parameters or input files don't fit the engine.
    '500':
      description: >-
        Something went wrong on our side. `error.code` is one of
        `INTERNAL_ERROR`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: Something went wrong on our side.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from the web app (**Settings → Developer**), sent as
        `Authorization: Bearer rvl_live_…`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.