> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Dynamics 365 integration settings

> Change the default owner, queue, and priority of tickets created in Dynamics 365.



## OpenAPI

````yaml patch /integrations/dynamics365/settings
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /integrations/dynamics365/settings:
    patch:
      summary: Update Dynamics 365 integration settings
      description: >-
        Partially update the defaults applied to tickets created in Dynamics
        365. Omitted fields keep their value; credentials cannot be changed
        here. 404 when Dynamics 365 is not connected.
      operationId: updateDynamics365Settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                default_owner_id:
                  description: null clears it
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                default_queue_id:
                  description: null clears it
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                default_priority:
                  description: null clears it
                  anyOf:
                    - type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    - type: 'null'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  connected:
                    type: boolean
                  settings:
                    anyOf:
                      - type: object
                        properties:
                          tenant_id:
                            type: string
                            description: Azure AD tenant ID
                          client_id:
                            type: string
                            description: Azure AD application (client) ID
                          environment_url:
                            type: string
                            description: Dynamics 365 environment URL
                          default_owner_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: >-
                              Dynamics 365 user (systemuser) ID that owns
                              tickets created from sessions
                          default_queue_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: Dynamics 365 queue ID new tickets are routed to
                          default_priority:
                            anyOf:
                              - type: number
                              - type: 'null'
                            description: Priority code set on new tickets
                        required:
                          - tenant_id
                          - client_id
                          - environment_url
                          - default_owner_id
                          - default_queue_id
                          - default_priority
                        additionalProperties: false
                      - type: 'null'
                required:
                  - connected
                  - settings
                additionalProperties: false
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.