# Share Links

## Create a share link

`client.ShareLinks.New(ctx, body) (*ShareLinkNewResponse, error)`

**post** `/compute/v1/share-links`

Create an unauthenticated, read-only share link covering one or more predictions and/or pipelines that all live in the same workspace. The returned `id` is the bearer credential — treat it as a secret.

### Parameters

- `body ShareLinkNewParams`

  - `ExpiresAt param.Field[string]`

  - `AccessParameters param.Field[ShareLinkNewParamsAccessParametersUnion]`

    Access-control parameters for the share link. Discriminated by `access_mode`: `public` requires no other fields; `email` requires a non-empty `allowed_emails` list.

    - `type ShareLinkNewParamsAccessParametersPublicShareLinkAccessParameters struct{…}`

      Public access: anyone holding the share link ID can read.

      - `AccessMode Public`

        - `const PublicPublic Public = "public"`

    - `type ShareLinkNewParamsAccessParametersEmailShareLinkAccessParameters struct{…}`

      Email-restricted access: only the addresses in `allowed_emails` can read the link.

      - `AccessMode Email`

        - `const EmailEmail Email = "email"`

      - `AllowedEmails []string`

        Email addresses allowed to read the link. Must contain at least one address; up to 100 entries.

  - `PipelineIDs param.Field[[]string]`

    Pipelines to expose through the share link. Must belong to the resolved workspace. Up to 100 entries.

  - `PredictionIDs param.Field[[]string]`

    Predictions to expose through the share link. Must belong to the resolved workspace. Up to 100 entries.

  - `WorkspaceID param.Field[string]`

    Workspace ID. Only used with admin API keys. Ignored (or validated) for workspace-scoped keys.

### Returns

- `type ShareLinkNewResponse struct{…}`

  - `ID string`

    Share link ID. This value is the bearer credential used to access the linked resources — treat it as a secret.

  - `AccessParameters ShareLinkNewResponseAccessParametersUnion`

    Access-control parameters for the share link. Discriminated by `access_mode`: `public` requires no other fields; `email` requires a non-empty `allowed_emails` list.

    - `type ShareLinkNewResponseAccessParametersPublicShareLinkAccessParameters struct{…}`

      Public access: anyone holding the share link ID can read.

      - `AccessMode Public`

        - `const PublicPublic Public = "public"`

    - `type ShareLinkNewResponseAccessParametersEmailShareLinkAccessParameters struct{…}`

      Email-restricted access: only the addresses in `allowed_emails` can read the link.

      - `AccessMode Email`

        - `const EmailEmail Email = "email"`

      - `AllowedEmails []string`

        Email addresses allowed to read the link. Must contain at least one address; up to 100 entries.

  - `ArchivedAt Time`

    When the share link was archived, or null if it has never been archived.

  - `CreatedAt Time`

    When the share link was created.

  - `ExpiresAt Time`

    When the share link stops granting access.

  - `PipelineIDs []string`

    Pipelines exposed by this share link.

  - `PredictionIDs []string`

    Predictions exposed by this share link.

  - `WorkspaceID string`

    Workspace that owns the share link and the referenced resources.

  - `URL string`

    Visitable share link URL for the deployment's public app. Present when the deployment has a configured app host; otherwise construct as `<your-app-host>/share/{id}`. Treat as a secret — the `{id}` segment is the bearer credential.

