Microsoft Dynamics 365 Leads API

The Leads API from Microsoft Dynamics 365 — 2 operation(s) for leads.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Opportunity & Pipeline Management BC-410.30

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 /leads List leads · Microsoft Dynamics List leads #
Ask an LLM
“Which leads have I captured so far?”
“Can I filter leads by source or estimated value?”
Tell an agent
List all my leads.
Show leads matching {filter}.
POST /leads Create a lead · Microsoft Dynamics Create a lead #
Ask an LLM
“How do I add a new lead from a web form?”
“Can I set a lead's source code and estimated close date when I create it?”
Tell an agent
Create a lead named {subject} from {companyname}.
Add a lead {firstname} {lastname} with email {emailaddress1}.
GET /leads({leadid}) Get a lead · Microsoft Dynamics Get a lead #
Ask an LLM
“What is the status of one lead?”
“Can I look up a lead by its ID?”
Tell an agent
Get lead {leadid}.
Show the status of lead {leadid}.
PATCH /leads({leadid}) Update a lead · Microsoft Dynamics Update a lead #
Ask an LLM
“How do I change a lead's status after a call?”
“Can I update a lead's estimated close date?”
Tell an agent
Set lead {leadid} status to {statecode}.
Update lead {leadid} with estimated close date {estimatedclosedate}.
DELETE /leads({leadid}) Delete a lead · Microsoft Dynamics Delete a lead #
Ask an LLM
“How do I remove a lead I captured by mistake?”
“Can I delete a lead record entirely?”
Tell an agent destructive · confirm first
Delete lead {leadid}.
Remove the lead record {leadid}.

Documentation

Specifications

Schemas & Data

Other Resources

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:microsoft-dynamics-365-leads-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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-leads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Dynamics 365 Dataverse Web Leads API
  description: The Microsoft Dynamics 365 Dataverse Web API provides a RESTful endpoint for interacting with Dataverse data used by Dynamics 365 Sales, Customer Service, Field Service, and other customer engagement applications. It implements OData v4 and supports CRUD operations on core CRM entities including accounts, contacts, leads, and opportunities. Authentication is handled via Microsoft Entra ID (Azure AD).
  version: '9.2'
  contact:
    name: Microsoft
    url: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview
  license:
    name: Microsoft APIs Terms of Use
    url: https://learn.microsoft.com/en-us/legal/microsoft-apis/terms-of-use
servers:
- url: https://{organization}.api.crm.dynamics.com/api/data/v9.2
  description: Dynamics 365 Online (North America)
  variables:
    organization:
      default: org
      description: The unique name of your Dataverse organization.
- url: https://{baseUrl}/api/data/v9.2
  description: Dynamics 365 On-Premises
  variables:
    baseUrl:
      default: localhost
security:
- oauth2: []
tags:
- name: Leads
paths:
  /leads:
    get:
      summary: Microsoft Dynamics List leads
      description: Retrieves a collection of lead records.
      operationId: listLeads
      tags:
      - Leads
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/select'
      - $ref: '#/components/parameters/orderby'
      - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A collection of leads.
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/Lead'
    post:
      summary: Microsoft Dynamics Create a lead
      description: Creates a new lead record.
      operationId: createLead
      tags:
      - Leads
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lead'
      responses:
        '204':
          description: Lead created successfully.
          headers:
            OData-EntityId:
              description: URI of the created record.
              schema:
                type: string
  /leads({leadid}):
    get:
      summary: Microsoft Dynamics Get a lead
      description: Retrieves a single lead by ID.
      operationId: getLead
      tags:
      - Leads
      parameters:
      - name: leadid
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/select'
      - $ref: '#/components/parameters/expand'
      responses:
        '200':
          description: A lead record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
    patch:
      summary: Microsoft Dynamics Update a lead
      description: Updates an existing lead record.
      operationId: updateLead
      tags:
      - Leads
      parameters:
      - name: leadid
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/ifMatch'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lead'
      responses:
        '204':
          description: Lead updated successfully.
    delete:
      summary: Microsoft Dynamics Delete a lead
      description: Deletes a lead record.
      operationId: deleteLead
      tags:
      - Leads
      parameters:
      - name: leadid
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Lead deleted successfully.
components:
  parameters:
    top:
      name: $top
      in: query
      description: Maximum number of records to return.
      schema:
        type: integer
    orderby:
      name: $orderby
      in: query
      description: Comma-separated list of properties to sort by.
      schema:
        type: string
    skip:
      name: $skip
      in: query
      description: Number of records to skip.
      schema:
        type: integer
    ifMatch:
      name: If-Match
      in: header
      description: ETag value for optimistic concurrency.
      schema:
        type: string
    expand:
      name: $expand
      in: query
      description: Related entities to expand inline.
      schema:
        type: string
    select:
      name: $select
      in: query
      description: Comma-separated list of properties to include.
      schema:
        type: string
    filter:
      name: $filter
      in: query
      description: OData filter expression.
      schema:
        type: string
  schemas:
    Lead:
      type: object
      properties:
        leadid:
          type: string
          format: uuid
          readOnly: true
        subject:
          type: string
        firstname:
          type: string
        lastname:
          type: string
        fullname:
          type: string
          readOnly: true
        companyname:
          type: string
        jobtitle:
          type: string
        emailaddress1:
          type: string
        telephone1:
          type: string
        address1_line1:
          type: string
        address1_city:
          type: string
        address1_stateorprovince:
          type: string
        address1_postalcode:
          type: string
        address1_country:
          type: string
        leadsourcecode:
          type: integer
        estimatedvalue:
          type: number
          format: decimal
        estimatedclosedate:
          type: string
          format: date
        statecode:
          type: integer
          description: 0 = Open, 1 = Qualified, 2 = Disqualified
        statuscode:
          type: integer
        createdon:
          type: string
          format: date-time
          readOnly: true
        modifiedon:
          type: string
          format: date-time
          readOnly: true
  securitySchemes:
    oauth2:
      type: oauth2
      description: Microsoft Entra ID (Azure AD) OAuth 2.0 authentication.
      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.crm.dynamics.com/.default: Access Dataverse API