Microsoft Dynamics 365 Sales Accounts API

Account (customer organization) records

Business capability
Customer Data Management BC-420.10

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /accounts Search and list customer accounts · Query accounts #
Ask an LLM
“How can I pull a list of all my customer accounts from Dynamics 365 Sales?”
“Can I filter accounts by city or country and sort them by revenue?”
Tell an agent
List accounts matching {filter}, sorted by {orderby}.
Show the top {top} accounts with only the fields {select}.
POST /accounts Create a new customer account · Create an account #
Ask an LLM
“How do I add a new company account to my CRM?”
“Can I link a new account to an existing contact as its primary contact when creating it?”
Tell an agent
Create a new account named {name} with website {websiteurl}.
Add a new account {name} located in {city}, {country}.
GET /accounts({accountid}) Look up a single account by ID · Get an account #
Ask an LLM
“How do I fetch the full details of one specific account?”
“Can I retrieve just a few fields of an account record by its ID?”
Tell an agent
Get account {accountid}.
Show fields {select} for account {accountid}.
PATCH /accounts({accountid}) Update an existing account · Update an account #
Ask an LLM
“How do I change the phone number or address on an existing account?”
“Can I put an existing account on credit hold?”
Tell an agent
Update account {accountid} to have phone number {telephone1}.
Set credit hold to {creditonhold} on account {accountid}.
DELETE /accounts({accountid}) Delete an account · Delete an account #
Ask an LLM
“How do I permanently remove an account from the CRM?”
“Is there a way to delete a duplicate account record?”
Tell an agent destructive · confirm first
Delete account {accountid}.
Remove the duplicate account {accountid} from Dynamics.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-dynamics-365-sales:microsoft-dynamics-365-sales-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-dynamics-365-sales-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Dataverse Web API (Dynamics 365 Sales) Accounts…
  description: 'OData v4 RESTful Web API for Microsoft Dataverse, the platform behind

    Dynamics 365 Sales. Used to create, read, update, and delete Dynamics

    365 Sales records (accounts, contacts, leads, opportunities, quotes,

    orders, invoices, products, tasks) and to invoke bound and unbound

    actions and functions. Authentication uses OAuth 2.0 bearer tokens

    issued by Microsoft Entra ID; the endpoint is per-environment, for

    example https://{org}.api.crm.dynamics.com/api/data/v9.2/.'
  version: v9.2
  contact:
    name: Kin Lane
    email: kin@apievangelist.com
  license:
    name: Microsoft Terms of Use
    url: https://www.microsoft.com/en-us/legal/terms-of-use
servers:
- url: https://{org}.api.crm.dynamics.com/api/data/v9.2
  description: Dataverse environment endpoint
  variables:
    org:
      default: contoso
      description: Dataverse organization (environment) prefix
security:
- oauth2: []
tags:
- name: Accounts
  description: Account (customer organization) records
paths:
  /accounts:
    get:
      tags:
      - Accounts
      summary: Query accounts
      operationId: accounts_list
      parameters:
      - $ref: '#/components/parameters/select'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/expand'
      - $ref: '#/components/parameters/orderby'
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/odataMaxVersion'
      - $ref: '#/components/parameters/odataVersion'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountCollection'
    post:
      tags:
      - Accounts
      summary: Create an account
      operationId: accounts_create
      parameters:
      - $ref: '#/components/parameters/odataMaxVersion'
      - $ref: '#/components/parameters/odataVersion'
      - $ref: '#/components/parameters/prefer'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Account'
      responses:
        '204':
          description: No Content (with OData-EntityId header)
        '201':
          description: Created (with return=representation Prefer header)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
  /accounts({accountid}):
    get:
      tags:
      - Accounts
      summary: Get an account
      operationId: accounts_get
      parameters:
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/select'
      - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
    patch:
      tags:
      - Accounts
      summary: Update an account
      operationId: accounts_update
      parameters:
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/ifMatch'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Account'
      responses:
        '204':
          description: No Content
    delete:
      tags:
      - Accounts
      summary: Delete an account
      operationId: accounts_delete
      parameters:
      - $ref: '#/components/parameters/accountId'
      responses:
        '204':
          description: No Content
components:
  parameters:
    accountId:
      name: accountid
      in: path
      required: true
      schema:
        type: string
        format: uuid
    orderby:
      name: $orderby
      in: query
      schema:
        type: string
    odataVersion:
      name: OData-Version
      in: header
      schema:
        type: string
        default: '4.0'
    expand:
      name: $expand
      in: query
      schema:
        type: string
    select:
      name: $select
      in: query
      schema:
        type: string
    filter:
      name: $filter
      in: query
      schema:
        type: string
    top:
      name: $top
      in: query
      schema:
        type: integer
    ifMatch:
      name: If-Match
      in: header
      schema:
        type: string
    odataMaxVersion:
      name: OData-MaxVersion
      in: header
      schema:
        type: string
        default: '4.0'
    prefer:
      name: Prefer
      in: header
      description: Set to "return=representation" to receive the created record in the response
      schema:
        type: string
  schemas:
    AccountCollection:
      type: object
      properties:
        '@odata.context':
          type: string
        value:
          type: array
          items:
            $ref: '#/components/schemas/Account'
        '@odata.nextLink':
          type: string
    Account:
      type: object
      properties:
        accountid:
          type: string
          format: uuid
        name:
          type: string
        accountnumber:
          type: string
        accountcategorycode:
          type: integer
        creditonhold:
          type: boolean
        revenue:
          type: number
          format: double
        description:
          type: string
        address1_line1:
          type: string
        address1_city:
          type: string
        address1_country:
          type: string
        address1_latitude:
          type: number
          format: double
        telephone1:
          type: string
        emailaddress1:
          type: string
        websiteurl:
          type: string
        primarycontactid@odata.bind:
          type: string
          description: Associate to existing contact via /contacts(guid)
        createdon:
          type: string
          format: date-time
        modifiedon:
          type: string
          format: date-time
  securitySchemes:
    oauth2:
      type: oauth2
      description: Microsoft Entra ID OAuth 2.0 bearer token
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://{org}.api.crm.dynamics.com/.default: Dataverse environment access
        clientCredentials:
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://{org}.api.crm.dynamics.com/.default: Service-to-service access