### 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"),
  )
  shareLink, err := client.ShareLinks.New(context.TODO(), boltzapi.ShareLinkNewParams{
    ExpiresAt: "expires_at",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", shareLink.ID)
}
```

#### Response

```json
{
  "id": "shr_qoEFr2BlPTBLuM5BinaC8x7iVPP_AwppEOmlxQjJ-eo",
  "access_parameters": {
    "access_mode": "public"
  },
  "archived_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "pipeline_ids": [
    "string"
  ],
  "prediction_ids": [
    "string"
  ],
  "workspace_id": "workspace_id",
  "url": "https://lab.boltz.bio/share/shr_qoEFr2BlPTBLuM5BinaC8x7iVPP_AwppEOmlxQjJ-eo"
}
```

## Retrieve a share link

`client.ShareLinks.Get(ctx, id) (*ShareLinkGetResponse, error)`

**get** `/compute/v1/share-links/{id}`

Retrieve metadata for a share link owned by the authenticated organization. Archived and expired links remain retrievable.

### Parameters

- `id string`

### Returns

- `type ShareLinkGetResponse struct{…}`

  - `ID string`

    Share link ID. This value is the bearer credential used to access the linked resources — treat it as a secret.

  - `AccessParameters ShareLinkGetResponseAccessParametersUnion`

    Access-control parameters for the share link. Discriminated by `access_mode`: `public` requires no other fields; `email` requires a non-empty `allowed_emails` list.

    - `type ShareLinkGetResponseAccessParametersPublicShareLinkAccessParameters struct{…}`

      Public access: anyone holding the share link ID can read.

      - `AccessMode Public`

        - `const PublicPublic Public = "public"`

    - `type ShareLinkGetResponseAccessParametersEmailShareLinkAccessParameters struct{…}`

      Email-restricted access: only the addresses in `allowed_emails` can read the link.

      - `AccessMode Email`

        - `const EmailEmail Email = "email"`

      - `AllowedEmails []string`

        Email addresses allowed to read the link. Must contain at least one address; up to 100 entries.

  - `ArchivedAt Time`

    When the share link was archived, or null if it has never been archived.

  - `CreatedAt Time`

    When the share link was created.

  - `ExpiresAt Time`

    When the share link stops granting access.

  - `PipelineIDs []string`

    Pipelines exposed by this share link.

  - `PredictionIDs []string`

    Predictions exposed by this share link.

  - `WorkspaceID string`

    Workspace that owns the share link and the referenced resources.

  - `URL string`

    Visitable share link URL for the deployment's public app. Present when the deployment has a configured app host; otherwise construct as `<your-app-host>/share/{id}`. Treat as a secret — the `{id}` segment is the bearer credential.

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

#### Response

```json
{
  "id": "shr_qoEFr2BlPTBLuM5BinaC8x7iVPP_AwppEOmlxQjJ-eo",
  "access_parameters": {
    "access_mode": "public"
  },
  "archived_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "pipeline_ids": [
    "string"
  ],
  "prediction_ids": [
    "string"
  ],
  "workspace_id": "workspace_id",
  "url": "https://lab.boltz.bio/share/shr_qoEFr2BlPTBLuM5BinaC8x7iVPP_AwppEOmlxQjJ-eo"
}
```

## 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"
}
```

## List pipeline results from a share link

`client.ShareLinks.ListPipelineResults(ctx, pipelineID, params) (*CursorPage[ShareLinkListPipelineResultsResponse], error)`

**get** `/compute/v1/share/{id}/pipelines/{pipelineId}/results`

Paginated results for one pipeline exposed by a share link. The response shape matches the authed pipeline-results endpoints exactly. Access is gated by the share-link ID and — for email-mode links — a signed compute-API JWT. Pipeline IDs not covered by the link return 404 indistinguishably from unknown links.

### Parameters

- `pipelineID string`

- `params ShareLinkListPipelineResultsParams`

  - `ID param.Field[string]`

    Path param: Share link ID. Treat as a secret — it is the bearer credential.

  - `AfterID param.Field[string]`

    Query param: Return results after this ID

  - `BeforeID param.Field[string]`

    Query param: Return results before this ID

  - `IDs param.Field[string]`

    Query param: Comma-separated list of result IDs to filter by (max 200). Only results whose ID matches one of these is returned; missing IDs are silently skipped. Composes with `limit`, `after_id`, and `before_id` — the filter is applied before pagination.

  - `Limit param.Field[int64]`

    Query param: Max results to return. Defaults to 100.

### Returns

