Deleting Deepl glossary

After my adventure of getting and creating glossaries for Deepl (Handle glossaries for Deepl with Curlsmbs - #3 by Beatrix_Willius) I now want to delete the glossaries I made. But the code I tried didn’t delete anything.

Getting the glossaries works fine:

Public Function getGlossaries() As String()
  Dim d As New CURLSMBS
  d.OptionURL = ""
  d.CollectOutputData = True
  Dim h() as string
  h.add("Authorization: DeepL-Auth-Key " + API.APIKey)
  h.add("Content-Type: application/x-www-form-urlencoded")
  Dim e As Integer = d.Perform
  Dim theResult As String = d.OutputData
  dim GlossaryIDs(-1) as String
  dim AllGlossaryJson as new JSONItem
  AllGlossaryJson = AllGlossaryJson.Value("glossaries")
  if AllGlossaryJson.IsArray then
    for currentGlossary as Integer = 0 to AllGlossaryJson.Count - 1
      dim GlossaryJson as JSONItem = AllGlossaryJson.ChildAt(currentGlossary)
  end if
  Return GlossaryIDs
End Function

I tried to plug one of the IDs into the delete function:

Dim curl As New CURLSMBS
Dim url As String = "" + GlossaryID + "?auth_key=" + API.APIKey
'Dim h() as string
'h.add("Authorization: DeepL-Auth-Key " + API.APIKey)

curl.CollectOutputData = True
curl.OptionURL = url
curl.OptionCustomRequest = "DELETE"

Dim result As integer = curl.Perform

But when I get the glossaries again the number of glossaries is the same as before the deletion. What is wrong with the code? I tried both with ?auth_key and with SetOptionHTTPHeader.