# Kiteworks API — sourceTypes Operations

**2 endpoints** | [Browse interactive reference](https://developer.kiteworks.com/api-reference/sourceTypes.html) | [Download spec slice](https://developer.kiteworks.com/assets/specs/sourceTypes.json)

> **Authentication required.** All requests must include a Bearer access token in the
> `Authorization` header. See [Authentication](https://developer.kiteworks.com/authentication.md) for how to
> obtain a token using OAuth 2.0 Authorization Code (PKCE) or JWT Bearer flow.

---

## GET /rest/sourceTypes

**Summary:** List all ECM source types

Returns a list of available ECM source types, including each type's name and whether users can configure sources of that type.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `mode` | query | no | Filter source types by mode flag. |
| `orderBy` | query | no | Sorting options |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | List of ECM source types retrieved successfully. |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (SourceTypeList):**

```json
{
  "data": [
    {
      "id": 1,
      "name": "SharePoint",
      "userCanSet": true
    },
    {
      "id": 2,
      "name": "OneDrive",
      "userCanSet": true
    }
  ]
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/sourceTypes" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/sourceTypes"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---

## GET /rest/sourceTypes/{id}

**Summary:** Returns requested ECM source type

Returns the details of the specified ECM source type, including its name and whether users can configure sources of that type.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | yes | ID of the sourceType to be retrieved |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | ECM source type details retrieved successfully. |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (SourceTypeInfo):**

```json
{
  "id": 1,
  "name": "SharePoint",
  "userCanSet": true
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/sourceTypes/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

id = "VALUE"  # ID of the sourceType to be retrieved

url = f"https://{{instance}}.kiteworks.com/rest/sourceTypes/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---
