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

# Create recording

> Create a recording.

Create a recording in an empty state. The video or audio payload can be supplied either by an HTTP PUT request on the `upload.url` or by pointing the input `downloadUrl` to a location publicly accessible with an HTTP GET request, returning less than 2 GiB of data within 5 minutes.

The recording is created on behalf of specified author and related quotas apply. At most 50 recordings can be created in a 30 days window period.

Once the payload is received, `state` will change to `Uploaded` then either to `Ready` or `Failed`.

Payload formats are the same available to manual uploads:

* aac
* avi
* mp3
* mp4
* wav
* webm
* wmv

To provide a transcript in addition to the video, set the `transcript` attribute to `{ "type": "upload" }`. The response will then define the `upload.metaUrl` attribute. Use it to send the JSON payload with an HTTP PUT request, in the following format:

```typescript theme={null}
{
    transcript: {
        // The 2-letters language code of the transcript, if any
        langIso2?: string
        segments: {
            // Segment start timecode in seconds
            start: number
            // Segment end timecode in seconds
            end: number
            // Segment speaker identifier, can reference an item in the speakers
            // collection
            speakerId: string
            // Segment transcript
            text: string 
        }[]
        speakers?: {
            email?: string
            // Set isRecorder to true if the speaker is the meeting recorder
            isRecorder?: boolean
            name: string
            speakerId: string
        }[]
    }
}
```

For instance:

```json theme={null}
{
    "transcript": {
        "langIso2": "fr",
        "segments": [
            { "speakerId": "1", "start": 0.5, "end": 1.5, "text": "Bonjour !" },
            { "speakerId": "2", "start": 2.1, "end": 2.9, "text": "Hello" }
        ],
        "speakers": [
            { "email": "eric@claap.io", "name": "Éric", "speakerId": "1" },
            { "email": "marc@claap.io", "name": "Marc", "speakerId": "2" }
        ]
    }
}
```

**NOTE**: if the `transcript` attribute was set, the recording creation will only proceed once both the video and the transcript payloads have been sent.


## OpenAPI

````yaml POST /v1/recordings
openapi: 3.1.0
info:
  title: Claap API
  description: Development documentation
  version: 0.0.0
servers:
  - url: https://api.claap.io/
security:
  - ApiKey: []
paths:
  /v1/recordings:
    post:
      description: Create a recording.
      operationId: postV1Recordings
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                authorEmail:
                  type: string
                  description: >-
                    Recording author email address. It must belong to a
                    workspace user with enough permissions to create the
                    recording.
                channelId:
                  type: string
                  description: >-
                    Identifier of a folder (aka channel) where the recording
                    should be created.
                deal:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                      enum:
                        - attio
                        - hubspot
                        - pipedrive
                        - salesforce
                  required:
                    - type
                    - id
                  description: >-
                    A reference to a CRM deal entity to link to the recording.
                    It requires meeting information to be supplied and the Claap
                    workspace to be connected to the same CRM.
                downloadUrl:
                  type: string
                  description: >-
                    URL where the recording video content can be retrieved using
                    an HTTP GET request. Do not use response upload URL if this
                    parameter is supplied.
                meeting:
                  type: object
                  properties:
                    endedAt:
                      type: string
                      description: Meeting end time
                    participants:
                      type: array
                      items:
                        type: object
                        properties:
                          email:
                            type: string
                          isOrganizer:
                            type: boolean
                          name:
                            type: string
                        required:
                          - name
                    startedAt:
                      type: string
                      description: Meeting start time
                  required:
                    - startedAt
                title:
                  type: string
                  description: Recording title.
                transcript:
                  type: object
                  properties:
                    type:
                      type: string
                      const: upload
                  description: >-
                    Setting this property signals your intent to supply
                    transcript information in addition to the video payload. The
                    response will then define a metaUrl upload attribute to be
                    used to post the transcript payload. The recording creation
                    will not proceed until both payloads are sent.
                source:
                  type: string
                  enum:
                    - Aircall
                    - Allo
                    - Call
                    - GoogleMeet
                    - LemlistVoip
                    - Loom
                    - MsTeams
                    - Ringover
                    - Zoom
                  description: >-
                    Origin of the recording: meeting platform (e.g. `Zoom`,
                    `GoogleMeet`, `MsTeams`), VoIP provider (e.g. `Aircall`,
                    `Ringover`, `Allo`) or `Call` for other call platforms.
                    Defaults to `Api` if none is provided.
              required:
                - authorEmail
      responses:
        '200':
          description: Recording was successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      recording:
                        type: object
                        properties:
                          channel:
                            type: object
                            properties:
                              id:
                                type: string
                                description: The folder (aka channel) identifier.
                              name:
                                type: string
                                description: The folder (aka channel) name.
                            required:
                              - id
                              - name
                            description: The recording folder (aka channel).
                          createdAt:
                            type: string
                            description: The recording creation date.
                          id:
                            type: string
                            description: The recording identifier.
                          recorder:
                            type: object
                            properties:
                              attended:
                                type: boolean
                              email:
                                type: string
                                description: The recorder email.
                              id:
                                type: string
                                description: The recorder user identifier.
                              name:
                                type: string
                                description: The recorder name.
                            required:
                              - attended
                              - email
                              - id
                              - name
                            description: The recording author.
                          state:
                            type: string
                            enum:
                              - Empty
                              - Uploaded
                              - Failed
                          title:
                            type: string
                            description: The recording title.
                          upload:
                            type: object
                            properties:
                              metaUrl:
                                type: string
                                description: >-
                                  The URL to use to POST the transcript data.
                                  Only available if the transcript upload
                                  attribute was set when creating the recording
                              url:
                                type: string
                            required:
                              - url
                          url:
                            type: string
                          workspace:
                            type: object
                            properties:
                              id:
                                type: string
                                description: The workspace identifier.
                              name:
                                type: string
                                description: The workspace name.
                            required:
                              - id
                              - name
                            description: The recording workspace.
                        required:
                          - createdAt
                          - id
                          - recorder
                          - state
                          - url
                          - workspace
                    required:
                      - recording
                required:
                  - result
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````