# Teams

> HTML version: https://zapped.to/api-documentation/teams
> Authentication: an API key holding the scope each endpoint lists, sent as `Authorization: Bearer YOUR_API_KEY`. See https://zapped.to/api-documentation/index.md for the base URL, errors and rate limits.

## api_documentation.read_all

### api_documentation.endpoint

`GET https://zapped.to/api/teams/`

### Authentication

An API key with the `teams:read` scope (Read teams and members), sent as `Authorization: Bearer YOUR_API_KEY`.

### api_documentation.example

```bash
curl --request GET \
  --url 'https://zapped.to/api/teams/' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

| api_documentation.parameters | Details | Description |
| --- | --- | --- |
| search | api_documentation.optional, api_documentation.string | api_documentation.filters.search |
| search_by | api_documentation.optional, api_documentation.string | api_documentation.filters.search_by |
| datetime_field | api_documentation.optional, api_documentation.string | api_documentation.allowed_values |
| datetime_start | api_documentation.optional, api_documentation.string | api_documentation.filters.datetime_start |
| datetime_end | api_documentation.optional, api_documentation.string | api_documentation.filters.datetime_end |
| order_by | api_documentation.optional, api_documentation.string | api_documentation.filters.order_by |
| order_type | api_documentation.optional, api_documentation.string | api_documentation.filters.order_by_type |
| page | api_documentation.optional, api_documentation.int | api_documentation.filters.page |
| results_per_page | api_documentation.optional, api_documentation.int | api_documentation.filters.results_per_page |

### api_documentation.response

```json
{
    "data": [
        {
            "id": 1,
            "name": "Example team",
            "team_members": [
                {
                    "team_member_id": 1,
                    "user_email": "hello@example.com",
                    "access": {
                        "read": true,
                        "create": true,
                        "update": true,
                        "delete": false
                    },
                    "status": 1,
                    "datetime": "2026-09-28 08:02:43",
                    "last_datetime": null
                }
            ],
            "last_datetime": null,
            "datetime": "2026-09-28 08:02:43"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://zapped.to/api/teams?page=1",
        "last": "https://zapped.to/api/teams?page=1",
        "next": null,
        "prev": null,
        "self": "https://zapped.to/api/teams?page=1"
    }
}
```

## api_documentation.read

### api_documentation.endpoint

`GET https://zapped.to/api/teams/{team_id}`

### Authentication

An API key with the `teams:read` scope (Read teams and members), sent as `Authorization: Bearer YOUR_API_KEY`.

### api_documentation.example

```bash
curl --request GET \
  --url 'https://zapped.to/api/teams/{team_id}' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

### api_documentation.response

```json
{
    "data": {
        "id": 1,
        "name": "Example team",
        "team_members": [
            {
                "team_member_id": 1,
                "user_email": "hello@example.com",
                "access": {
                    "read": true,
                    "create": true,
                    "update": true,
                    "delete": false
                },
                "status": 1,
                "datetime": "2026-09-28 08:02:43",
                "last_datetime": null
            }
        ],
        "last_datetime": null,
        "datetime": "2026-09-28 08:02:43"
    }
}
```

## api_documentation.create

### api_documentation.endpoint

`POST https://zapped.to/api/teams`

### Authentication

An API key with the `teams:write` scope (Manage teams, invitations and memberships), sent as `Authorization: Bearer YOUR_API_KEY`.

| api_documentation.parameters | Details | Description |
| --- | --- | --- |
| name | api_documentation.required, api_documentation.string | - |

### api_documentation.example

```bash
curl --request POST \
  --url 'https://zapped.to/api/teams' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: multipart/form-data' \
  --form 'name=My team'
```

### api_documentation.response

```json
{
    "data": {
        "id": 1
    }
}
```

## api_documentation.update

### api_documentation.endpoint

`POST https://zapped.to/api/teams/{team_id}`

### Authentication

An API key with the `teams:write` scope (Manage teams, invitations and memberships), sent as `Authorization: Bearer YOUR_API_KEY`.

| api_documentation.parameters | Details | Description |
| --- | --- | --- |
| name | api_documentation.optional, api_documentation.string | - |

### api_documentation.example

```bash
curl --request POST \
  --url 'https://zapped.to/api/teams/{team_id}' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: multipart/form-data' \
  --form 'name=My new team name'
```

### api_documentation.response

```json
{
    "data": {
        "id": 1
    }
}
```

## api_documentation.delete

### api_documentation.endpoint

`DELETE https://zapped.to/api/teams/{team_id}`

### Authentication

An API key with the `teams:write` scope (Manage teams, invitations and memberships), sent as `Authorization: Bearer YOUR_API_KEY`.

### api_documentation.example

```bash
curl --request DELETE \
  --url 'https://zapped.to/api/teams/{team_id}' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```
