Delete media
curl --request DELETE \
--url https://api.polymorfa.com/{version}/{objectId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/{version}/{objectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/{version}/{objectId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/{version}/{objectId}"
req, _ := http.NewRequest("DELETE", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polymorfa.com/{version}/{objectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"success": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}Graph API
Delete media
Protocols: Linked Device API · Meta Cloud API · Polymorfa Hybrid Link
DELETE
/
{version}
/
{objectId}
Delete media
curl --request DELETE \
--url https://api.polymorfa.com/{version}/{objectId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/{version}/{objectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/{version}/{objectId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/{version}/{objectId}"
req, _ := http.NewRequest("DELETE", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polymorfa.com/{version}/{objectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"success": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}Linked Device API
Meta Cloud API
Polymorfa Hybrid Link
Authorizations
Polymorfa organization key (titan_ prefix) or project token (titan_pt_ prefix). Client tokens are not accepted by Graph operations.
Path Parameters
Example:
"v21.0"
A media ID for GET/DELETE, or an upload: session ID for POST.
Response
Deleted