> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mygigsters.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete API key

> This endpoint deletes an API key. To access this endpoint you need to obtain a JWT via Get OTP and Verify OTP sections.

### Request Body

**id** `string` *required*

The ID of your key (not the friendly name)

### Responses

| Code | Description |
| - | - |
| `200` | API Key deleted |
| `400` | API Key not provided |
| `404` | API Key not found |

### Response fields

**message** `string`

Success message

> [accordion] Error response fields
>
> **error** `string`
>
> Error message

```bash cURL theme={null}
curl 'https://qa-super.mygigsters.com.au/auth/delete-key' -X DELETE \
    -H "Authorization: Bearer JWT_FROM_VERIFY_OTP_STEP"  \
    -H "Content-Type: application/json" --data '{"id":"1231412313213"}'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-super.mygigsters.com.au/auth/delete-key", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer JWT_FROM_VERIFY_OTP_STEP",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "id": "1231412313213"
  }),
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

response = requests.delete(
    "https://qa-super.mygigsters.com.au/auth/delete-key",
    headers={
        "Authorization": "Bearer JWT_FROM_VERIFY_OTP_STEP",
    },
    json={
        "id": "1231412313213",
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-super.mygigsters.com.au/auth/delete-key")
request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer JWT_FROM_VERIFY_OTP_STEP"
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "id": "1231412313213"
  }
JSON

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-super.mygigsters.com.au/auth/delete-key");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer JWT_FROM_VERIFY_OTP_STEP",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "id": "1231412313213"
}
JSON,
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        String body = String.join("\n",
            "{",
            "  \"id\": \"1231412313213\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-super.mygigsters.com.au/auth/delete-key"))
            .header("Authorization", "Bearer JWT_FROM_VERIFY_OTP_STEP")
            .header("Content-Type", "application/json")
            .method("DELETE", HttpRequest.BodyPublishers.ofString(body))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
  "id": "1231412313213"
}`)

	req, err := http.NewRequest("DELETE", "https://qa-super.mygigsters.com.au/auth/delete-key", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer JWT_FROM_VERIFY_OTP_STEP")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```

```csharp .NET theme={null}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Delete, "https://qa-super.mygigsters.com.au/auth/delete-key");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "JWT_FROM_VERIFY_OTP_STEP");
request.Content = new StringContent(@"{
  ""id"": ""1231412313213""
}", Encoding.UTF8, "application/json");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```json 200 theme={null}
{
  "message": "API Key deleted"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.