Delete reference
curl --request DELETE \
--url https://api.mage.space/v1/references/{reference_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mage.space/v1/references/{reference_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mage.space/v1/references/{reference_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": {
"code": "unauthorized",
"message": "The API key is invalid or has been revoked."
}
}{
"error": {
"code": "reference_not_found",
"message": "No reference with this id belongs to the account."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Retry, and contact support if it persists."
}
}Endpoints
Delete reference
DELETE /v1/references/ removes one of the account’s references; its handle stops resolving at once.
DELETE
/
v1
/
references
/
{reference_id}
Delete reference
curl --request DELETE \
--url https://api.mage.space/v1/references/{reference_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mage.space/v1/references/{reference_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mage.space/v1/references/{reference_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": {
"code": "unauthorized",
"message": "The API key is invalid or has been revoked."
}
}{
"error": {
"code": "reference_not_found",
"message": "No reference with this id belongs to the account."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Retry, and contact support if it persists."
}
}Remove one of your references by the
id from GET /v1/references. The response is 204 with no body. From then on a prompt that mentions its handle is refused with 400 invalid_config, and the handle may be taken by a new character or reference.
Only your own references can be deleted here; any other id is a 404 reference_not_found. Requests that already ran with the reference keep their results.Last modified on September 18, 2026

