• Amogh Raghuram
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I am trying to create a new Lead but when I try out the API it returns 200 with describeObject instead of creating a lead and returning the ID

curl --location 'https://name-dev-ed.develop.lightning.force.com/services/data/v59.0/sobjects/Lead/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 00D5j00000DQ7Ba!AQgAQCIlBNxXsEyXIIsPNurfHWMq99TqQqtSvGOWm3JToc__idfks8WjMctEdoSHCzE1ZokJpO5whehqwc_' \
--header 'Cookie: BrowserId=ukmN3mQ5Ee6AQgllZPMmgw; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1' \
--data-raw '{
    "attributes": {
        "type": "Lead"
    },
    "Salutation": "Mr.",
    "FirstName": "Anon",
    "LastName": "Anon_lastname",
    "Email": "anon@gmail.com,
    "Phone": "1234",
    "Company": "CompanyA",
    "Title": "Engineer"
}
'
I am trying to create a new Lead but when I try out the API it returns 200 with describeObject instead of creating a lead and returning the ID

curl --location 'https://name-dev-ed.develop.lightning.force.com/services/data/v59.0/sobjects/Lead/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 00D5j00000DQ7Ba!AQgAQCIlBNxXsEyXIIsPNurfHWMq99TqQqtSvGOWm3JToc__idfks8WjMctEdoSHCzE1ZokJpO5whehqwc_' \
--header 'Cookie: BrowserId=ukmN3mQ5Ee6AQgllZPMmgw; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1' \
--data-raw '{
    "attributes": {
        "type": "Lead"
    },
    "Salutation": "Mr.",
    "FirstName": "Anon",
    "LastName": "Anon_lastname",
    "Email": "anon@gmail.com,
    "Phone": "1234",
    "Company": "CompanyA",
    "Title": "Engineer"
}
'