# Create SCIM token

> Source: https://truto.one/docs/api-reference/admin/scim-tokens/create/

`POST /scim-token`

Resource: **SCIM Tokens**

## Request body

- **`team_id`** _(string)_
  The ID of the team this token belongs to.
- **`name`** _(string)_
  A descriptive name for the token.

## Response body

- **`id`** _(string)_
  The ID of the SCIM token.
- **`team_id`** _(string)_
  The ID of the team that owns this SCIM token.
- **`name`** _(string)_
  A descriptive name for the SCIM token.
- **`created_by`** _(string)_
  The ID of the user who created this token.
- **`last_used_at`** _(string)_
  The date and time the IdP last authenticated against /scim/v2 with this token. Null if never used.
- **`created_at`** _(string)_
  The date and time when the token was created.
- **`updated_at`** _(string)_
  The date and time when the token was last updated.
- **`token`** _(string)_
  Show-once SCIM bearer token; store it now, it cannot be retrieved later.

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/scim-token' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "team_id": "05daecaf-4365-42e8-8370-8127de5dd717",
  "name": "Okta provisioning"
}'
```

### JavaScript

```javascript
const body = {
  "team_id": "05daecaf-4365-42e8-8370-8127de5dd717",
  "name": "Okta provisioning"
};

const response = await fetch('https://api.truto.one/scim-token', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/scim-token"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "team_id": "05daecaf-4365-42e8-8370-8127de5dd717",
    "name": "Okta provisioning"
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())
```
