Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Deletes an attachment: both the stored file and its metadata.
JavaScript
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}}; fetch('https://api2.scorecard.io/api/v2/attachments/{attachmentId}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
import requests url = "https://api2.scorecard.io/api/v2/attachments/{attachmentId}" headers = {"Authorization": "Bearer <token>"} response = requests.delete(url, headers=headers) print(response.text)
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api2.scorecard.io/api/v2/attachments/{attachmentId}" 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)) }
curl --request DELETE \ --url https://api2.scorecard.io/api/v2/attachments/{attachmentId} \ --header 'Authorization: Bearer <token>'
{ "success": true }
{ "code": "UNAUTHORIZED", "message": "Invalid or missing authentication token", "details": {} }
{ "code": "INTERNAL_ERROR", "message": "An unexpected error occurred while processing your request.", "details": {} }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The ID of the Attachment to delete.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Attachment deleted.
Whether the deletion was successful.
Was this page helpful?