# Integrations

Manage integrations.

## Retrieve global Microsoft 365 provisioning details

> Retrieve details of global Microsoft 365 settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/ms365":{"get":{"tags":["Integration"],"operationId":"getGlobalMicrosoft365ProvisioningDetails","summary":"Retrieve global Microsoft 365 provisioning details","description":"Retrieve details of global Microsoft 365 settings.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"national_cloud":{"type":"string","enum":["GLOBAL","CHINA"],"default":"GLOBAL","description":"The Microsoft cloud services are available in several separate national clouds.   \nThese national cloud versions are physical and logical network-isolated instances of Microsoft enterprise cloud services   \nthat are confined within the geographic borders of specific countries and operated by local personnel.\nCan be either:   \n- `GLOBAL`: Azure global service.\n- `CHINA`: Azure China service.\n"},"directory_id":{"type":"string","description":"The Directory ID (Tenant ID) of Microsoft identity platform.\n"},"application_id":{"type":"string","description":"The Application (client) ID of Azure AD.\n"},"redirect_uri":{"type":"string","readOnly":true,"description":"Redirect URI. The URIs we will accept as destinations when returning authentication responses (tokens) after successfully authenticating or signing out users.   \nThe redirect URI you send in the request to the login server should match one listed here. Also referred to as reply URLs.\n"},"sbc_redirect_uri":{"type":"string","readOnly":true,"description":"Same as the `redirect_uri`, but via the sbc network topology.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Reprovision global Microsoft 365 integration.

> Update global Microsoft 365 settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/ms365":{"post":{"tags":["Integration"],"operationId":"updateGlobalMicrosoft365Provisioning","summary":"Reprovision global Microsoft 365 integration.","description":"Update global Microsoft 365 settings.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"national_cloud":{"type":"string","enum":["GLOBAL","CHINA"],"default":"GLOBAL","description":"The Microsoft cloud services are available in several separate national clouds.   \nThese national cloud versions are physical and logical network-isolated instances of Microsoft enterprise cloud services   \nthat are confined within the geographic borders of specific countries and operated by local personnel.\nCan be either:   \n- `GLOBAL`: Azure global service.\n- `CHINA`: Azure China service.\n"},"directory_id":{"type":"string","description":"The Directory ID (Tenant ID) of Microsoft identity platform.\n"},"application_id":{"type":"string","description":"The Application (client) ID of Azure AD.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Download global Microsoft 365 certificate

> Download global Microsoft 365 certificate.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/ms365/certificate":{"get":{"tags":["Integration"],"operationId":"downloadGlobalMicrosoft365Certificate","summary":"Download global Microsoft 365 certificate","description":"Download global Microsoft 365 certificate.\n","responses":{"200":{"description":"OK","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"the format is `attachment; filename=\"example\"`"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Error"}}}}}}
```

## Generate new global Microsoft 365 certificate

> Generate new global Microsoft 365 certificate.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/ms365/certificate":{"post":{"tags":["Integration"],"operationId":"generateGlobalMicrosoft365Certificate","summary":"Generate new global Microsoft 365 certificate","description":"Generate new global Microsoft 365 certificate.\n","responses":{"200":{"description":"OK","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"the format is `attachment; filename=\"example\"`"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve global Google integrations

> Retrieve details of global Google integrations settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/google":{"get":{"tags":["Integration"],"operationId":"getGlobalGoogleIntegrations","summary":"Retrieve global Google integrations","description":"Retrieve details of global Google integrations settings.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The client ID of Google Cloud project.\n"},"client_secret":{"type":"string","description":"The client secret of Google Cloud project.\n"},"redirect_uri":{"type":"string","readOnly":true,"description":"Redirect URI. The URIs we will accept as destinations when returning authentication responses (tokens) after successfully authenticating or signing out users.   \nThe redirect URI you send in the request to the login server should match one listed here. Also referred to as reply URLs.\n"},"sbc_redirect_uri":{"type":"string","readOnly":true,"description":"Same as the `redirect_uri`, but via the sbc network topology.\n"},"auth_consent_uri":{"type":"string","readOnly":true,"description":"The Google OAuth2 consent uri.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update global Google integration.

> Update global Google integration settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/google":{"post":{"tags":["Integration"],"operationId":"updateGlobalGoogleIntegrations","summary":"Update global Google integration.","description":"Update global Google integration settings.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The client ID of Google Cloud project.\n"},"client_secret":{"type":"string","description":"The client secret of Google Cloud project.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Retrieve tenant Microsoft 365 provisioning details

> Retrieve details of tenant Microsoft 365 settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365":{"get":{"tags":["Integration"],"operationId":"getTenantMicrosoft365ProvisioningDetails","summary":"Retrieve tenant Microsoft 365 provisioning details","description":"Retrieve details of tenant Microsoft 365 settings.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"national_cloud":{"type":"string","enum":["GLOBAL","CHINA"],"default":"GLOBAL","description":"The Microsoft cloud services are available in several separate national clouds.   \nThese national cloud versions are physical and logical network-isolated instances of Microsoft enterprise cloud services   \nthat are confined within the geographic borders of specific countries and operated by local personnel.\nCan be either:   \n- `GLOBAL`: Azure global service.\n- `CHINA`: Azure China service.\n"},"directory_id":{"type":"string","description":"The Directory ID (Tenant ID) of Microsoft identity platform.\n"},"application_id":{"type":"string","description":"The Application (client) ID of Azure AD.\n"},"redirect_uri":{"type":"string","readOnly":true,"description":"Redirect URI. The URIs we will accept as destinations when returning authentication responses (tokens) after successfully authenticating or signing out users.   \nThe redirect URI you send in the request to the login server should match one listed here. Also referred to as reply URLs.\n"},"sbc_redirect_uri":{"type":"string","readOnly":true,"description":"Same as the `redirect_uri`, but via the sbc network topology.\n"},"sync_time":{"type":"string","description":"The crontab expression <https://en.wikipedia.org/wiki/Cron>\n"},"users":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"sync_guest_users":{"type":"boolean","default":false,"description":"Whether to enable gust user synchronization.\n"},"sync_photo":{"type":"boolean","default":false,"description":"Whether to synchronize user photo.\n"},"starting_extension_number":{"type":"string","minLength":3,"maxLength":13,"pattern":"[0-9]{3,13}","description":"The starting extension number for synchronized users.   \nLeft padding with zeros is not allowed.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"sign_in_as_administrator":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"}}},"sign_in_as_standard_user":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"personal_contacts":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable user personal contacts synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"shared_mailbox":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"events":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"groups":{"type":"array","items":{"type":"string","description":"The groups to sync from Microsoft 365.\n"},"description":"A collection of Microsoft 365 groups to sync.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Reprovision tenant Microsoft 365 integration.

> Update tenant Microsoft 365 settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365":{"post":{"tags":["Integration"],"operationId":"updateTenantMicrosoft365Provisioning","summary":"Reprovision tenant Microsoft 365 integration.","description":"Update tenant Microsoft 365 settings.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"national_cloud":{"type":"string","enum":["GLOBAL","CHINA"],"default":"GLOBAL","description":"The Microsoft cloud services are available in several separate national clouds.   \nThese national cloud versions are physical and logical network-isolated instances of Microsoft enterprise cloud services   \nthat are confined within the geographic borders of specific countries and operated by local personnel.\nCan be either:   \n- `GLOBAL`: Azure global service.\n- `CHINA`: Azure China service.\n"},"directory_id":{"type":"string","description":"The Directory ID (Tenant ID) of Microsoft identity platform.\n"},"application_id":{"type":"string","description":"The Application (client) ID of Azure AD.\n"},"sync_time":{"type":"string","description":"The crontab expression <https://en.wikipedia.org/wiki/Cron>\n"},"users":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"sync_guest_users":{"type":"boolean","default":false,"description":"Whether to enable gust user synchronization.\n"},"sync_photo":{"type":"boolean","default":false,"description":"Whether to synchronize user photo.\n"},"starting_extension_number":{"type":"string","minLength":3,"maxLength":13,"pattern":"[0-9]{3,13}","description":"The starting extension number for synchronized users.   \nLeft padding with zeros is not allowed.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"sign_in_as_administrator":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"}}},"sign_in_as_standard_user":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"personal_contacts":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable user personal contacts synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"shared_mailbox":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"events":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable Microsoft 365 users with extensions synchronization.\n"},"selected_users":{"type":"array","items":{"type":"string","description":"The `Principal Name` of Microsoft 365 user.\n"},"description":"A collection of Microsoft 365 user's ID.\n"},"sync_type":{"type":"string","enum":["ALL","INCLUDE","EXCLUDE"],"default":"ALL","description":"The synchronization policy:   \nCan be either:   \n- `ALL`: All users will be synced.\n- `INCLUDE`: All users except selected users will be synced.\n- `EXCLUDE`: All selected users will be synced.\n"}}},"groups":{"type":"array","items":{"type":"string","description":"The groups to sync from Microsoft 365.\n"},"description":"A collection of Microsoft 365 groups to sync.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Download Microsoft 365 certificate

