Skip to content
Menu
SilktideDevelopers

List websites and their sections

GET/v1/websites
View as Markdown

Returns every website the API key's user can see, one entry per section. Each website has a section 0, which is the whole website, and any sections made within it have ids of their own. A subsiteId names one of them, as {websiteId}-{sectionId}.

Use the websiteId with the other Websites operations, and the subsiteId with results queries that take a section.

tags is only sent when you ask for it with includeTags=1, and even then it is left out, rather than sent empty, for a section with no tags. Treat a missing tags as none.

Request
curl "https://api.eu.silktide.com/v1/websites?includeTags=1&orderBy=name" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
Response: Two websites, with tags
{
  "websites": [
    {
      "subsiteId": "2-0",
      "websiteId": 2,
      "sectionId": 0,
      "name": "Example",
      "homeUrl": "https://example.com/",
      "created": 1790216529,
      "websiteName": "Example",
      "websiteStatus": "live",
      "numPages": 812,
      "numDocuments": 40,
      "thumbnailUrl": "https://example-bucket.s3.amazonaws.com/websites/2/screenshots/desktop-thumb.webp",
      "tags": [
        {
          "tagId": "marketing",
          "entityType": "section",
          "entityId": "2-0",
          "label": "Marketing",
          "color": "#EBA52C",
          "tagGroup": ""
        }
      ]
    },
    {
      "subsiteId": "2-1",
      "websiteId": 2,
      "sectionId": 1,
      "name": "Blog",
      "homeUrl": "https://example.com/blog/",
      "created": 1790216600,
      "websiteName": "Example",
      "websiteStatus": "live",
      "numPages": 120,
      "numDocuments": 0,
      "thumbnailUrl": ""
    }
  ]
}

Request

Query parameters

  • searchTextstring

    Only sections whose name or home page contains this.

  • tagIdslist of strings

    Only sections with at least one of these tags. Send as tagIds[]=….

  • includeTagsstring

    1 to include each section's tags. Any value other than 0 or empty counts as 1.

    One of01

  • orderBystring

    The order. Defaults to recentlyViewed.

    One ofnamerecentlyViewedrecentlyCreatedrecentlyTestedleastRecentlyTested

Response

200JSON.

  • websiteslist of objectsrequired

    One entry per section the API key's user can see. Section 0 of each website is the whole website.

    Show 13 fields
    • subsiteIdstringrequired{websiteId}-{sectionId}

      The website and section together, as {websiteId}-{sectionId}.

    • websiteIdintegerrequiredat least 1

      The website.

    • sectionIdintegerrequired

      The section within the website. 0 is the whole website.

    • namestringrequired

      The section's name. For section 0, the website's name.

    • homeUrlstringrequired

      The section's home page. Can be empty.

    • createdintegerrequired

      When the section was created.

    • websiteNamestringrequired

      The website's name.

    • websiteStatusstringrequired

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

      One ofinstallingsetuplive

    • numPagesintegerrequired

      Pages Silktide has found in the section.

    • numDocumentsintegerrequired

      Documents (PDFs) Silktide has found in the section.

    • thumbnailUrlstringrequired

      A small screenshot of the section. Empty until one exists.

    • lastViewedinteger

      When the API key's user last viewed the section. 0 if never. Only when orderBy is recentlyViewed, the default; absent with any other order.

    • tagslist of objects

      The section's tags. Only with includeTags, and absent when the section has none.

      Show 6 fields
      • tagIdstringrequired

        The tag's id.

      • entityTypestringrequired

        What the tag is on. section for a website or section.

      • entityIdstringrequired

        The subsiteId of the section it is on.

      • labelstringrequired

        The tag's name.

      • colorstringrequired

        Its color, as a hex code such as #EBA52C.

      • tagGroupstringrequired

        The group it belongs to. Empty when it has none.

Errors

StatusTypeWhen
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
Free
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.