DELETE
/api/v1/traces/{traceId}/attachmentsDelete one trace attachment
Deletes a single span_attachments row by ?id (NOT bulk-all). Requires ?id and ?projectId. 404 if not found. Returns { id, deleted: true }.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.
Parameters
traceId in pathrequiredstringid in queryrequiredstringprojectId in queryrequiredstringResponse
200 example
{
"success": true
}All status codes
200{ id, deleted: true }.
400(no description)
401(no description)
403Forbidden — the credential is valid but lacks the API-key scope, member role, or plan entitlement this operation requires.
404(no description)
409Conflict — CONFLICT.
429(no description)
500Internal Server Error — DB_ERROR.
Code samples
cURL
# {traceId} is shown with an EXAMPLE value — replace it with real values.
curl -X DELETE \
https://evalguard.ai/api/v1/traces/00000000-0000-0000-0000-000000000000/attachments \
-H "Authorization: Bearer $EVALGUARD_API_KEY"TypeScript
// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:
// {traceId} is shown with an EXAMPLE value — replace it with real values.
const res = await fetch("https://evalguard.ai/api/v1/traces/00000000-0000-0000-0000-000000000000/attachments", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}` },
});
console.log(res.status, await res.json());Python
# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:
# {traceId} is shown with an EXAMPLE value — replace it with real values.
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
response = requests.request("DELETE", "https://evalguard.ai/api/v1/traces/00000000-0000-0000-0000-000000000000/attachments", headers=headers)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
)
// {traceId} is shown with an EXAMPLE value — replace it with real values.
func main() {
req, _ := http.NewRequestWithContext(context.Background(), "DELETE", "https://evalguard.ai/api/v1/traces/00000000-0000-0000-0000-000000000000/attachments", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}Errors
400401403404409429500