> ## Documentation Index
> Fetch the complete documentation index at: https://superthread.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> How to make requests to the Superthread API

All protected API endpoints require authentication.

## Personal Access Tokens

Superthread uses **Personal Access Tokens (PAT)** for authentication. Therfore any action taken via the API will be attributed to the person who generated the PAT. For example, if you create a card via the API, the card's activity feed in Superthread will say the card was created by you, likewise moving a card will say the card was you moved by you etc.

You can create and manage your PAT tokens in [Setting > Account > API access](https://app.superthread.com/settings/personal-access-tokens).

Include your PAT in the `Authorization` header as a Bearer token:

```bash theme={null}
 curl  -H "Authorization: Bearer <YOUR_PAT> ...
```

## Team ID (Workspace ID)

Many endpoints require you to include your `team_id` in the request URL. This is the ID or your Superthread 'Workspace' (hisotrically called 'Team'). We've made this easy to view and copy from the [API Access settings page](https://app.superthread.com/settings/personal-access-tokens).

**\[POST] Create a new card**

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer <YOUR_PAT>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My New Card",
    "content": "Some card content...",
    "board_id": "1",
    "list_id": "2"
  }' \
  https://api.superthread.com/v1/{team_id}/cards
```

## User ID

You may also need your User ID for actions like assigning yourself to a card. You can find this on the [API Access settings page](https://app.superthread.com/settings/personal-access-tokens).

Calling the `users` endpoint with `/me`  will also return your user ID and other information.

**\[GET] Your user details**

```bash theme={null}
curl \
  -H "Authorization: Bearer <YOUR_PAT>" \
  https://api.superthread.com/v1/users/me
```
