# Workspace org library publish

`POST /org-library/items` · Rivier · workspace

Share one of this project's templates, segments, forms or brand assets with the organisation's other projects. Sharing it again publishes a new version.

- Scope: workspace:write
- Graphql: Mutation.workspaceOrgLibraryPublish
- Sdk: workspace.orgLibrary.publish
- Cli: workspace org library publish

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "template",
        "asset",
        "segment",
        "form"
      ]
    },
    "ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "folder": {
      "type": "string",
      "maxLength": 80
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20
    },
    "language": {
      "type": "string",
      "maxLength": 10
    },
    "note": {
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "kind",
    "ref"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: 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/org-library/items' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "kind": "template",
  "ref": "string"
}'
```