> Download Microsoft 365 certificate.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/certificate":{"get":{"tags":["Integration"],"operationId":"downloadMicrosoft365Certificate","summary":"Download Microsoft 365 certificate","description":"Download Microsoft 365 certificate.\n","responses":{"200":{"description":"OK","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"the format is `attachment; filename=\"example\"`"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Error"}}}}}}
```

## Generate new Microsoft 365 certificate

> Generate new Microsoft 365 certificate.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/certificate":{"post":{"tags":["Integration"],"operationId":"generateMicrosoft365Certificate","summary":"Generate new Microsoft 365 certificate","description":"Generate new Microsoft 365 certificate.\n","responses":{"200":{"description":"OK","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"the format is `attachment; filename=\"example\"`"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve a collection of Microsoft 365 users

> Retrieve a collection of Microsoft 365 users.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/users":{"get":{"tags":["Integration"],"operationId":"listMicrosoft365Users","summary":"Retrieve a collection of Microsoft 365 users","description":"Retrieve a collection of Microsoft 365 users.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The `OID` of Microsoft 365 user.\n"},"name":{"type":"string","description":"The name of Microsoft 365 user.\n"},"email":{"allOf":[{"type":"string","maxLength":128,"description":"The email address.\n"},{"description":"The email address of Microsoft 365 user.\n"}]}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List Microsoft 365 users by type

> List users from Microsoft 365 by user type.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/users/{type}":{"get":{"tags":["Integration"],"operationId":"listMicrosoft365UsersByType","summary":"List Microsoft 365 users by type","description":"List users from Microsoft 365 by user type.\n","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["USER","PRIVATE","SHARED"]}},{"name":"top","in":"query","description":"The maximum number of items to return","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","description":"Search for users by name, email, or other fields","schema":{"type":"string"}},{"name":"skiptoken","in":"query","description":"Token for pagination","schema":{"type":"string"}},{"name":"group","in":"query","description":"Group ID to filter users by group membership","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The `OID` of Microsoft 365 user.\n"},"name":{"type":"string","description":"The name of Microsoft 365 user.\n"},"email":{"allOf":[{"type":"string","maxLength":128,"description":"The email address.\n"},{"description":"The email address of Microsoft 365 user.\n"}]}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List MS365 groups

> List all MS365 groups

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/groups":{"get":{"tags":["Integration"],"summary":"List MS365 groups","description":"List all MS365 groups","operationId":"listMS365Groups","parameters":[{"name":"$top","in":"query","description":"Number of items to return per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}},{"name":"skiptoken","in":"query","description":"Skip token for pagination","schema":{"type":"string"}},{"name":"search","in":"query","description":"Search for groups by displayName or mail","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"link":{"description":"Link header for pagination","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"mail":{"type":"string"}}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal server error"}}}}}}
```

## Bulk get MS365 groups

> Bulk get MS365 groups by IDs

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/groups/get_many":{"post":{"tags":["Integration"],"summary":"Bulk get MS365 groups","description":"Bulk get MS365 groups by IDs","operationId":"bulkGetMS365Groups","requestBody":{"description":"Group IDs","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":0}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"mail":{"type":"string"}}}}}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal server error"}}}}}}
```

## List Microsoft 365 group members

