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

# Upload Recording

> Creates a recording and triggers the assessment.

The endpoint returns a `201 Created` response if the recording is created successfully. If the recording already exists, it will be returned with a `200 OK` response.



## OpenAPI

````yaml POST /recordings/upload
openapi: 3.0.1
info:
  title: Alpharun API
  description: Alpharun REST API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.alpharun.com/api/v1
security:
  - bearerAuth: []
paths:
  /recordings/upload:
    post:
      summary: Upload a recording
      description: >-
        Creates a recording and triggers the assessment.


        The endpoint returns a `201 Created` response if the recording is
        created successfully. If the recording already exists, it will be
        returned with a `200 OK` response.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - audio
                - teammate_email
                - recorded_at
                - contacts
              properties:
                audio:
                  type: string
                  format: binary
                playbook_id:
                  type: string
                  format: uuid
                  description: >-
                    The ID of the playbook to use for the assessment. If
                    omitted, the playbook will be determined by the routing
                    rules defined in https://app.alpharun.com/settings/playbooks
                    (based on the teammate group the teammate belongs to). If no
                    matching routing rules is found, the request will be
                    rejected.
                teammate_email:
                  type: string
                  format: email
                recorded_at:
                  type: string
                  format: date-time
                  description: >-
                    The date and time when the recording was made. Accepts ISO
                    8601 format with optional timezone specification (e.g.,
                    '2024-01-15T14:30:00Z' or '2024-01-15T14:30:00-05:00'). We
                    encourage you to specify the TZ if available.
                contacts:
                  type: array
                  minItems: 1
                  description: >-
                    At least one of email, phone number and ext id must be not
                    null on the contact. Contacts are unique per email, phone
                    number, or ext_id. **No two contacts can have the same
                    email, phone number, or ext_id**.
                  items:
                    $ref: '#/components/schemas/RecordingContactPayload'
      responses:
        '200':
          description: Recording already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      recording:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
        '201':
          description: Recording created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      recording:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
components:
  schemas:
    RecordingContactPayload:
      type: object
      anyOf:
        - required:
            - email
          properties:
            email:
              type: string
              format: email
              description: Email address of the contact
            first_name:
              type: string
              description: First name of the contact
            last_name:
              type: string
              description: Last name of the contact
            phone_number:
              anyOf:
                - type: string
                - type: number
              description: Phone number of the contact
            ext_id:
              type: string
              description: External ID of the contact
            custom_fields:
              type: array
              description: Custom fields associated with the contact
              items:
                type: object
                required:
                  - key
                  - value
                properties:
                  key:
                    type: string
                  value:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                    nullable: true
        - required:
            - phone_number
          properties:
            email:
              type: string
              format: email
              description: Email address of the contact
            first_name:
              type: string
              description: First name of the contact
            last_name:
              type: string
              description: Last name of the contact
            phone_number:
              anyOf:
                - type: string
                - type: number
              description: Phone number of the contact
            ext_id:
              type: string
              description: External ID of the contact
            custom_fields:
              type: array
              description: Custom fields associated with the contact
              items:
                type: object
                required:
                  - key
                  - value
                properties:
                  key:
                    type: string
                  value:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                    nullable: true
        - required:
            - ext_id
          properties:
            email:
              type: string
              format: email
              description: Email address of the contact
            first_name:
              type: string
              description: First name of the contact
            last_name:
              type: string
              description: Last name of the contact
            phone_number:
              anyOf:
                - type: string
                - type: number
              description: Phone number of the contact
            ext_id:
              type: string
              description: External ID of the contact
            custom_fields:
              type: array
              description: Custom fields associated with the contact
              items:
                type: object
                required:
                  - key
                  - value
                properties:
                  key:
                    type: string
                  value:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                    nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````