Delete Motion
curl --request DELETE \
--url https://apis.viggle.ai/v1/motions/{motion_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apis.viggle.ai/v1/motions/{motion_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apis.viggle.ai/v1/motions/{motion_id}', 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://apis.viggle.ai/v1/motions/{motion_id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/v1/motions/{motion_id}"
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))
}HttpResponse<String> response = Unirest.delete("https://apis.viggle.ai/v1/motions/{motion_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/motions/{motion_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyMotions
Delete Motion
Delete one Motion owned by the current account.
DELETE
/
v1
/
motions
/
{motion_id}
Delete Motion
curl --request DELETE \
--url https://apis.viggle.ai/v1/motions/{motion_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apis.viggle.ai/v1/motions/{motion_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apis.viggle.ai/v1/motions/{motion_id}', 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://apis.viggle.ai/v1/motions/{motion_id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/v1/motions/{motion_id}"
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))
}HttpResponse<String> response = Unirest.delete("https://apis.viggle.ai/v1/motions/{motion_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/motions/{motion_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDELETE /v1/motions/{motion_id} permanently deletes a Motion. It can no longer be used in a Render.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
motion_id | string | Yes | Full Motion ID beginning with mot_. |
Response parameters
Returns200 OK.
| Field | Type | Always present | Description |
|---|---|---|---|
status | string | Yes | deleted after the Motion is removed. |
{"status":"deleted"}
Examples
req, _ := http.NewRequest("DELETE", "https://apis.viggle.ai/v1/motions/mot_456def", nil); req.Header.Set("Authorization", "Bearer "+os.Getenv("VIGGLE_API_KEY")); resp, err := http.DefaultClient.Do(req); if err != nil { panic(err) }; defer resp.Body.Close()
const response = await fetch("https://apis.viggle.ai/v1/motions/mot_456def", {method:"DELETE",headers:{Authorization:`Bearer ${process.env.VIGGLE_API_KEY}`}}); const result=await response.json();
import os, requests
response=requests.delete("https://apis.viggle.ai/v1/motions/mot_456def",headers={"Authorization":f"Bearer {os.environ['VIGGLE_API_KEY']}"}); response.raise_for_status(); result=response.json()
curl -X DELETE "https://apis.viggle.ai/v1/motions/mot_456def" -H "Authorization: Bearer $VIGGLE_API_KEY"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200
Deleted
⌘I

