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

# Upload a faculty activity file

> Uploads a file to a specific faculty activity by sending the raw file binary data in the request body



## OpenAPI

````yaml /openapi.json post /api/v1/faculty_activities/{faculty_activity_id}/files
openapi: 3.1.0
info:
  title: Scholarly API V1
  version: v1
  description: API for accessing Scholarly data
  license:
    name: Proprietary
    identifier: Proprietary
servers:
  - url: https://api.scholarlysoftware.com
    description: Production server
security: []
paths:
  /api/v1/faculty_activities/{faculty_activity_id}/files:
    parameters:
      - name: faculty_activity_id
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Files
      summary: Upload a faculty activity file
      description: >-
        Uploads a file to a specific faculty activity by sending the raw file
        binary data in the request body
      operationId: createFacultyActivityFile
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Bearer token
          schema:
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
          application/pdf:
            schema:
              type: string
              format: binary
          image/jpeg:
            schema:
              type: string
              format: binary
          image/png:
            schema:
              type: string
              format: binary
          text/plain:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: File uploaded
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  file:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Blob key
                      filename:
                        type: string
                        example: report.pdf
                      content_type:
                        type: string
                        example: application/pdf
                      byte_size:
                        type: integer
                        example: 1024000
                    additionalProperties: false
                    required:
                      - id
                      - filename
                      - content_type
                      - byte_size
                additionalProperties: false
                required:
                  - message
                  - file
        '400':
          description: error
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: forbidden
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: validation error
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - bearer_auth: []
components:
  schemas:
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              title:
                type: string
              detail:
                type: string
            required:
              - status
              - title
      required:
        - errors
    ValidationError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                example: '422'
              title:
                type: string
                example: Validation Error
              detail:
                type: string
                example: Label can't be blank
            required:
              - status
              - title
              - detail
      required:
        - errors
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````