# Attach an asset or collection to a product

`POST /products/{id}/links` · Rivier · workspace

Attach an asset or collection to a product.

- Scope: workspace:write
- Mcp: rivier_personas_product_link
- Graphql: Mutation.workspaceProductLink
- Sdk: workspace.product.link
- Cli: workspace product link

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string"
    },
    "refId": {
      "type": "string",
      "format": "uuid"
    },
    "role": {
      "type": "string",
      "maxLength": 40
    }
  },
  "required": [
    "kind",
    "refId"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/products/{id}/links' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "kind": "string",
  "refId": "string"
}'
```
