# Quickstart

Now that you understand authentication, let's make your first API requests to get familiar with the Team API.

:::info
Before making requests, you'll need a Team API token. See [API Tokens](/platform/teams/api-tokens) for detailed instructions on creating and managing tokens.
:::

## Get Team Details

Retrieve information about your team including name, plan, tier, and verification status.

<CodeTabs>

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

const api = Lettermint.api(process.env.LETTERMINT_TEAM_TOKEN!);
const team = await api.team.retrieve();

console.log(team.name);
```

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

$api = Lettermint\Lettermint::api(getenv('LETTERMINT_TEAM_TOKEN'));
$team = $api->team->retrieve();

echo $team->name;
```

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

with Lettermint.api(os.environ["LETTERMINT_TEAM_TOKEN"]) as api:
    team = api.team.retrieve()
    print(team["name"])
```

```go title="Go"
api, err := lettermint.NewAPI(os.Getenv("LETTERMINT_TEAM_TOKEN"))
if err != nil {
    log.Fatal(err)
}

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

fmt.Println(team.Name)
```

```java title="Java"
ApiClient api = Lettermint.api(System.getenv("LETTERMINT_TEAM_TOKEN"));
TeamData team = api.team().retrieve();

System.out.println(team.name);
```

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

</CodeTabs>

**Response:**
```json
{
  "id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
  "name": "Acme Corp",
  "plan": "starter",
  "tier": "10000",
  "verified_at": "2024-01-15T10:30:00.000Z",
  "created_at": "2024-01-01T00:00:00.000Z"
}
```

## List Your Domains

Retrieve all verified domains in your team. This endpoint supports cursor-based pagination.

<CodeTabs>

```typescript title="Node.js"
const domains = await api.domains.list({ "page[size]": "30" });

console.log(domains.data);
```

```php title="PHP"
$domains = $api->domains->list(['page[size]' => '30']);

foreach ($domains->data as $domain) {
    echo $domain->domain . PHP_EOL;
}
```

```python title="Python"
domains = api.domains.list({"page[size]": "30"})

print(domains["data"])
```

```go title="Go"
domains, err := api.Domains.List(context.Background(), map[string]string{
    "page[size]": "30",
})
if err != nil {
    log.Fatal(err)
}

fmt.Println(domains.Data)
```

```java title="Java"
Map<String, String> query = Map.of("page[size]", "30");
DomainIndexResponse domains = api.domains().list(query);

System.out.println(domains.data);
```

```bash title="cURL"
curl -X GET "https://api.lettermint.co/v1/domains?page[size]=30" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $LETTERMINT_TEAM_TOKEN"
```

</CodeTabs>

**Response:**
```json
{
  "data": [
    {
      "id": "1a2b3c4d",
      "domain": "example.com",
      "verified_at": "2024-01-15T10:30:00.000Z",
      "created_at": "2024-01-10T00:00:00.000Z"
    }
  ],
  "next_cursor": "eyJpZCI6MTUsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
  "next_page_url": "https://api.lettermint.co/v1/domains?page[cursor]=eyJpZCI...",
  "per_page": 30
}
```

## Create a New Project

Create a new project within your team. Projects are used to organize your email sending and contain routes.

<CodeTabs>

```typescript title="Node.js"
const project = await api.projects.create({
  name: "Production App",
});

console.log(project.data.id);
```

```php title="PHP"
$project = $api->projects->create([
    'name' => 'Production App',
]);

echo $project->data->id;
```

```python title="Python"
project = api.projects.create({
    "name": "Production App",
})

print(project["data"]["id"])
```

```go title="Go"
project, err := api.Projects.Create(context.Background(), lettermint.ProjectStoreRequest{
    Name: "Production App",
})
if err != nil {
    log.Fatal(err)
}

fmt.Println(project.Data.ID)
```

```java title="Java"
StoreProjectData payload = new StoreProjectData();
payload.name = "Production App";

ProjectStoreResponse project = api.projects().create(payload);

System.out.println(project.data.id);
```

```bash title="cURL"
curl -X POST "https://api.lettermint.co/v1/projects" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $LETTERMINT_TEAM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Production App"}'
```

</CodeTabs>

**Success Response (201):**
```json
{
  "data": {
    "id": "5f4e3d2c",
    "name": "Production App",
    "smtp_enabled": false,
    "created_at": "2024-01-20T15:45:00.000Z"
  },
  "message": "Project created successfully."
}
```

**Validation Error (422):**
```json
{
  "message": "The name field is required.",
  "errors": {
    "name": ["The name field is required."]
  }
}
```

<Frame>
  <img
    className="block"
    src="/docs/images/api-token-access-logs.png"
    alt="API token activity log showing successful requests in the dashboard"
  />
</Frame>

:::tip
Use descriptive names for your resources to make them easier to identify in the dashboard and API responses.
:::

## Next Steps

- **[Reference](/platform/teams/team-api/reference)** - Learn about abilities, rate limits, and error handling
- **[Use Cases & Best Practices](/platform/teams/team-api/use-cases)** - Explore common workflows and production guidance
- **[API Reference](/api-reference)** - View complete API documentation
