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

# Create Team

> This endpoint allows customers with partner API key to create new teams and access them with a single API key

<Note>
  Available for Swarm Partners only. Get in touch to learn more about becoming a partner.
</Note>

Once you become The Swarm Partner, the team used to generate your partner API key will be the Parent team. With your partner API key you can create many child teams. Child teams can be accessed and managed with the partner API key that was used to create them.

### Create a new child team

Endpoint: [https://bee.theswarm.com/team/create-team](https://bee.theswarm.com/team/create-team)

Method: POST

Request Body (JSON):

| Field         | Type   | Description                                                                                                                                        |
| :------------ | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| `team_name`   | string | Required. The desired name for the new team.                                                                                                       |
| `owner_email` | string | Optional. The email of the team owner. If not provided, the owner of the parent team will automatically become the team owner of the created team. |

Successful response will return an ID of the newly created team. Please save that ID as it will be needed to authenticate other requests you want to make on behalf of these team (adding connectors, searching etc.)

### Authenticate the requests with a child team ID

Once a team is created, the partner API key used for its creation can be used to access other endpoints in the context of the created team:

* Search Profiles endpoint
* Fetch Profile endpoint
* Search Companies endpoint
* Fetch Company endpoint
* Relationships endpoint (formerly Network Mapper)
* Add Connector endpoint

To authenticate requests for these endpoints, include the following header:

Header: x-authenticate-team: `<team_id>`
Replace `<team_id>` with the child team\_id obtained during team creation.

When the `x-authenticate-team` header is missing in a request, the action will be performed in the context of the parent team. For example:

* `Add connector` request with team ID in the header adds a connector to the child team with the ID specified in the header
* `Add connector` without a team ID adds a connector to the parent team
* Profile and company search/fetch with the team ID in the header run in the context of the child team (list/tag membership reflects that child team)
* Profile and company search/fetch without the team ID in the header run in the context of the parent team
* Relationships with the header returns profiles within the network of the child team
* Relationships without the header returns profiles within the network of the PARENT team
