Cria job assíncrono de download. Retorna 202 com job_id. Requer escopo media:download. Máximo 2 jobs simultâneos (queued + processing) por projeto.
POST
/
media
/
download
Enfileirar download
curl --request POST \
--url https://api.shappire.tools/v1/media/download \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({format: '<string>', url: '<string>', media_id: '<string>'})
};
fetch('https://api.shappire.tools/v1/media/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shappire.tools/v1/media/download"
payload = {
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shappire.tools/v1/media/download"
payload := strings.NewReader("{\n \"format\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.shappire.tools/v1/media/download")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"format\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"<string>\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shappire.tools/v1/media/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'format' => '<string>',
'url' => '<string>',
'media_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.shappire.tools/v1/media/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"format\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.shappire.tools/v1/media/download")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("X-API-Key", "<api-key>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.shappire.tools/v1/media/download' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
}'{
"data": {
"job_id": "job_x9y8z7",
"status": "queued"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
ApiKeyAuthBearerAuth
Chave de API no formato shp_live_... (produção) ou shp_test_... (desenvolvimento)
Body
application/json
Response
Job queued
Show child attributes
Show child attributes
⌘I
Enfileirar download
curl --request POST \
--url https://api.shappire.tools/v1/media/download \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({format: '<string>', url: '<string>', media_id: '<string>'})
};
fetch('https://api.shappire.tools/v1/media/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shappire.tools/v1/media/download"
payload = {
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shappire.tools/v1/media/download"
payload := strings.NewReader("{\n \"format\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.shappire.tools/v1/media/download")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"format\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"<string>\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shappire.tools/v1/media/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'format' => '<string>',
'url' => '<string>',
'media_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.shappire.tools/v1/media/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"format\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.shappire.tools/v1/media/download")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("X-API-Key", "<api-key>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.shappire.tools/v1/media/download' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"format": "<string>",
"url": "<string>",
"media_id": "<string>"
}'{
"data": {
"job_id": "job_x9y8z7",
"status": "queued"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}