# Team API

Use the Team API to manage domains, projects, routes, webhooks, suppressions, messages, and team settings from your application.

:::info
Team API tokens are different from Project API tokens. Project API tokens (format: `lm_xxx...`) are used for sending email and SMTP authentication. Team API tokens (format: `lm_team_...`) manage team resources and authenticate with `Authorization: Bearer ...`.
:::

For information on creating and managing Team API tokens through the dashboard, see the [Team API tokens](/platform/teams/api-tokens) guide.

## Prerequisites

Before you start, ensure you have:

- A Team API token with appropriate abilities (see [Team API tokens](/platform/teams/api-tokens))
- If you create the token yourself, a role with the required Team API token management permission
- An official [SDK](/sdks) or cURL

## Authentication

Team API tokens authenticate requests to the Lettermint API using the Bearer authentication scheme. Each token has a unique format beginning with `lm_team_` followed by 40 random characters.

Include your token in the `Authorization` header of every request:

<CodeTabs syncKey="lettermint-language">

```typescript title="Node.js"
import { Lettermint } from "lettermint";

const lettermint = new Lettermint({
  teamToken: process.env.LETTERMINT_TEAM_TOKEN!,
});
const team = await lettermint.team.retrieve();
```

```php title="PHP"
<?php

use Lettermint\Lettermint;

$lettermint = new Lettermint(teamToken: getenv('LETTERMINT_TEAM_TOKEN'));
$team = $lettermint->team->retrieve();
```

```python title="Python"
import os
from lettermint import Lettermint

lettermint = Lettermint(team_token=os.environ["LETTERMINT_TEAM_TOKEN"])
team = lettermint.team.retrieve()
```

```go title="Go"
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	lettermint "github.com/lettermint/lettermint-go/v3"
)

func main() {
	client, err := lettermint.New(lettermint.WithTeamToken(os.Getenv("LETTERMINT_TEAM_TOKEN")))
	if err != nil {
		log.Fatal(err)
	}

	team, err := client.Team.Retrieve(context.Background(), nil)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(team.Name)
}
```

```java title="Java"
import co.lettermint.Lettermint;
import co.lettermint.types.TeamData;

Lettermint lettermint = Lettermint.builder()
    .teamToken(System.getenv("LETTERMINT_TEAM_TOKEN"))
    .build();

TeamData team = lettermint.team().retrieve();
```

```bash title="cURL"
curl -X GET "https://api.lettermint.co/v1/team" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $LETTERMINT_TEAM_TOKEN"
```

</CodeTabs>

<Framed size="full">
  <img
    className="block"
    src="/docs/images/team-api-token-created.png"
    alt="Team API token displayed once after creation in the dashboard"
  />
</Framed>

:::warning
Never commit tokens to version control or expose them in client-side code. Store tokens securely in environment variables or a secrets manager.
:::

## Next steps

- **[Quickstart](/platform/teams/team-api/quickstart)** - Make your first Team API requests
- **[Team API tokens](/platform/teams/api-tokens)** - Create and manage tokens with the right abilities
- **[API Reference](/api-reference/team)** - Explore all Team API endpoints
