Skip to content
Menu
SilktideDevelopers

Create a website

POST/v1/websitesUses allowance
View as Markdown

Creates a website and, unless you say otherwise, starts testing it straight away. The response is the new website, as Get a website returns it.

The pages and documents you give it come out of the account's balance, so check Get the account's balance first. Always send maxPages and maxDocuments: left out, Silktide picks an allocation for you.

To configure a website before its first test, send runNow: false and isReady: false. It stays in setup until you test it.

metaValues goes inside website. Older documentation showed it beside website, where it is ignored.

A missing name or homeUrl currently returns 500 rather than a 400 naming the field.

Request
curl -X POST "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,
    "metaValues": {
      "author": "Joe Bloggs"
    }
  },
  "schedule": {
    "schedulePreset": "weekly"
  },
  "options": {
    "website.benchmarkId": "fortune-500-usa",
    "website.benchmarkPercentile": 90
  },
  "tagIds": [
    "pre-production"
  ]
}'
Response: A website tested weekly, starting now
{
  "website": {
    "websiteId": 6,
    "name": "Fake University",
    "homeUrl": "https://fake-university.example/",
    "status": "live",
    "maxPages": 100,
    "maxDocuments": 100,
    "created": 1793736881,
    "lastTested": 0,
    "propertyId": 0
  },
  "permissions": {
    "components": [],
    "componentValues": {},
    "fixedValues": {}
  },
  "schedule": {
    "scheduleInterval": "week",
    "schedulePeriod": 1,
    "scheduleFromDate": 1793736881,
    "schedulePreset": "weekly",
    "isActive": true
  },
  "options": {
    "website.languages": [
      "en-US"
    ],
    "website.benchmarkId": "fortune-500-usa",
    "website.benchmarkPercentile": 90,
    "website.passwordSet": false,
    "website.proxyPasswordSet": false
  },
  "tagIds": [
    "pre-production"
  ],
  "governanceAiOptimizer": true,
  "governanceAiOptimizerAvailable": true,
  "reportLanguage": "en-US"
}

Request

Body

JSON, sent with Content-Type: application/json.

  • websiteobjectrequired

    The website.

    Show 7 fields
    • namestringrequired1 to 200 characters

      Its name. Plain text: no markup or control characters.

    • homeUrlstringrequired

      Its home page, as a full URL. Silktide tests everything under it.

    • maxPagesintegerat least 1

      The most pages to test. Must fit in the account's balance. Always send it.

    • maxDocumentsinteger

      The most documents (PDFs) to test. Must fit in the account's balance. Always send it.

    • runNowboolean

      Start its first test now. Defaults to true.

    • isReadyboolean

      With runNow: false, false leaves it in setup so you can finish configuring it first. Defaults to true.

    • metaValuesmap of strings

      Metadata for the whole website, by metadata property name. Names the account has no property for are ignored.

  • scheduleobject

    When to retest it. Replaces the whole schedule: any key left out takes its default.

    Show 5 fields
    • scheduleIntervalstring

      The unit to retest in. Defaults to empty, which is no schedule.

      One ofsecondminutehourdayweekmonthyear

    • schedulePeriodintegerat least 1

      How many intervals apart tests are. Defaults to 1.

    • scheduleFromDateinteger

      When the schedule counts from. Defaults to now.

    • schedulePresetstring

      A named schedule, used instead of the interval and period: five-daily, weekly, monthly, or none for no schedule.

      One ofnonefive-dailyweeklymonthly

    • isActiveboolean

      Whether scheduled tests run. Defaults to true.

  • optionsobject

    Settings to change. Ones left out keep their value.

    Show 38 fields
    • website.allowFragmentPathsboolean

      Experimental. Crawl paths with fragments, such as hashbangs.

    • website.allowedHttpCodeslist of integers

      HTTP codes to accept besides 2xx and 3xx, which are always accepted.

    • website.authTypestring

      How Silktide signs in to pages that need it.

    • website.benchmarkIdstring

      The Silktide Benchmark to grade against. Empty for none.

    • website.benchmarkPercentileinteger

      The percentile to read from the benchmark.

    • website.brokenLinkMaxRedirectsinteger

      How many redirects a link may take before it counts as broken.

    • website.brokenLinkPropulsionFallbackboolean

      Confirm broken links in a real browser. Slower but more reliable.

    • website.brokenLinkTimeoutinteger

      Seconds to wait before a link counts as broken.

    • website.clickSelectorstring

      A CSS selector Silktide clicks on each page before testing it.

    • website.disableAnalyticsboolean

      Block the website's analytics scripts while testing, so tests do not count as visits.

    • website.disableFirstTimeVisitboolean

      Skip the built-in first-visit user flow, which tests pages before cookie banners are dismissed.

    • website.disableLinkDiscoveryboolean

      Test only the URLs you give, and follow no links.

    • website.disableScrollDownboolean

      Do not scroll each page to the bottom and back while testing.

    • website.disableStealthboolean

      Let websites detect that Silktide's browser is automated.

    • website.enableAnimationboolean

      Let pages animate. Silktide stops animation by default.

    • website.exclude3rdPartyPluginIssuesboolean

      Ignore issues inside common third-party plugins, such as embedded maps.

    • website.excludeQueryParamslist of strings

      Query parameters to remove from URLs, so pages that differ only by them count once.

    • website.ignoreAutomaticSitemapsboolean

      Do not use the sitemaps Silktide finds on its own.

    • website.inspectorCssstring

      CSS added to pages when they are shown in the Inspector.

    • website.languageslist of strings

      Language codes, such as en-US, that every page is in. Always present.

    • website.maxConnectionsinteger

      How many pages Silktide may load at once.

    • website.normalizeUrlPathboolean

      Lowercase URL paths, for websites that mix case.

    • website.optionalLanguageslist of strings

      Language codes a page might be in. Silktide detects them per page, which slows testing.

    • website.pageWaitnumber

      Seconds to wait after a page loads before testing it.

    • website.proxyHoststring

      A proxy server to test through.

    • website.proxyPortinteger

      The proxy server's port.

    • website.proxyPresetstring

      One of Silktide's proxies: eu-dublin, us-ohio or au-sydney. Empty for the region's own location.

    • website.proxyUsernamestring

      The proxy server's username.

    • website.readabilityFormulastring

      The readability formula, such as smog.

    • website.readabilityThresholdnumber

      The readability score pages should stay within.

    • website.reportLanguagestring

      The language AI reports about the website are written in. Empty for the account's language.

    • website.timeoutinteger

      Seconds to wait for a page to load before giving up.

    • website.trustPageDeclaredLanguageboolean

      Believe the language a page declares rather than detecting it.

    • website.userAgentSuffixstring

      Text added to the end of Silktide's browser user agent.

    • website.usernamestring

      The username Silktide signs in to pages with.

    • website.aiEnabledboolean

      Whether Silktide's AI may work on this website.

    • website.passwordstring

      The password Silktide signs in to pages with. Write-only: reads say only whether one is set. Leave it out to keep the saved one; an empty string removes it.

    • website.proxyPasswordstring

      The proxy server's password. Write-only, like website.password.

  • tagIdslist of strings

    The tags for the whole website (section 0). Replaces its tags; [] removes them all.

  • governanceAiOptimizerboolean

    Whether to give it one of the account's Governance AI optimizers. Left out, it takes a free one unless it cannot use AI.

