Delete a MIDI file

May 15, 2025 (November 16, 2026)

Table of contents

  1. Request Headers
  2. Path Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

This endpoint deletes a previously uploaded MIDI file.

https://api.useapi.net/v1/tempolor/music/midi/midiItemId

Request Headers
Authorization: Bearer {API token}
Path Parameters
  • midiItemId is required. The MIDI file ID returned from a previous POST music/midi request.
Responses
  • 200 OK

    {
      "result": true
    }
    
  • 400 Bad Request

    {
      "error": "midiItemId has incorrect format",
      "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 404 Not Found

    {
      "error": "No record found for user:12345-tempolor:user_id-midi:abcdef123456789",
      "code": 404
    }
    
  • 596 Account signed out

    TemPolor signed the account out, so its session ticket no longer works. The API stops using the account until you add it again with fresh credentials at POST accounts, see Setup TemPolor. Requests without user_id use your other accounts in the meantime.

    {
      "error": "TemPolor signed out account 101441809 (You are currently logged out (400006)). Add it again with POST /v1/tempolor/accounts using fresh credentials, see https://useapi.net/docs/start-here/setup-tempolor",
      "code": 596
    }
    

    If every account you have is in this state, a request without user_id returns 596 as well.

Model

A deleted MIDI file answers with result: true, and an error answers with its error message and code.

The delete answer, field by field
{   // TypeScript, all fields are optional
    result: boolean
    error: string
    code: number
}
Examples
  • curl -X DELETE -H "Authorization: Bearer …" \
         https://api.useapi.net/v1/tempolor/music/midi/user:12345-tempolor:user_id-midi:abcdef123456789
    
  • const midiItemId = "user:12345-tempolor:user_id-midi:abcdef123456789";
    const token = "API token";
    const apiUrl = `https://api.useapi.net/v1/tempolor/music/midi/${midiItemId}`;
    
    const response = await fetch(apiUrl, {
      method: "DELETE",
      headers: {
        "Authorization": `Bearer ${token}`
      }
    });
    const result = await response.json();
    console.log("Delete result:", result.result);
    
  • import requests
    
    midi_item_id = "user:12345-tempolor:user_id-midi:abcdef123456789"
    token = "API token"
    apiUrl = f"https://api.useapi.net/v1/tempolor/music/midi/{midi_item_id}"
    headers = {
        "Authorization": f"Bearer {token}"
    }
    
    response = requests.delete(apiUrl, headers=headers)
    result = response.json()
    print(f"Delete result: {result.get('result')}")
    
Try It