Get a single-use upload link (used without an authorization header)
curl --request POST \
--url https://api.plugkit.co/v1/media/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.plugkit.co/v1/media/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.plugkit.co/v1/media/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.plugkit.co/v1/media/upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.plugkit.co/v1/media/upload-url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.plugkit.co/v1/media/upload-url")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plugkit.co/v1/media/upload-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"mediaId": "<string>",
"uploadUrl": "<string>",
"uploadMethod": "PUT",
"direct": true,
"mediaUrl": "<string>",
"uploadPageUrl": "<string>",
"expiresAt": "2026-11-10T09:30:00.000Z",
"maxBytes": 123,
"singlePutMaxBytes": 123,
"multipartUrl": "<string>"
}{
"error": "2 validation errors on the request.",
"type": "invalid_request_error",
"code": "validation_failed",
"details": {
"fields": [
"content should not be empty",
"accountIds must be an array"
]
}
}{
"error": "Invalid API key.",
"type": "authentication_error",
"code": "unauthorized"
}{
"error": "Rate limit exceeded: 60 write requests per minute. Retry in 12s.",
"type": "rate_limit_error",
"code": "rate_limited",
"details": {
"limit": 60,
"bucket": "write",
"retryAfter": 12
}
}media
Get a single-use upload link (used without an authorization header)
POST
/
v1
/
media
/
upload-url
Get a single-use upload link (used without an authorization header)
curl --request POST \
--url https://api.plugkit.co/v1/media/upload-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.plugkit.co/v1/media/upload-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.plugkit.co/v1/media/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.plugkit.co/v1/media/upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.plugkit.co/v1/media/upload-url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.plugkit.co/v1/media/upload-url")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plugkit.co/v1/media/upload-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"mediaId": "<string>",
"uploadUrl": "<string>",
"uploadMethod": "PUT",
"direct": true,
"mediaUrl": "<string>",
"uploadPageUrl": "<string>",
"expiresAt": "2026-11-10T09:30:00.000Z",
"maxBytes": 123,
"singlePutMaxBytes": 123,
"multipartUrl": "<string>"
}{
"error": "2 validation errors on the request.",
"type": "invalid_request_error",
"code": "validation_failed",
"details": {
"fields": [
"content should not be empty",
"accountIds must be an array"
]
}
}{
"error": "Invalid API key.",
"type": "authentication_error",
"code": "unauthorized"
}{
"error": "Rate limit exceeded: 60 write requests per minute. Retry in 12s.",
"type": "rate_limit_error",
"code": "rate_limited",
"details": {
"limit": 60,
"bucket": "write",
"retryAfter": 12
}
}Authorizations
Response
Success