> List members of a Microsoft 365 group.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/ms365/groups/{id}/members":{"get":{"tags":["Integration"],"operationId":"listMicrosoft365GroupMembers","summary":"List Microsoft 365 group members","description":"List members of a Microsoft 365 group.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"top","in":"query","description":"The maximum number of items to return","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","description":"Search for users by name, email, or other fields","schema":{"type":"string"}},{"name":"skiptoken","in":"query","description":"Token for pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The `OID` of Microsoft 365 user.\n"},"name":{"type":"string","description":"The name of Microsoft 365 user.\n"},"email":{"allOf":[{"type":"string","maxLength":128,"description":"The email address.\n"},{"description":"The email address of Microsoft 365 user.\n"}]}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve tenant Google integrations

> Retrieve details of tenant Google integrations settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google":{"get":{"tags":["Integration"],"operationId":"getTenantGoogleIntegrations","summary":"Retrieve tenant Google integrations","description":"Retrieve details of tenant Google integrations settings.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The client ID of Google Cloud project.\n"},"client_secret":{"type":"string","description":"The client secret of Google Cloud project.\n"},"redirect_uri":{"type":"string","readOnly":true,"description":"Redirect URI. The URIs we will accept as destinations when returning authentication responses (tokens) after successfully authenticating or signing out users.   \nThe redirect URI you send in the request to the login server should match one listed here. Also referred to as reply URLs.\n"},"sbc_redirect_uri":{"type":"string","readOnly":true,"description":"Same as the `redirect_uri`, but via the sbc network topology.\n"},"auth_consent_uri":{"type":"string","readOnly":true,"description":"The Google OAuth2 consent uri.\n"},"sync_time":{"type":"string","description":"The time at which the synchronization should be performed, using cron syntax.\nDefaults to '0 0 * * *' (midnight every day).\n"},"users":{"type":"object","description":"User synchronization settings.\n","properties":{"enabled":{"type":"boolean","description":"Whether user synchronization is enabled.\n"},"sync_photo":{"type":"boolean","description":"Whether to synchronize user photos.\n"},"starting_extension_number":{"type":"string","description":"The starting extension number for synchronized users.\n"},"sync_type":{"type":"string","enum":["all","include","exclude"],"description":"The synchronization type: 'all' for all users, 'include' for specific users, or 'exclude' for all except specific users.\n"},"selected_users":{"type":"array","items":{"type":"string"},"description":"The list of selected users for synchronization (depending on sync_type).\n"}}},"sign_in_as_standard_user":{"type":"object","description":"Standard user SSO settings.\n","properties":{"enabled":{"type":"boolean","description":"Whether standard user SSO is enabled.\n"},"sync_type":{"type":"string","enum":["all","include","exclude"],"description":"The SSO type: 'all' for all users, 'include' for specific users, or 'exclude' for all except specific users.\n"},"selected_users":{"type":"array","items":{"type":"string"},"description":"The list of selected users for SSO (depending on sync_type).\n"}}},"directory_contacts":{"type":"object","description":"Directory contact synchronization settings.\n","properties":{"enabled":{"type":"boolean","description":"Whether directory contact synchronization is enabled.\n"},"sync_type":{"type":"string","enum":["all","include","exclude"],"description":"The synchronization type: 'all' for all contacts, 'include' for specific contacts, or 'exclude' for all except specific contacts.\n"},"selected_contacts":{"type":"array","items":{"type":"string"},"description":"The list of selected contacts for synchronization (depending on sync_type).\n"}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update tenant Google integration.

> Update tenant Google integration settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google":{"post":{"tags":["Integration"],"operationId":"updateTenantGoogleIntegrations","summary":"Update tenant Google integration.","description":"Update tenant Google integration settings.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The client ID of Google Cloud project.\n"},"client_secret":{"type":"string","description":"The client secret of Google Cloud project.\n"},"sync_time":{"type":"string","description":"The time at which the synchronization should be performed, using cron syntax.\nDefaults to '0 0 * * *' (midnight every day).\n"},"users":{"type":"object","description":"User synchronization settings.\n","properties":{"enabled":{"type":"boolean","description":"Whether user synchronization is enabled.\n"},"sync_photo":{"type":"boolean","description":"Whether to synchronize user photos.\n"},"starting_extension_number":{"type":"string","description":"The starting extension number for synchronized users.\n"},"sync_type":{"type":"string","enum":["all","include","exclude"],"description":"The synchronization type: 'all' for all users, 'include' for specific users, or 'exclude' for all except specific users.\n"},"selected_users":{"type":"array","items":{"type":"string"},"description":"The list of selected users for synchronization (depending on sync_type).\n"}}},"sign_in_as_standard_user":{"type":"object","description":"Standard user SSO settings.\n","properties":{"enabled":{"type":"boolean","description":"Whether standard user SSO is enabled.\n"},"sync_type":{"type":"string","enum":["all","include","exclude"],"description":"The SSO type: 'all' for all users, 'include' for specific users, or 'exclude' for all except specific users.\n"},"selected_users":{"type":"array","items":{"type":"string"},"description":"The list of selected users for SSO (depending on sync_type).\n"}}},"directory_contacts":{"type":"object","description":"Directory contact synchronization settings.\n","properties":{"enabled":{"type":"boolean","description":"Whether directory contact synchronization is enabled.\n"},"sync_type":{"type":"string","enum":["all","include","exclude"],"description":"The synchronization type: 'all' for all contacts, 'include' for specific contacts, or 'exclude' for all except specific contacts.\n"},"selected_contacts":{"type":"array","items":{"type":"string"},"description":"The list of selected contacts for synchronization (depending on sync_type).\n"}}}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## List Google users

