api
developers
integration
tutorial
documentation

API Keys and Documentation: Automate Your Bookmark Workflow

The StackLinker API lets you manage workspaces, folders, and bookmarks programmatically. Learn how to generate an API key and use the GraphQL interface.

Published on March 14, 2026 · 4 min read

API Keys and Documentation: Automate Your Bookmark Workflow

Want to integrate StackLinker with your tools or automate bookmark management? Our API gives you everything you need – from authentication to reading data and creating or updating bookmarks. This article walks you through setting up API keys and introduces the documentation.

Why Use the API?

The API opens up new possibilities:

  • Automation – scripts for bulk bookmark imports, migrations from other tools
  • Integrations – connect to Slack, Notion, project management tools
  • Custom tools – CLI apps, desktop clients, or mobile companions for StackLinker
  • Backup and export – regular backups of your bookmark structure to your own storage

How to Generate an API Key

API keys are managed under Profile → API Keys. Sign in to your account and look for the API Keys section in the sidebar.

API key management in profile

When creating a new key, you specify:

  1. Name – for easy identification (e.g. "Backup script", "Slack integration")
  2. Expiry – optional number of days until the key expires (empty = no expiry)
  3. Scopesread for reading data, write for creating and updating

Important: The token is shown only once when you create the key. Store it securely – once you close the dialog, you won't be able to view it again. Create a new key for each new integration.

Authentication in Requests

All API requests require authentication. Pass your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Without a valid key you'll receive a 401 Unauthorized error. If a key has expired or been revoked, generate a new one in your profile.

GraphQL Endpoint

StackLinker uses GraphQL – a single endpoint for all operations. The base URL is available in the docs or your instance settings (e.g. https://stacklinker.net/api).

POST {BASE_URL}/api/graphql
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "query": "query { me { id email nickname } }"
}

GraphQL lets you specify exactly what data you need – no over-fetching, no unnecessary payload. In one request you can fetch the user, workspaces, folders, and bookmarks.

What the Documentation Offers

In Docs → API (/en/docs/api) you'll find:

  • Interactive GraphiQL playground – test queries directly in the browser
  • Reference documentation – overview of queries and mutations (me, workspaces, folders, bookmarks, …)
  • Code examples in cURL, Node.js, Python, and PHP
  • GraphQL schema download for generating types and clients

For a quick start, open the playground, paste your API key, and try a query like me or workspaces.

Usage Examples

Fetch Workspaces

query Workspaces {
  workspaces(first: 10, after: null) {
    edges {
      node {
        id
        name
        isPersonal
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}

Create a Folder

mutation CreateFolder($workspaceId: ID!, $name: String!) {
  createFolderFolder(input: {
    workspaceId: $workspaceId
    name: $name
    parentId: null
  }) {
    folder {
      id
      name
    }
  }
}

Add a Bookmark

mutation CreateBookmark($workspaceId: ID!, $folderId: ID!, $name: String!, $url: String!) {
  createBookmarkBookmark(input: {
    workspaceId: $workspaceId
    folderId: $folderId
    name: $name
    url: $url
  }) {
    bookmark {
      id
      name
      url
    }
  }
}

Security Recommendations

  • Don't share keys – each integration should have its own key with appropriate scopes
  • Use read-only when possible – for scripts that only read data, set the read scope only
  • Set expiry when appropriate – for temporary integrations, configure an expiration
  • Revoke unused keys – you can revoke keys at any time in your profile

Next Steps

  1. Generate an API key in Profile → API Keys
  2. Open Docs → API and try the playground
  3. Download the schema and generate a client in your preferred stack
  4. Start with a simple me query and gradually add more complex operations

Have questions or ideas for improving the API? Reach out via our contact form.

Tags:
api
developers
integration
tutorial
documentation