## Delete Credential

`client.Credentials.Delete(ctx, credentialID) (*CredentialDeleteResponse, error)`

**delete** `/v5/credentials/{credential_id}`

Permanently delete a credential and all its associated data.

### Parameters

- `credentialID string`

### Returns

- `type CredentialDeleteResponse struct{…}`

  - `ID string`

  - `Deleted bool`

  - `Object string`

### 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"),
  )
  credential, err := client.Credentials.Delete(context.TODO(), "credential_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", credential.ID)
}
```

#### Response

```json
{
  "id": "id",
  "deleted": true,
  "object": "object"
}
```