> List users from Google Workspace.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google/users/{type}":{"get":{"tags":["Integration"],"operationId":"listGoogleUsers","summary":"List Google users","description":"List users from Google Workspace.\n","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["USER"]}},{"name":"top","in":"query","description":"The maximum number of items to return","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","description":"Search for users by name, email, or other fields","schema":{"type":"string"}},{"name":"skiptoken","in":"query","description":"Token for pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"principal_name":{"type":"string"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get Google user details

> Get detailed information about a specific Google Workspace user.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google/users/details/{id}":{"get":{"tags":["Integration"],"operationId":"getGoogleUserDetails","summary":"Get Google user details","description":"Get detailed information about a specific Google Workspace user.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The user ID of the Google account.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"principal_name":{"type":"string"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List Google directory contacts

> List all Google directory contacts.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google/directory":{"get":{"tags":["Integration"],"operationId":"listGoogleDirectoryContacts","summary":"List Google directory contacts","description":"List all Google directory contacts.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","description":"Google directory contact details.\n","properties":{"id":{"type":"string","description":"The contact ID (without people/ prefix).\n"},"name":{"type":"string","description":"The contact name.\n"},"email":{"type":"string","description":"The contact email.\n"},"principal_name":{"type":"string","description":"The contact principal name (usually the same as email).\n"}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get Google directory contact details

> Get details of a Google directory contact by ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google/directory/{id}":{"get":{"tags":["Integration"],"operationId":"getGoogleDirectoryContact","summary":"Get Google directory contact details","description":"Get details of a Google directory contact by ID.\n","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"Contact ID"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"Google directory contact details.\n","properties":{"id":{"type":"string","description":"The contact ID (without people/ prefix).\n"},"name":{"type":"string","description":"The contact name.\n"},"email":{"type":"string","description":"The contact email.\n"},"principal_name":{"type":"string","description":"The contact principal name (usually the same as email).\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Bulk get Google directory contacts

> Bulk get details of Google directory contacts by IDs.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google/directory/get_many":{"post":{"tags":["Integration"],"operationId":"bulkGetGoogleDirectoryContacts","summary":"Bulk get Google directory contacts","description":"Bulk get details of Google directory contacts by IDs.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"description":"List of contact IDs"}},"required":["ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","description":"Google directory contact details.\n","properties":{"id":{"type":"string","description":"The contact ID (without people/ prefix).\n"},"name":{"type":"string","description":"The contact name.\n"},"email":{"type":"string","description":"The contact email.\n"},"principal_name":{"type":"string","description":"The contact principal name (usually the same as email).\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Generate Google authorization URL

> Generate Google authorization URL for tenant

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/google/authorization":{"post":{"tags":["Integration"],"summary":"Generate Google authorization URL","description":"Generate Google authorization URL for tenant","operationId":"googleAuthorization","requestBody":{"description":"Google authorization request","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Google client ID"},"client_secret":{"type":"string","description":"Google client secret"},"callback_url":{"type":"string","description":"Callback URL after authorization"}},"required":["client_id","client_secret"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"auth_consent_uri":{"type":"string","description":"Google authorization URL"}}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"409":{"description":"Client ID already exists"},"500":{"description":"Internal server error"}}}}}}
```

## Get CRM integration

> Retrieve details of tenant CRM integration configurations.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm":{"get":{"tags":["Integration"],"operationId":"getCRMIntegration","summary":"Get CRM integration","description":"Retrieve details of tenant CRM integration configurations.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"The CRM provider.   \nSuch as zoho, hubspot.\n"},"opts":{"oneOf":[{"type":"object","title":"Zoho application","properties":{"client_id":{"type":"string","description":"The client ID of integrated Zoho application.\n"},"client_secret":{"type":"string","description":"The client secret of integrated Zoho application.\n"},"region":{"type":"string","description":"The data centers of Zoho.   \nCan be either:   \n - `United States`\n - `Europe`\n - `India`\n - `Australia`\n - `Japan`\n - `Canada`\n - `Saudi Arabia`\n"},"enable_create_contact":{"type":"boolean","default":true,"description":"When enabled, users can create new contacts into CRM from client.\n"},"contact_created_as":{"type":"string","enum":["Contact","Lead"],"default":"Contact","description":"The type of new created contacts.   \nCan be either:\n - `Contact`\n - `Lead`\n"},"contact_lookup_order":{"type":"array","items":{"type":"string","enum":["Contacts","Leads","Accounts"]},"default":["Contacts","Leads","Accounts"],"description":"The lookup order expressed as an array.   \nThe array elements must be `Contacts`, `Leads`, `Accounts`, Duplicates are not allowed.\n"},"contact_lookup_condition":{"type":"string","enum":["Always","NotFoundLocally"],"default":"Always","description":"The lookup condition.   \nCan be either:   \n- `Always`: Always query from CRM.\n- `NotFoundLocally`: Query PBX contacts first, then CRM when not found.\n"},"enable_call_logging":{"type":"boolean","default":false,"description":"When enabled, a Zoho call activity will automatically be created for each call.\n"},"enable_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a link to the user's call recording would be posted to the Zoho activity.\n"},"secure_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a secure url instead of public access url to the user's call recording would be posted to the Zoho activity.\n"},"redirect_url":{"type":"string","readOnly":true,"description":"The callback URL (also known as redirect URI) In OAuth 2.0.   \nIt is the URL in your application where the authorization server redirects the user after they have granted or denied access to their data.   \nIt's crucial for security and must be pre-registered with the authorization server.\n"},"sbc_redirect_url":{"type":"string","readOnly":true,"description":"The callback URL like `redirect_url` but under SBC network topology.\n"},"auth_url":{"type":"string","readOnly":true,"description":"The authorization URL of Zoho authorization server.\n"},"refresh_token":{"type":"string","readOnly":true,"description":"The refresh token from Zoho authorization server.\n"}}},{"type":"object","title":"HubSpot application","properties":{"client_id":{"type":"string","description":"The client ID of integrated HubSpot application.\n"},"client_secret":{"type":"string","description":"The client secret of integrated HubSpot application.\n"},"enable_create_contact":{"type":"boolean","default":true,"description":"When enabled, users can create new contacts into CRM from client.\n"},"contact_lookup_order":{"type":"array","items":{"type":"string","enum":["Contacts","Companies"]},"default":["Contacts","Companies"],"description":"The lookup order expressed as an array.   \nThe array elements must be `Contacts`, `Companies`. Duplicates are not allowed.\n"},"contact_lookup_condition":{"type":"string","enum":["Always","NotFoundLocally"],"default":"Always","description":"The lookup condition.   \nCan be either:   \n- `Always`: Always query from CRM.\n- `NotFoundLocally`: Query PBX contacts first, then CRM when not found.\n"},"enable_call_logging":{"type":"boolean","default":false,"description":"Whether to automatically create HubSpot call activity for calls.\n"},"enable_call_recording_logging":{"type":"boolean","default":false,"description":"Whether to automatically create HubSpot call recording activity for calls.\n"},"secure_call_recording_logging":{"type":"boolean","default":true,"description":"When enabled, a secure url instead of public access url to the user's call recording would be posted to the HubSpot call recording activity.\n"},"redirect_url":{"type":"string","readOnly":true,"description":"The callback URL (also known as redirect URI) In OAuth 2.0.   \nIt is the URL in your application where the authorization server redirects the user after they have granted or denied access to their data.   \nIt's crucial for security and must be pre-registered with the authorization server.\n"},"sbc_redirect_url":{"type":"string","readOnly":true,"description":"The callback URL like `redirect_url` but under SBC network topology.\n"}}},{"type":"object","title":"Odoo application","properties":{"base_url":{"type":"string","description":"The domain name of the database where Odoo is installed.\n"},"database":{"type":"string","description":"The database name of the database where Odoo CRM is installed.\n"},"username":{"type":"string","description":"The login email address of the Odoo administrator account.\n"},"api_key":{"type":"string","description":"The API key of integrated Odoo application.\n"},"enable_create_contact":{"type":"boolean","default":true,"description":"When enabled, users can create new contacts into CRM from client.\n"},"contact_created_as":{"type":"string","enum":["Individual","Lead"],"default":"Individual","description":"The type of new created contacts.   \nCan be either:\n - `Individual`\n - `Lead`\n"},"contact_lookup_order":{"type":"array","items":{"type":"string","enum":["Individuals","Leads","Companies"]},"default":["Individuals","Leads","Companies"],"description":"The lookup order expressed as an array.   \nThe array elements must be `Individuals`, `Leads`, `Companies`, Duplicates are not allowed.\n"},"contact_lookup_condition":{"type":"string","enum":["Always","NotFoundLocally"],"default":"Always","description":"The lookup condition.   \nCan be either:   \n- `Always`: Always query from CRM.\n- `NotFoundLocally`: Query PBX contacts first, then CRM when not found.\n"},"enable_call_logging":{"type":"boolean","default":false,"description":"When enabled, a Odoo call activity will automatically be created for each call.\n"},"enable_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a link to the user's call recording would be posted to the Odoo activity.\n"},"secure_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a secure url instead of public access url to the user's call recording would be posted to the Odoo activity.\n"}}}],"type":"object"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update CRM integration

> Update tenant CRM integration configurations.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm":{"post":{"tags":["Integration"],"operationId":"updateCRMIntegration","summary":"Update CRM integration","description":"Update tenant CRM integration configurations.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"The CRM provider.   \nSuch as zoho, hubspot.\n"},"opts":{"oneOf":[{"type":"object","title":"Zoho application","properties":{"client_id":{"type":"string","description":"The client ID of integrated Zoho application.\n"},"client_secret":{"type":"string","description":"The client secret of integrated Zoho application.\n"},"region":{"type":"string","description":"The data centers of Zoho.   \nCan be either:   \n - `United States`\n - `Europe`\n - `India`\n - `Australia`\n - `Japan`\n - `Canada`\n - `Saudi Arabia`\n"},"enable_create_contact":{"type":"boolean","default":true,"description":"When enabled, users can create new contacts into CRM from client.\n"},"contact_created_as":{"type":"string","enum":["Contact","Lead"],"default":"Contact","description":"The type of new created contacts.   \nCan be either:\n - `Contact`\n - `Lead`\n"},"contact_lookup_order":{"type":"array","items":{"type":"string","enum":["Contacts","Leads","Accounts"]},"default":["Contacts","Leads","Accounts"],"description":"The lookup order expressed as an array.   \nThe array elements must be `Contacts`, `Leads`, `Accounts`, Duplicates are not allowed.\n"},"contact_lookup_condition":{"type":"string","enum":["Always","NotFoundLocally"],"default":"Always","description":"The lookup condition.   \nCan be either:   \n- `Always`: Always query from CRM.\n- `NotFoundLocally`: Query PBX contacts first, then CRM when not found.\n"},"enable_call_logging":{"type":"boolean","default":false,"description":"When enabled, a Zoho call activity will automatically be created for each call.\n"},"enable_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a link to the user's call recording would be posted to the Zoho activity.\n"},"secure_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a secure url instead of public access url to the user's call recording would be posted to the Zoho activity.\n"},"redirect_url":{"type":"string","readOnly":true,"description":"The callback URL (also known as redirect URI) In OAuth 2.0.   \nIt is the URL in your application where the authorization server redirects the user after they have granted or denied access to their data.   \nIt's crucial for security and must be pre-registered with the authorization server.\n"},"sbc_redirect_url":{"type":"string","readOnly":true,"description":"The callback URL like `redirect_url` but under SBC network topology.\n"},"auth_url":{"type":"string","readOnly":true,"description":"The authorization URL of Zoho authorization server.\n"},"refresh_token":{"type":"string","readOnly":true,"description":"The refresh token from Zoho authorization server.\n"}}},{"type":"object","title":"HubSpot application","properties":{"client_id":{"type":"string","description":"The client ID of integrated HubSpot application.\n"},"client_secret":{"type":"string","description":"The client secret of integrated HubSpot application.\n"},"enable_create_contact":{"type":"boolean","default":true,"description":"When enabled, users can create new contacts into CRM from client.\n"},"contact_lookup_order":{"type":"array","items":{"type":"string","enum":["Contacts","Companies"]},"default":["Contacts","Companies"],"description":"The lookup order expressed as an array.   \nThe array elements must be `Contacts`, `Companies`. Duplicates are not allowed.\n"},"contact_lookup_condition":{"type":"string","enum":["Always","NotFoundLocally"],"default":"Always","description":"The lookup condition.   \nCan be either:   \n- `Always`: Always query from CRM.\n- `NotFoundLocally`: Query PBX contacts first, then CRM when not found.\n"},"enable_call_logging":{"type":"boolean","default":false,"description":"Whether to automatically create HubSpot call activity for calls.\n"},"enable_call_recording_logging":{"type":"boolean","default":false,"description":"Whether to automatically create HubSpot call recording activity for calls.\n"},"secure_call_recording_logging":{"type":"boolean","default":true,"description":"When enabled, a secure url instead of public access url to the user's call recording would be posted to the HubSpot call recording activity.\n"},"redirect_url":{"type":"string","readOnly":true,"description":"The callback URL (also known as redirect URI) In OAuth 2.0.   \nIt is the URL in your application where the authorization server redirects the user after they have granted or denied access to their data.   \nIt's crucial for security and must be pre-registered with the authorization server.\n"},"sbc_redirect_url":{"type":"string","readOnly":true,"description":"The callback URL like `redirect_url` but under SBC network topology.\n"}}},{"type":"object","title":"Odoo application","properties":{"base_url":{"type":"string","description":"The domain name of the database where Odoo is installed.\n"},"database":{"type":"string","description":"The database name of the database where Odoo CRM is installed.\n"},"username":{"type":"string","description":"The login email address of the Odoo administrator account.\n"},"api_key":{"type":"string","description":"The API key of integrated Odoo application.\n"},"enable_create_contact":{"type":"boolean","default":true,"description":"When enabled, users can create new contacts into CRM from client.\n"},"contact_created_as":{"type":"string","enum":["Individual","Lead"],"default":"Individual","description":"The type of new created contacts.   \nCan be either:\n - `Individual`\n - `Lead`\n"},"contact_lookup_order":{"type":"array","items":{"type":"string","enum":["Individuals","Leads","Companies"]},"default":["Individuals","Leads","Companies"],"description":"The lookup order expressed as an array.   \nThe array elements must be `Individuals`, `Leads`, `Companies`, Duplicates are not allowed.\n"},"contact_lookup_condition":{"type":"string","enum":["Always","NotFoundLocally"],"default":"Always","description":"The lookup condition.   \nCan be either:   \n- `Always`: Always query from CRM.\n- `NotFoundLocally`: Query PBX contacts first, then CRM when not found.\n"},"enable_call_logging":{"type":"boolean","default":false,"description":"When enabled, a Odoo call activity will automatically be created for each call.\n"},"enable_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a link to the user's call recording would be posted to the Odoo activity.\n"},"secure_call_recording_logging":{"type":"boolean","default":false,"description":"When enabled, a secure url instead of public access url to the user's call recording would be posted to the Odoo activity.\n"}}}],"type":"object"}},"required":["provider","opts"]}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## List available providers

> Retrieve all of available providers.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/providers":{"get":{"tags":["Integration"],"operationId":"getCRMIntegrationAvailableProviders","summary":"List available providers","description":"Retrieve all of available providers.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"The CRM provider.   \nSuch as zoho, hubspot.\n"},"redirect_url":{"type":"string","readOnly":true,"description":"The callback URL (also known as redirect URI) In OAuth 2.0.   \nIt is the URL in your application where the authorization server redirects the user after they have granted or denied access to their data.   \nIt's crucial for security and must be pre-registered with the authorization server.\n"},"sbc_redirect_url":{"type":"string","readOnly":true,"description":"The callback URL like `redirect_url` but under SBC network topology.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Test integration

> Try to search contacts in CRM integration.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/test":{"post":{"tags":["Integration"],"operationId":"testCRMIntegration","summary":"Test integration","description":"Try to search contacts in CRM integration.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"}},"required":["number"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"first_name":{"type":"string","minLength":1,"maxLength":64,"description":"The first name of contact.\n"},"last_name":{"type":"string","minLength":1,"maxLength":64,"description":"The last name of contact.\n"},"email":{"type":"string","maxLength":128,"description":"The email of contact.\n"},"company":{"type":"string","maxLength":128,"description":"The company name of contact.\n"},"title":{"type":"string","maxLength":128,"description":"The title of contact.\n"},"did_number":{"type":"string","description":"The DID/DDI number.\n"},"business":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"},"business2":{"type":"string","maxLength":128,"description":"The secondary business phone number of contact.\n"},"mobile_phone":{"type":"string","maxLength":128,"description":"The mobile phone number of contact.\n"},"mobile_phone2":{"type":"string","maxLength":128,"description":"The secondary mobile phone number of contact.\n"},"home_phone":{"type":"string","maxLength":128,"description":"The home phone number of contact.\n"},"home_phone2":{"type":"string","maxLength":128,"description":"The secondary home phone number of contact.\n"},"other":{"type":"string","maxLength":128,"description":"The other phone number of contact.\n"},"business_fax":{"type":"string","maxLength":128,"description":"The business fax of contact.\n"},"home_fax":{"type":"string","maxLength":128,"description":"The home fax of contact.\n"},"address":{"type":"string","maxLength":128,"description":"The address.\n"},"notes":{"type":"string","maxLength":1024,"description":"The notes of contact.\n"},"type":{"type":"string","description":"The type of contact.\n"},"url":{"type":"string","description":"The access URL of contact.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List contacts

> Retrieve a collection of CRM contacts.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts":{"get":{"tags":["Integration"],"operationId":"listCRMContacts","summary":"List contacts","description":"Retrieve a collection of CRM contacts.\n","parameters":[{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"first_name":{"type":"string","minLength":1,"maxLength":64,"description":"The first name of contact.\n"},"last_name":{"type":"string","minLength":1,"maxLength":64,"description":"The last name of contact.\n"},"email":{"type":"string","maxLength":128,"description":"The email of contact.\n"},"company":{"type":"string","maxLength":128,"description":"The company name of contact.\n"},"title":{"type":"string","maxLength":128,"description":"The title of contact.\n"},"business":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"},"business2":{"type":"string","maxLength":128,"description":"The secondary business phone number of contact.\n"},"mobile_phone":{"type":"string","maxLength":128,"description":"The mobile phone number of contact.\n"},"mobile_phone2":{"type":"string","maxLength":128,"description":"The secondary mobile phone number of contact.\n"},"home_phone":{"type":"string","maxLength":128,"description":"The home phone number of contact.\n"},"home_phone2":{"type":"string","maxLength":128,"description":"The secondary home phone number of contact.\n"},"other":{"type":"string","maxLength":128,"description":"The other phone number of contact.\n"},"business_fax":{"type":"string","maxLength":128,"description":"The business fax of contact.\n"},"home_fax":{"type":"string","maxLength":128,"description":"The home fax of contact.\n"},"address":{"type":"string","maxLength":128,"description":"The address.\n"},"notes":{"type":"string","maxLength":1024,"description":"The notes of contact.\n"},"did_number":{"type":"string","description":"The DID/DDI number.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Create a contact

> Create a contact into specified CRM integration.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts":{"post":{"tags":["Integration"],"operationId":"createCRMContact","summary":"Create a contact","description":"Create a contact into specified CRM integration.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":64,"description":"The first name of contact.\n"},"last_name":{"type":"string","minLength":1,"maxLength":64,"description":"The last name of contact.\n"},"email":{"type":"string","maxLength":128,"description":"The email of contact.\n"},"company":{"type":"string","maxLength":128,"description":"The company name of contact.\n"},"title":{"type":"string","maxLength":128,"description":"The title of contact.\n"},"business":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"},"business2":{"type":"string","maxLength":128,"description":"The secondary business phone number of contact.\n"},"mobile_phone":{"type":"string","maxLength":128,"description":"The mobile phone number of contact.\n"},"mobile_phone2":{"type":"string","maxLength":128,"description":"The secondary mobile phone number of contact.\n"},"home_phone":{"type":"string","maxLength":128,"description":"The home phone number of contact.\n"},"home_phone2":{"type":"string","maxLength":128,"description":"The secondary home phone number of contact.\n"},"other":{"type":"string","maxLength":128,"description":"The other phone number of contact.\n"},"business_fax":{"type":"string","maxLength":128,"description":"The business fax of contact.\n"},"home_fax":{"type":"string","maxLength":128,"description":"The home fax of contact.\n"},"address":{"type":"string","maxLength":128,"description":"The address.\n"},"notes":{"type":"string","maxLength":1024,"description":"The notes of contact.\n"},"did_number":{"type":"string","description":"The DID/DDI number.\n"}},"required":["last_name","did_number"]}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Search contacts

> Search CRM contacts with specified conditions in CRM integration.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/search":{"post":{"tags":["Integration"],"operationId":"searchCRMContacts","summary":"Search contacts","description":"Search CRM contacts with specified conditions in CRM integration.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"}},"required":["number"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"first_name":{"type":"string","minLength":1,"maxLength":64,"description":"The first name of contact.\n"},"last_name":{"type":"string","minLength":1,"maxLength":64,"description":"The last name of contact.\n"},"email":{"type":"string","maxLength":128,"description":"The email of contact.\n"},"company":{"type":"string","maxLength":128,"description":"The company name of contact.\n"},"title":{"type":"string","maxLength":128,"description":"The title of contact.\n"},"did_number":{"type":"string","description":"The DID/DDI number.\n"},"business":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"},"business2":{"type":"string","maxLength":128,"description":"The secondary business phone number of contact.\n"},"mobile_phone":{"type":"string","maxLength":128,"description":"The mobile phone number of contact.\n"},"mobile_phone2":{"type":"string","maxLength":128,"description":"The secondary mobile phone number of contact.\n"},"home_phone":{"type":"string","maxLength":128,"description":"The home phone number of contact.\n"},"home_phone2":{"type":"string","maxLength":128,"description":"The secondary home phone number of contact.\n"},"other":{"type":"string","maxLength":128,"description":"The other phone number of contact.\n"},"business_fax":{"type":"string","maxLength":128,"description":"The business fax of contact.\n"},"home_fax":{"type":"string","maxLength":128,"description":"The home fax of contact.\n"},"address":{"type":"string","maxLength":128,"description":"The address.\n"},"notes":{"type":"string","maxLength":1024,"description":"The notes of contact.\n"},"type":{"type":"string","description":"The type of contact.\n"},"url":{"type":"string","description":"The access URL of contact.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get a CRM contact

> Retrieve CRM contact details by it's ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}":{"get":{"tags":["Integration"],"operationId":"getCRMContact","summary":"Get a CRM contact","description":"Retrieve CRM contact details by it's ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"first_name":{"type":"string","minLength":1,"maxLength":64,"description":"The first name of contact.\n"},"last_name":{"type":"string","minLength":1,"maxLength":64,"description":"The last name of contact.\n"},"email":{"type":"string","maxLength":128,"description":"The email of contact.\n"},"company":{"type":"string","maxLength":128,"description":"The company name of contact.\n"},"title":{"type":"string","maxLength":128,"description":"The title of contact.\n"},"did_number":{"type":"string","description":"The DID/DDI number.\n"},"business":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"},"business2":{"type":"string","maxLength":128,"description":"The secondary business phone number of contact.\n"},"mobile_phone":{"type":"string","maxLength":128,"description":"The mobile phone number of contact.\n"},"mobile_phone2":{"type":"string","maxLength":128,"description":"The secondary mobile phone number of contact.\n"},"home_phone":{"type":"string","maxLength":128,"description":"The home phone number of contact.\n"},"home_phone2":{"type":"string","maxLength":128,"description":"The secondary home phone number of contact.\n"},"other":{"type":"string","maxLength":128,"description":"The other phone number of contact.\n"},"business_fax":{"type":"string","maxLength":128,"description":"The business fax of contact.\n"},"home_fax":{"type":"string","maxLength":128,"description":"The home fax of contact.\n"},"address":{"type":"string","maxLength":128,"description":"The address.\n"},"notes":{"type":"string","maxLength":1024,"description":"The notes of contact.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update a CRM contact

> Update a CRM contact.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}":{"post":{"tags":["Integration"],"operationId":"updateCRMContact","summary":"Update a CRM contact","description":"Update a CRM contact.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":64,"description":"The first name of contact.\n"},"last_name":{"type":"string","minLength":1,"maxLength":64,"description":"The last name of contact.\n"},"email":{"type":"string","maxLength":128,"description":"The email of contact.\n"},"company":{"type":"string","maxLength":128,"description":"The company name of contact.\n"},"title":{"type":"string","maxLength":128,"description":"The title of contact.\n"},"did_number":{"type":"string","description":"The DID/DDI number.\n"},"business":{"type":"string","maxLength":128,"description":"The business phone number of contact.\n"},"business2":{"type":"string","maxLength":128,"description":"The secondary business phone number of contact.\n"},"mobile_phone":{"type":"string","maxLength":128,"description":"The mobile phone number of contact.\n"},"mobile_phone2":{"type":"string","maxLength":128,"description":"The secondary mobile phone number of contact.\n"},"home_phone":{"type":"string","maxLength":128,"description":"The home phone number of contact.\n"},"home_phone2":{"type":"string","maxLength":128,"description":"The secondary home phone number of contact.\n"},"other":{"type":"string","maxLength":128,"description":"The other phone number of contact.\n"},"business_fax":{"type":"string","maxLength":128,"description":"The business fax of contact.\n"},"home_fax":{"type":"string","maxLength":128,"description":"The home fax of contact.\n"},"address":{"type":"string","maxLength":128,"description":"The address.\n"},"notes":{"type":"string","maxLength":1024,"description":"The notes of contact.\n"}}}}},"required":true},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Delete a CRM contact

> Remove CRM contact by it's ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/destroy":{"post":{"tags":["Integration"],"operationId":"deleteCRMContact","summary":"Delete a CRM contact","description":"Remove CRM contact by it's ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."}],"responses":{"202":{"description":"No Content"},"4XX":{"description":"Error"}}}}}}
```

## List contact notes

> List a collection of CRM contact notes.

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/notes":{"get":{"tags":["Integration"],"operationId":"listContactNotes","summary":"List contact notes","description":"List a collection of CRM contact notes.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the CRM contact."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the resource.\n"},"title":{"type":"string","description":"The title of CRM record note.\n"},"content":{"type":"string","description":"The content of CRM record note.\n"},"created_at":{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"},"updated_at":{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Create CRM contact note

> Create CRM contact note.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/notes":{"post":{"tags":["Integration"],"operationId":"createCRMContactNote","summary":"Create CRM contact note","description":"Create CRM contact note.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"The title of CRM record note.\n"},"content":{"type":"string","description":"The content of CRM record note.\n"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":"string","description":"The unique ID of the resource.\n"}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get contact note

> Get CRM contact note.

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/notes/{note_id}":{"get":{"tags":["Integration"],"operationId":"getContactNote","summary":"Get contact note","description":"Get CRM contact note.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the CRM contact."},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the CRM note."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the resource.\n"},"title":{"type":"string","description":"The title of CRM record note.\n"},"content":{"type":"string","description":"The content of CRM record note.\n"},"created_at":{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"},"updated_at":{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update CRM contact note

> Update CRM contact note.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/notes/{note_id}":{"post":{"tags":["Integration"],"operationId":"updateCRMContactNote","summary":"Update CRM contact note","description":"Update CRM contact note.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the contact."},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the CRM note."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"The title of CRM record note.\n"},"content":{"type":"string","description":"The content of CRM record note.\n"}}}}},"required":true},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Delete CRM contact note

