P2P
DELETE /v1/p2p/listings/{id} — Remove a P2P Listing
Take one of your active listings off the CSBoard P2P market.
DELETE
/
p2p
/
listings
/
{id}
Remove a listing
curl --request DELETE \
--url https://csboard.com/v1/p2p/listings/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/p2p/listings/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://csboard.com/v1/p2p/listings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://csboard.com/v1/p2p/listings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://csboard.com/v1/p2p/listings/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://csboard.com/v1/p2p/listings/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/p2p/listings/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "cm1xq8z4k0003ab12cd34ef56",
"status": "cancelled"
}Takes one of your
active listings off sale. The listing is checked again at the moment of removal, so one that sold a second earlier is refused rather than cancelled under its buyer: a listing that has sold or is mid-sale answers 409 listing_not_active. Removing the same listing twice answers the same 409.
Authentication required. Send your key as Authorization: Bearer csb_pub_.... Counts toward the 30 requests/minute P2P write limit of the key.
Example request
curl -X DELETE https://csboard.com/v1/p2p/listings/cm1xq8z4k0003ab12cd34ef56 \
-H "Authorization: Bearer csb_pub_..."
Example response
{
"id": "cm1xq8z4k0003ab12cd34ef56",
"status": "cancelled"
}
Error codes
| HTTP status | Code | Meaning |
|---|---|---|
| 403 | listing_owner_mismatch | The listing belongs to another account. |
| 403 | account_banned / ip_not_allowed | The account is banned, or the request came from outside the key’s IP allowlist. |
| 404 | listing_not_found | No listing with this id. |
| 409 | listing_not_active | The listing has sold, is mid-sale or was already removed. |
| 429 | rate_limit_exceeded | Over 30 P2P writes this minute, or over your key’s general limit. Wait for the Retry-After header value. |
| 503 | p2p_disabled | The P2P market is switched off right now. |
Authorizations
Send your key as a Bearer token on every request: Authorization: Bearer csb_pub_.... Generate keys in your CSBoard profile.
Path Parameters
Listing id from POST /p2p/listings or GET /p2p/listings.
⌘I
Remove a listing
curl --request DELETE \
--url https://csboard.com/v1/p2p/listings/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://csboard.com/v1/p2p/listings/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://csboard.com/v1/p2p/listings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://csboard.com/v1/p2p/listings/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://csboard.com/v1/p2p/listings/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://csboard.com/v1/p2p/listings/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://csboard.com/v1/p2p/listings/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "cm1xq8z4k0003ab12cd34ef56",
"status": "cancelled"
}