## Archive a share link

`client.ShareLinks.Archive(ctx, id) (*ShareLinkArchiveResponse, error)`

**post** `/compute/v1/share-links/{id}/archive`

Archive a share link so it no longer grants public access. Metadata remains retrievable and repeated calls preserve the first archive timestamp.

### Parameters

- `id string`

### Returns

- `type ShareLinkArchiveResponse struct{…}`

  - `ID string`

  - `Archived bool`

    - `const ShareLinkArchiveResponseArchivedTrue ShareLinkArchiveResponseArchived = true`

  - `ArchivedAt Time`

    When the share link was first archived.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/boltz-bio/boltz-api-go"
  "github.com/boltz-bio/boltz-api-go/option"
)

func main() {
  client := boltzapi.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.ShareLinks.Archive(context.TODO(), "shr_qoEFr2BlPTBLuM5BinaC8x7iVPP_AwppEOmlxQjJ-eo")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ID)
}
```

#### Response

```json
{
  "id": "shr_qoEFr2BlPTBLuM5BinaC8x7iVPP_AwppEOmlxQjJ-eo",
  "archived": true,
  "archived_at": "2019-12-27T18:11:19.117Z"
}
```
