# Make a page a portfolio project or change its details

`PUT /hosting/sites/{id}/pages/{page}/project` · Rivier · hosting

Make a page a portfolio project or change its details: cover, summary, year, client, roles, tags, links, order, and who can see it (draft, public, unlisted, expiring; password arrives with the gate). A project starts as a private draft; a person makes it visible.

- Scope: hosting:write
- Mcp: rivier_site_project_set
- Graphql: Mutation.hostingProjectSet
- Sdk: hosting.project.set
- Cli: hosting project set

## Parameters

- `id` (path, required), string
- `page` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "cover": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "assetId": {
              "type": "string",
              "format": "uuid"
            },
            "alt": {
              "type": "string",
              "maxLength": 300,
              "default": ""
            }
          },
          "required": [
            "assetId"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "summary": {
      "type": "string",
      "maxLength": 300,
      "default": ""
    },
    "year": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1900,
          "maximum": 2200
        },
        {
          "type": "null"
        }
      ]
    },
    "client": {
      "type": "string",
      "maxLength": 120,
      "default": ""
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 60
      },
      "maxItems": 12,
      "default": []
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[^,\\n]{1,40}$"
      },
      "maxItems": 20,
      "default": []
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 60
          },
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 300
          }
        },
        "required": [
          "label",
          "url"
        ],
        "additionalProperties": false
      },
      "maxItems": 10,
      "default": []
    },
    "visibility": {
      "type": "string",
      "enum": [
        "draft",
        "public",
        "unlisted",
        "expiring",
        "password"
      ]
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "order": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "featured": {
      "type": "boolean"
    },
    "rights": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "creditText": {
              "type": "string",
              "maxLength": 200,
              "default": ""
            },
            "copyrightNotice": {
              "type": "string",
              "maxLength": 200,
              "default": ""
            },
            "licenseUrl": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "acquireLicenseUrl": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "password": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "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 PUT 'https://api.rivier.ai/hosting/sites/{id}/pages/{page}/project' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "cover": {
    "assetId": "string"
  },
  "summary": "",
  "year": 0,
  "client": "",
  "roles": [],
  "tags": [],
  "links": [],
  "visibility": "draft"
}'
```
