1. Media Manager
  • Getting Started
    • Introduction
    • Quickstart
    • Authentication
    • Status codes
  • Webhook
    • Webhook Setup
    • Webhook Events and Schema
  • SDKs
    • @klink.cloud/call-sdk
  • API Reference
    • Contact
      • Listing
      • Create
      • Filter By SocialPlatformId
      • Form Fields
      • Detail
      • Update
      • Delete
      • Fetch Contact Groups
      • Update tags
      • Filter By Phone Number
    • Tag
      • Listing
    • Channel
      • Listing
      • Create
    • Ticket
      • Listing
      • Create
      • Filter by Contact ID
      • Form Fields
      • Update
      • Update status
    • Category
      • Listing
    • CxLog
      • Listing
    • Message
      • Send message
      • Create comments
      • Get Comments
    • Media Manager
      • Upload File (multipart)
        POST
      • Get Folders
        GET
      • Get Folder By ID
        GET
      • Create Folder
        POST
      • Update Folder
        PATCH
      • Delete Folder
        DELETE
      • Get Files
        GET
      • Get File By ID
        GET
      • Create File
        POST
      • Update File
        PATCH
      • Delete File
        DELETE
    • Agent Activity
      • Get Agents Activities
    • Telephony
      • Get Telephony CDR
    • User
      • Create
      • Listing
      • Detail
      • Update
      • Delete
    • Automation Queue
      • Create
      • Listing
      • Detail
      • Update
      • Delete
      • Add Member
      • Remove Member
    • Role
      • Listing
    • Webchat Identity Verification
      • Get identity verification settings
      • Update identity verification settings
      • Create or rotate the identity secret
    • Schemas
      • RequestId
      • IdentityVerificationStatus
      • IdentityVerificationUpdate
      • IdentityVerificationSettings
      • IdentitySecret
      • userToken (JWT claims)
      • Error
Blog
Github
  1. Media Manager

Create File

POST
/api/v1/media-manager/files
Create a media file from Base64 data in a JSON body.
Prefer Upload File (multipart) for real files. Base64 inflates the payload by about a third, and JSON request bodies are limited to 100 KB, so this endpoint only suits very small files (about 75 KB or less). The multipart endpoint streams files up to 25 MB.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://apigw.klinkcx.com/api/v1/media-manager/files' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
  "fileName": "red-pixel.png",
  "mimeType": "image/png",
  "title": "Red Pixel Test",
  "description": "A tiny test image to verify upload",
  "altText": "Alt text",
  "isPrivate": false,
  "folderId": "019b666f-5b1e-738e-b88f-6e08c466a4f7",
  "isFavorite": true,
  "sortOrder": 0
}'
Response Response Example
{
    "data": {
        "id": "a1196518-4c90-4ed0-ab9f-d5a1c8d58870",
        "uploadId": "a1196518-035f-49b6-9d22-951f6f0a7a39",
        "folderId": null,
        "title": "Red Pixel Test",
        "description": "A tiny test image to verify upload",
        "altText": "Alt text",
        "sortOrder": 0,
        "isFavorite": true,
        "isPrivate": false,
        "createdAt": "2026-02-17T05:00:23.000000Z",
        "updatedAt": "2026-02-17T05:00:23.000000Z",
        "upload": {
            "id": "a1196518-035f-49b6-9d22-951f6f0a7a39",
            "fileName": "red-pixel.png",
            "fileSize": 70,
            "fileUrl": "https://cdn.klink.cloud/media-manager/your-image-url"
        }
    }
}
Modified at 2026-09-25 04:31:11
Previous
Get File By ID
Next
Update File
Built with