> For the complete documentation index, see [llms.txt](https://docs.logilica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.logilica.com/advanced/import/uploading-team-data-beta.md).

# Uploading Team Data (beta)

Teams are groups of contributors that can collaborate and are managed collectively. These APIs allow you to set up and manage your teams on your domain.

## Importing Teams Data

{% hint style="info" %}
**Important**: Ensure your [API token](/advanced/api-tokens.md) has the `manage:team` scope when calling Teams APIs.
{% endhint %}

To ensure the accuracy of data in Logilica, Teams data should adhere to the following:

* Teams should have unique names.
* New members will automatically be added as contributors into your Logilica instance.
* The administrator of the team is assigned to the owner of the API token.
* For parent teams, include the `subTeams` field and use the GET Teams API to obtain the team's `ID`.

### Upload Example Using cURL

In the following, we provide an example of how to push your Teams data into Logilica for storage and built-in analytics.

{% hint style="info" %}
**Important**: Ensure the repository you build from is already **onboarded** in Logilica.
{% endhint %}

The cURL POST command is below. Note, that the POST command uses example data, including the API token `lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb` and the example workspace `myworkspace`.

```
curl --location --request POST 'https://logilica.io/api/import/v1/teams/create' \
--header 'X-lgca-token: lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb' \
--header 'x-lgca-domain: myworkspace' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Development Team",
    "members": [{
        "name": "John Doe",
        "email": "john.doe@org.com"
    },
    {
        "name": "Jane Doe,
        "email": "jane.doe@org.com"
    }],
    "subTeams": ["1234567"]
}'
```

## API Schema for Importing Team

### Create a Team

{% openapi src="/files/H2K3YSOSvLkeTJqrV3HE" path="teams/create" method="post" %}
[openapi.json](https://3637178088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvMP8keAdyp2axoLILtL5%2Fuploads%2Fgit-blob-d8a87b720df94b60e4756c4b7d2c1bfce151c6a1%2Fopenapi.json?alt=media)
{% endopenapi %}

### Update a Team

{% openapi src="/files/H2K3YSOSvLkeTJqrV3HE" path="teams/update/{teamID}" method="post" %}
[openapi.json](https://3637178088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvMP8keAdyp2axoLILtL5%2Fuploads%2Fgit-blob-d8a87b720df94b60e4756c4b7d2c1bfce151c6a1%2Fopenapi.json?alt=media)
{% endopenapi %}

### Delete a Team

{% openapi src="/files/H2K3YSOSvLkeTJqrV3HE" path="teams/delete/{teamID}" method="post" %}
[openapi.json](https://3637178088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvMP8keAdyp2axoLILtL5%2Fuploads%2Fgit-blob-d8a87b720df94b60e4756c4b7d2c1bfce151c6a1%2Fopenapi.json?alt=media)
{% endopenapi %}

### List Teams

{% openapi src="/files/H2K3YSOSvLkeTJqrV3HE" path="teams/" method="get" %}
[openapi.json](https://3637178088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvMP8keAdyp2axoLILtL5%2Fuploads%2Fgit-blob-d8a87b720df94b60e4756c4b7d2c1bfce151c6a1%2Fopenapi.json?alt=media)
{% endopenapi %}
