Delete Midjourney account

Table of contents

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

https://api.useapi.net/v2/account/midjourney/channel

The channel value should correspond to an account configured previously via a POST request.

Request Headers
Authorization: Bearer {API token}
Responses
Model
{ // TypeScript, all fields are optional
  error: string,
  errorDetails: string,
  code: number
}
Examples
  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer …" \
         -X DELETE https://api.useapi.net/v2/account/midjourney/<channel> 
    
  • const channel = "Previously configured channel id"; 
    const apiUrl = `https://api.useapi.net/v2/account/midjourney/${channnel}`; 
    const token = "API token";
    const data = { 
      method: 'DELETE',
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json' }
    };
    const response = await fetch(apiUrl, data);
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    channel = "Previously configured channel id" 
    apiUrl = f"https://api.useapi.net/v2/account/midjourney/{channel}" 
    token = "API token"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response, response.json())
    
Try It