> 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-contributors-data.md).

# Uploading Contributors Data

Contributors are individuals linked across third-party accounts (e.g. GitHub, Jira and others) whose activity is explored in Logilica. The platform allows you to merge and manage these identities to provide a unified view of contributor activity across tools.

These APIs allow you to set up, manage and view your contributors and their accounts on your domain.

## Importing Contributors Data

When creating contributors using the `/create` API, the associated accounts of the user from the body request will be strictly reflected in Logilica. Accounts will be merged or unmerged with contributors, depending on the body's request.

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

* The `service` field should be one of the accepted services. The accepted services are:

  ```
  GitHub, GitLab, Git, Jira, AzureDevops, BitBucket, CircleCi, CodeCov, BuildKite
  ```
* If the target contributor does not exist, a new contributor will be added to the domain.
* If the contributor's account does not have an email, an empty string `email: ""` can be entered as a placeholder.

{% hint style="info" %}
Valid accounts must be linked to imported services in the Logilica platform. Please import the services linked to the account first, before adding the account to the user.
{% endhint %}

### Upload Example Using cURL <a href="#upload-example-using-curl" id="upload-example-using-curl"></a>

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/contributors/create' \
--header 'X-lgca-token: lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb' \
--header 'x-lgca-domain: myworkspace' \
--header 'Content-Type: application/json' \
--data-raw '[{
    "name": "John Doe",
    "email": "johndoe@test.com",
    "accounts": [{
        "service": "GitHub",
        "username": "johndoe",
        "email": "johndoe@github.com"
    },
    {
        "service": "Jira",
        "username": "johndoe@test.com",
        "email": "johndoe@test.com"
    }]
}]'
```

## API Schema for Contributors

### Create Contributors

## POST contributors/create

> Create or merge contributors with third party accounts

```json
{"openapi":"3.0.0","info":{"title":"Issues API","version":"1.0.0"},"servers":[{"url":"https://logilica.io/api/import/v1/"}],"paths":{"contributors/create":{"post":{"description":"Create or merge contributors with third party accounts","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The full name of the contributor"},"email":{"type":"string","description":"The email address of the contributor"},"accounts":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["GitHub","GitLab","Git","Jira","AzureDevops","BitBucket","CircleCi","CodeCov","BuildKite"],"description":"The external service this account is linked to, such as 'GitHub' or 'Jira'"},"username":{"type":"string","description":"The username for this account"},"email":{"type":"string","description":"The email address linked to this account"}},"required":["service","username","email"]},"description":"A list of connected external accounts (e.g. 'GitHub' or 'Jira') associated with the contributor."}},"required":["name","email","accounts"]}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"description":"Data given doesn't match schema. Return value will be ZodError with validation message"},"401":{"description":"Unauthorized"},"404":{"description":"Contributors not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"required":["errors"]}}}},"500":{"description":"Failed to process request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"required":["errors"]}}}}}}}}}
```

### List Contributors

## GET contributors/

> List the contributors in a domain

```json
{"openapi":"3.0.0","info":{"title":"Issues API","version":"1.0.0"},"servers":[{"url":"https://logilica.io/api/import/v1/"}],"paths":{"contributors/":{"get":{"description":"List the contributors in a domain","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"description":"Data given doesn't match schema. Return value will be ZodError with validation message"},"401":{"description":"Unauthorized"},"404":{"description":"Contributor not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"required":["errors"]}}}},"500":{"description":"Failed to process request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"required":["errors"]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.logilica.com/advanced/import/uploading-contributors-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