> Delete CRM contact note.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/notes/{note_id}/destroy":{"post":{"tags":["Integration"],"operationId":"deleteCRMContactNote","summary":"Delete CRM contact note","description":"Delete CRM contact note.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the contact."},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the CRM note."}],"responses":{"204":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## List calls

> List calls from CRM integration.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/calls":{"get":{"tags":["Integration"],"operationId":"listCRMCalls","summary":"List calls","description":"List calls from CRM integration.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."},{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"},{"name":"count","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Use the $count=true query option to include a count of entities that match the filter criteria.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CRM call.\n"},"caller":{"type":"string","maxLength":256,"description":"The caller number of the call.\n"},"caller_display_name":{"type":"string","maxLength":1024,"description":"The caller display name of the call.\n"},"callee":{"type":"string","maxLength":256,"description":"The callee number of the call.\n"},"callee_display_name":{"type":"string","maxLength":1024,"description":"The callee display name of the call.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The start time of the call.\n"},"rang_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The ringing time of the call.\n"},"answered_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The answer time of the call.\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The end time of the call.\n"},"direction":{"type":"string","enum":["INBOUND_CALL","OUTBOUND_CALL"],"description":"The direction of CDR:\n- `INBOUND_CALL`:\n- `OUTBOUND_CALL`:\n"},"duration":{"type":"integer","format":"int32","description":"The total talk time for a session (in seconds).\n"},"summary":{"type":"string","description":"The summary of CRM call.\n"},"transcription":{"type":"string","description":"The transcription of CRM call.\n"},"recording":{"type":"string","description":"The recording of CRM call.\n"}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get call