- `type ShareLinkListPipelineResultsResponse struct{…}`

  A single generated protein design

  - `ID string`

    Unique result ID.

  - `Artifacts ShareLinkListPipelineResultsResponseArtifacts`

    - `Archive ShareLinkListPipelineResultsResponseArtifactsArchive`

      - `URL string`

        URL to download the file

      - `URLExpiresAt Time`

        When the presigned URL expires

    - `Structure ShareLinkListPipelineResultsResponseArtifactsStructure`

      - `URL string`

        URL to download the file

      - `URLExpiresAt Time`

        When the presigned URL expires

  - `CreatedAt Time`

  - `Entities []ShareLinkListPipelineResultsResponseEntityUnion`

    Entities in the designed complex, including designed and fixed input entities.

    - `type ShareLinkListPipelineResultsResponseEntityProteinEntity struct{…}`

      - `ChainIDs []string`

        Chain IDs for this entity

      - `Type Protein`

        - `const ProteinProtein Protein = "protein"`

      - `Value string`

        Amino acid sequence (one-letter codes)

      - `Cyclic bool`

        Whether the sequence is cyclic

      - `Modifications []ShareLinkListPipelineResultsResponseEntityProteinEntityModification`

        CCD post-translational modifications. Optional; defaults to an empty list when omitted. SMILES modifications are not supported.

        - `ResidueIndex int64`

          0-based index of the residue to modify

        - `Type Ccd`

          Modification format. Only CCD polymer modifications are supported.

          - `const CcdCcd Ccd = "ccd"`

        - `Value string`

          CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

    - `type ShareLinkListPipelineResultsResponseEntityRnaEntity struct{…}`

      - `ChainIDs []string`

        Chain IDs for this entity

      - `Type Rna`

        - `const RnaRna Rna = "rna"`

      - `Value string`

        RNA nucleotide sequence (A, C, G, U, N)

      - `Cyclic bool`

        Whether the sequence is cyclic

      - `Modifications []ShareLinkListPipelineResultsResponseEntityRnaEntityModification`

        CCD chemical modifications. Optional; defaults to an empty list when omitted. SMILES modifications are not supported.

        - `ResidueIndex int64`

          0-based index of the residue to modify

        - `Type Ccd`

          Modification format. Only CCD polymer modifications are supported.

          - `const CcdCcd Ccd = "ccd"`

        - `Value string`

          CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

    - `type ShareLinkListPipelineResultsResponseEntityDnaEntity struct{…}`

      - `ChainIDs []string`

        Chain IDs for this entity

      - `Type Dna`

        - `const DnaDna Dna = "dna"`

      - `Value string`

        DNA nucleotide sequence (A, C, G, T, N)

      - `Cyclic bool`

        Whether the sequence is cyclic

      - `Modifications []ShareLinkListPipelineResultsResponseEntityDnaEntityModification`

        CCD chemical modifications. Optional; defaults to an empty list when omitted. SMILES modifications are not supported.

        - `ResidueIndex int64`

          0-based index of the residue to modify

        - `Type Ccd`

          Modification format. Only CCD polymer modifications are supported.

          - `const CcdCcd Ccd = "ccd"`

        - `Value string`

          CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

    - `type ShareLinkListPipelineResultsResponseEntityLigandCcdEntity struct{…}`

      - `ChainIDs []string`

        Chain IDs for this ligand

      - `Type LigandCcd`

        - `const LigandCcdLigandCcd LigandCcd = "ligand_ccd"`

      - `Value string`

        CCD code (e.g., ATP, ADP)

    - `type ShareLinkListPipelineResultsResponseEntityLigandSmilesEntity struct{…}`

      - `ChainIDs []string`

        Chain IDs for this ligand

      - `Type LigandSmiles`

        - `const LigandSmilesLigandSmiles LigandSmiles = "ligand_smiles"`

      - `Value string`

        SMILES string representing the ligand

  - `Metrics ShareLinkListPipelineResultsResponseMetrics`

    Structural and binding quality metrics for a designed protein binder

    - `BindingConfidence float64`

      Confidence that the designed binder binds the target (0-1). Primary metric for hit discovery.

    - `HelixFraction float64`

      Fraction of the designed sequence forming alpha helices (0-1).

    - `Iptm float64`

      Interface predicted TM score (0-1). Confidence in the protein-protein interface.

    - `LoopFraction float64`

      Fraction of the designed sequence in coil/loop regions (0-1).

    - `MinInteractionPae float64`

      Minimum predicted aligned error at the interface (Angstroms). Lower values indicate higher confidence.

    - `SheetFraction float64`

      Fraction of the designed sequence forming beta sheets (0-1).

    - `StructureConfidence float64`

      Confidence in the predicted 3D structure (0-1).

  - `Warnings []ShareLinkListPipelineResultsResponseWarning`

    Warnings about potential quality issues with this result.

    - `Code string`

      Machine-readable warning code (e.g. "low_confidence", "unusual_geometry")

    - `Message string`

      Human-readable description of the warning

### 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"),
  )
  page, err := client.ShareLinks.ListPipelineResults(
    context.TODO(),
    "pipelineId",
    boltzapi.ShareLinkListPipelineResultsParams{
      ID: "id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "data": [
    {
      "id": "id",
      "artifacts": {
        "archive": {
          "url": "https://example.com",
          "url_expires_at": "2019-12-27T18:11:19.117Z"
        },
        "structure": {
          "url": "https://example.com",
          "url_expires_at": "2019-12-27T18:11:19.117Z"
        }
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "entities": [
        {
          "chain_ids": [
            "string"
          ],
          "type": "protein",
          "value": "value",
          "cyclic": true,
          "modifications": [
            {
              "residue_index": 0,
              "type": "ccd",
              "value": "value"
            }
          ]
        }
      ],
      "metrics": {
        "binding_confidence": 0,
        "helix_fraction": 0,
        "iptm": 0,
        "loop_fraction": 0,
        "min_interaction_pae": 0,
        "sheet_fraction": 0,
        "structure_confidence": 0
      },
      "warnings": [
        {
          "code": "code",
          "message": "message"
        }
      ]
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id"
}
```
