# Import role from self hosted to gauzy cloud hosted in bulk

`POST /api/roles/import/migrate`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Request body: application/json (required)

Type: array

Items:
  Type: string

Responses:

- 201: Role have been successfully imported.

- 400: Invalid input, The request body may contain clues as to what went wrong

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/roles/import/migrate' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '[
  "string"
]'
```

### JavaScript

```javascript
const body = `[
  "string"
]`;

const response = await fetch('http://localhost:3000/api/roles/import/migrate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''[
  "string"
]'''

response = requests.post(
    'http://localhost:3000/api/roles/import/migrate',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
