Create Team
This endpoint allows customers with partner API key to create new teams and access them with a single API key
Available for Swarm Partners only. Get in touch to learn more about becoming a partner.
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
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 profile endpoint
- Fetch profile endpoint
- Network Mapper
- Add Connector
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 connector to the child team with ID specified in the headerAdd connector
without a team ID will add a connector to the parent team- Search and fetch with team ID in the header will search for profiles within the network of a child team
- Search and fetch without the team ID in the header will search across the whole swarm database
- Network mapper with header will search for profiles within the network of a child team
- Network mapper without header will search for profiles within the network of a PARENT team