Skip to main content
Skip table of contents

Upload a new Recording

Endpoint: POST /

Description: Uploads a new recording. The request must be sent as multipart/form-data containing:

  • A JSON part (jsondata) with the recording metadata.

  • A binary part (attachment) with the audio file.

Request Body:

  • Content Type: multipart/form-data

  • Parts:

    • jsondata:

      • Must have a Content-Type of application/json.

      • Follows the UploadRecordingMetadata schema, including fields such as:

        • startDateTime: Start time of the recording (ISO-8601 format).

        • duration: Duration of the recording (ISO-8601 duration format).

        • direction: Direction (0, 1, or 2).

        • localParty: An object with username and phoneNumber.

        • Optional fields such as remoteParty, notes, preserved, and pbxInfo.

    • attachment:

      • Must contain the binary audio file.

      • Supported Formats:

        • audio/wave (WAV - PCM-8, PCM-16, A-Law, u-Law)

        • audio/mpeg (MP3)

      • Maximum File Size: 256 MB

Examples:
Use a multipart/form-data request with two parts:

  • A JSON part (jsondata) containing the metadata.

  • A binary part (attachment) with the audio file.

Responses:

  • 201 Created: Returns the ID of the newly created recording as a JSON object.

  • 400 Bad Request: If parameters are invalid. The error response includes:

    • reason (integer): Codes such as:

      • 0: Request body is null or unparseable.

      • 1: Recording metadata is invalid.

      • 2: Audio file is invalid.

    • message (string): Detailed error description.

  • Additional Error Codes: 401, 403, 409 (if the recording start date is out of the retention period), 500, 501 (if the Imagicle Call Recording license is invalid), and 504.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.