# Configure SIM integration with API key

`POST /api/integration/sim/setup`

Authentication (security requirement alternatives):

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

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

Parameters:

- `organizationId` (query, string, optional) - Optional organization ID to scope the integration
  Type: string

Request body: application/json (required)

Type: object

Schema: [ConfigureSimIntegrationDto](https://sourcey-gauzy.pages.dev/api-reference/models/configuresimintegrationdto/index.md)

- `apiKey` (required)
  Type: string
  
  SIM API key for authentication
  
  Example:
  
  ```json
  "sim_..."
  ```

Responses:

- 201: SIM integration configured successfully

- 400: Bad Request

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/integration/sim/setup' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "apiKey": "sim_..."
}'
```

### JavaScript

```javascript
const body = `{
  "apiKey": "sim_..."
}`;

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

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

### Python

```python
import requests

body = '''{
  "apiKey": "sim_..."
}'''

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