Response

200JSON.

  • websiteobjectrequired

    The website.

    Show 9 fields
    • websiteIdintegerrequiredat least 1

      The website.

    • namestringrequired

      Its name.

    • homeUrlstringrequired

      Its home page.

    • statusstringrequired

      installing while Silktide creates it, setup before it goes live, live once it is tested.

      One ofinstallingsetuplive

    • maxPagesintegerrequired

      The most pages Silktide will test.

    • maxDocumentsintegerrequired

      The most documents (PDFs) Silktide will test.

    • createdintegerrequired

      When it was created.

    • lastTestedintegerrequired

      When its last test finished. 0 if it has never been tested.

    • propertyIdintegerrequired

      The Analytics property linked to the website. 0 when it has none.

  • permissionsobjectrequired

    Who may do what with the website.

    Show 3 fields
    • componentslist of objectsrequired

      The permissions a website has.

      Show 6 fields
      • permissionIdstringrequired

        The permission, such as Website-WebsiteRead.

      • componentTypestringrequired

        What can be given it. assignees for users and roles.

      • labelstringrequired

        Its name.

      • descriptionstringrequiredcan be null

        What it allows. Null for some permissions.

      • inheritedPermissionIdslist of stringsrequired

        Permissions that include this one: anyone with those has this too.

      • modelslist of any JSONrequired

        Reserved. Empty for website permissions.

    • componentValuesmap of list of stringsrequired

      Who was given each permission on this website directly, as assignee ids (u: users, g: roles).

    • fixedValuesmap of list of stringsrequired

      Who has each permission from elsewhere, such as account-wide roles. Changed elsewhere, not here.

  • scheduleobjectrequired

    When it is retested.

    Show 5 fields
    • scheduleIntervalstringrequired

      The unit it is retested in. Empty when it is not retested on a schedule.

      One ofsecondminutehourdayweekmonthyear

    • schedulePeriodintegerrequired

      How many scheduleIntervals apart tests are.

    • scheduleFromDateintegerrequired

      When the schedule counts from.

    • schedulePresetstringrequired

      A named schedule (none, five-daily, weekly or monthly), or empty when the interval and period were set directly.

    • isActivebooleanrequired

      Whether scheduled tests run.

  • optionsobjectrequired

    Its settings, by name.

    Show 38 fields
    • website.allowFragmentPathsboolean

      Experimental. Crawl paths with fragments, such as hashbangs.

    • website.allowedHttpCodeslist of integers

      HTTP codes to accept besides 2xx and 3xx, which are always accepted.

    • website.authTypestring

      How Silktide signs in to pages that need it.

    • website.benchmarkIdstring

      The Silktide Benchmark to grade against. Empty for none.

    • website.benchmarkPercentileinteger

      The percentile to read from the benchmark.

    • website.brokenLinkMaxRedirectsinteger

      How many redirects a link may take before it counts as broken.

    • website.brokenLinkPropulsionFallbackboolean

      Confirm broken links in a real browser. Slower but more reliable.

    • website.brokenLinkTimeoutinteger

      Seconds to wait before a link counts as broken.

    • website.clickSelectorstring

      A CSS selector Silktide clicks on each page before testing it.

    • website.disableAnalyticsboolean

      Block the website's analytics scripts while testing, so tests do not count as visits.

    • website.disableFirstTimeVisitboolean

      Skip the built-in first-visit user flow, which tests pages before cookie banners are dismissed.

    • website.disableLinkDiscoveryboolean

      Test only the URLs you give, and follow no links.

    • website.disableScrollDownboolean

      Do not scroll each page to the bottom and back while testing.

    • website.disableStealthboolean

      Let websites detect that Silktide's browser is automated.

    • website.enableAnimationboolean

      Let pages animate. Silktide stops animation by default.

    • website.exclude3rdPartyPluginIssuesboolean

      Ignore issues inside common third-party plugins, such as embedded maps.

    • website.excludeQueryParamslist of strings

      Query parameters to remove from URLs, so pages that differ only by them count once.

    • website.ignoreAutomaticSitemapsboolean

      Do not use the sitemaps Silktide finds on its own.

    • website.inspectorCssstring

      CSS added to pages when they are shown in the Inspector.

    • website.languageslist of stringsrequired

      Language codes, such as en-US, that every page is in. Always present.

    • website.maxConnectionsinteger

      How many pages Silktide may load at once.

    • website.normalizeUrlPathboolean

      Lowercase URL paths, for websites that mix case.

    • website.optionalLanguageslist of strings

      Language codes a page might be in. Silktide detects them per page, which slows testing.

    • website.pageWaitnumber

      Seconds to wait after a page loads before testing it.

    • website.proxyHoststring

      A proxy server to test through.

    • website.proxyPortinteger

      The proxy server's port.

    • website.proxyPresetstring

      One of Silktide's proxies: eu-dublin, us-ohio or au-sydney. Empty for the region's own location.

    • website.proxyUsernamestring

      The proxy server's username.

    • website.readabilityFormulastring

      The readability formula, such as smog.

    • website.readabilityThresholdnumber

      The readability score pages should stay within.

    • website.reportLanguagestring

      The language AI reports about the website are written in. Empty for the account's language.

    • website.timeoutinteger

      Seconds to wait for a page to load before giving up.

    • website.trustPageDeclaredLanguageboolean

      Believe the language a page declares rather than detecting it.

    • website.userAgentSuffixstring

      Text added to the end of Silktide's browser user agent.

    • website.usernamestring

      The username Silktide signs in to pages with.

    • website.aiEnabledboolean

      Whether Silktide's AI may work on this website.

    • website.passwordSetbooleanrequired

      Whether a sign-in password is saved. Always present. Read-only: sending it changes nothing.

    • website.proxyPasswordSetbooleanrequired

      Whether a proxy password is saved. Always present. Read-only, like website.passwordSet.

  • tagIdslist of stringsrequired

    The ids of the tags on the whole website (section 0).

  • governanceAiOptimizerbooleanrequired

    Whether the website holds one of the account's Governance AI optimizers.

  • governanceAiOptimizerAvailablebooleanrequired

    Whether it could be given one now, counting one its own recent reports still hold.

  • reportLanguagestringrequired

    The language its AI reports are written in: its own setting, or the account's when unset.

Errors

StatusTypeWhen
403AccessDeniedThe account cannot add another website, or maxPages or maxDocuments is more than its balance has left.
400InvalidRequestThe name contains markup or control characters, website.reportLanguage is not a language Silktide writes reports in, or tagIds adds an id that is not one of the account's section tags. properties.field names it.
500Runtimename or homeUrl is missing.
401NotLoggedInNo API key was sent, or it is not a key for this region.(any operation)
429TooManyRequestsToo many requests to this path in five seconds. Retry after the number of seconds in the Retry-After header, which properties.retryAfter repeats.(any operation)
503-Silktide is busy. Retry after the number of seconds in the Retry-After header.(any operation)

Every error has the same body. See Errors.

Access

Permission
Any user of the account
Plan feature
None
Edition
Silktide 4 and Silktide 5
Cost
Uses the account's allowance
Available since
v1.0.0

Try it

Sends a real request to your account from this browser. Your key stays in this tab and goes only to the Silktide API.

This changes your account. It is not a sandbox.