## Permanently delete span assessment

`client.SpanAssessments.Delete(ctx, spanAssessmentID) (*SpanAssessmentDeleteResponse, error)`

**delete** `/v5/span-assessments/{span_assessment_id}`

Permanently delete a span assessment by its identifier.

Only the assessment's original creator, or an account admin or manager, may
delete it; a request from any other identity returns 403. This is a hard
delete: the assessment row is removed rather than archived, so it cannot be
restored afterward. The response echoes the deleted assessment's id. Returns
404 if no assessment with that id exists for the caller's account.

### Parameters

- `spanAssessmentID string`

### Returns

- `type SpanAssessmentDeleteResponse struct{…}`

  - `ID string`

  - `Deleted bool`

  - `Object SpanAssessmentDeleteResponseObject`

    - `const SpanAssessmentDeleteResponseObjectSpanAssessment SpanAssessmentDeleteResponseObject = "span.assessment"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  spanAssessment, err := client.SpanAssessments.Delete(context.TODO(), "span_assessment_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", spanAssessment.ID)
}
```

#### Response

```json
{
  "id": "id",
  "deleted": true,
  "object": "span.assessment"
}
```
