<!-- https://developers.silktide.com/guides/set-up-a-website-before-its-first-test | Get started -->

# Set up a website before its first test

[Create a website](https://developers.silktide.com/v1/governance/websites/create-website.md) starts testing it straight away. That is right for most websites, but the first test then runs with the default settings. To change settings first, such as its languages, its tags or its metadata, create the website without testing it, configure it, then test it.

## 1. Create the website without testing it

Send `runNow: false` and `isReady: false` inside `website`:

```bash
curl https://api.eu.silktide.com/v1/websites \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "website": {
      "name": "Fake University",
      "homeUrl": "https://fake-university.example/",
      "maxPages": 100,
      "maxDocuments": 100,
      "runNow": false,
      "isReady": false
    }
  }'
```

The response is the new website with `website.status` set to `setup`. Keep its `websiteId`. It is not tested until you ask.

You can also send settings in this same request, such as `options`, `schedule`, `tagIds` and `website.metaValues`. Create it in `setup` anyway when a later step needs its `websiteId`, or when someone else configures it before it goes live.

## 2. Configure it

Make whatever other requests the website needs. For example:

- [Update a website](https://developers.silktide.com/v1/governance/websites/update-website.md) to change its options (`website.languages`, its benchmark), its schedule or its tags. A tag must exist before you send its id; see [Tag websites](https://developers.silktide.com/guides/tag-websites.md).
- [Set some of a section's metadata](https://developers.silktide.com/v1/governance/metadata/set-section-metadata.md) to fill in properties such as an owner or a department.

```bash
curl -X PUT https://api.eu.silktide.com/v1/websites/6 \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "options": { "website.languages": ["en-GB"] },
    "tagIds": ["pre-production"]
  }'
```

The website stays in `setup` however many times you update it.

## 3. Test it

When it is ready, [test it](https://developers.silktide.com/v1/governance/websites/test-website.md):

```bash
curl -X POST https://api.eu.silktide.com/v1/websites/6/test \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

A successful request returns `201` with an empty body. The website's `status` becomes `live`, its first test starts, and from then on it is retested on its schedule. To wait for the test and read its scores, carry on from step 3 of [Add a website and read its scores](https://developers.silktide.com/guides/add-a-website.md#3-wait-for-the-first-test).