> Get call from CRM integration.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/calls/{call_id}":{"get":{"tags":["Integration"],"operationId":"getCRMCall","summary":"Get call","description":"Get call from CRM integration.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."},{"name":"call_id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CRM call.\n"},"description":"The unique ID of the CRM call."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CRM call.\n"},"caller":{"type":"string","maxLength":256,"description":"The caller number of the call.\n"},"caller_display_name":{"type":"string","maxLength":1024,"description":"The caller display name of the call.\n"},"callee":{"type":"string","maxLength":256,"description":"The callee number of the call.\n"},"callee_display_name":{"type":"string","maxLength":1024,"description":"The callee display name of the call.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The start time of the call.\n"},"rang_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The ringing time of the call.\n"},"answered_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The answer time of the call.\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The end time of the call.\n"},"direction":{"type":"string","enum":["INBOUND_CALL","OUTBOUND_CALL"],"description":"The direction of CDR:\n- `INBOUND_CALL`:\n- `OUTBOUND_CALL`:\n"},"duration":{"type":"integer","format":"int32","description":"The total talk time for a session (in seconds).\n"},"summary":{"type":"string","description":"The summary of CRM call.\n"},"transcription":{"type":"string","description":"The transcription of CRM call.\n"},"recording":{"type":"string","description":"The recording of CRM call.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update call

> Update CRM call summary.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.4"},"tags":[{"name":"Integration","description":"Manage integrations.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/crm/contacts/{id}/calls/{call_id}":{"post":{"tags":["Integration"],"operationId":"updateCRMCall","summary":"Update call","description":"Update CRM call summary.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of contact.\n"},"description":"The unique ID of the contact."},{"name":"call_id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CRM call.\n"},"description":"The unique ID of the CRM call."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","description":"The summary of CRM call.\n"}},"required":["summary"]}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```
