Skip to content

Delete an event

Delete
bash
https://api.bunce.so/v1/events

Delete an event.

If successful, your response includes a boolean value which specify that the event has been deleted.

Request

Body Parameters required

event_id string<uuid> requiredEvent ID
bash
curl --request DELETE \
  --url https://api.bunce.so/v1/events \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: sk_live_************************' \
  --data '{
    "event_id": "9bb629e6-7649-4648-89c7-5a4bf7d798b6"
}'
go
import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

url := "https://api.bunce.so/v1/events"

payload := strings.NewReader("{\n \"event_id\": \"9bb629e6-7649-4648-89c7-5a4bf7d798b6\",\n}")

req, _ := http.NewRequest("DELETE", url, payload)

req.Header.Add("X-Authorization", "sk_live_************************")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)

fmt.Println(res)
fmt.Println(string(body))
js
import  from 'node-fetch'

let  = 'https://api.bunce.so/v1/events'

let  = {
  : 'DELETE',
  : {
    'X-Authorization': 'sk_live_************************',
    'Content-Type': 'application/json',
  },
  : '{"event_id": "9bb629e6-7649-4648-89c7-5a4bf7d798b6"}',
}

(, )
  .then(() => .json())
  .then(() => .())
  .catch(() => .('error:' + ))
php
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
  "event_id": "9bb629e6-7649-4648-89c7-5a4bf7d798b6"
}');

$request->setRequestUrl('https://api.bunce.so/v1/events');
$request->setRequestMethod('DELETE');
$request->setBody($body);

$request->setHeaders([
  'X-Authorization' => 'sk_live_************************',
  'Content-Type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
java
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.bunce.so/v1/events"))
    .header("X-Authorization", "sk_live_************************")
    .header("Content-Type", "application/json")
    .method("DELETE", HttpRequest.BodyPublishers.ofString("{\n \"event_id\": \"9bb629e6-7649-4648-89c7-5a4bf7d798b6\",\n}"))
    .build();

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

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

Response

json
{
  "data": true,
  "message": "event successfully deleted",
  "success": true
}