Skip to main content
Solved

Create Email Activity on Opportunity via REST API email endpoint

  • July 14, 2026
  • 3 replies
  • 19 views

I am getting a 406 Not Acceptable Error when trying to POST to {AcumaticURL}/24.200.001/Email endpoint.  

My Payload is:

{
"Subject": { "value": "Draft Email for Opportunity"},
"Body": {"value": "This is the body of the draft email."},
"MailStatus": { "value": "Draft" },
"ClassID": { "value": "Email" },
"IsIncoming": { "value": false },
"RelatedEntityNoteID": { "value": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" },
"To": { "value": "recipient@somecompany.com" },
"From": { "value": "sender@mycompany.com" },
}

I have tried “NoteID”, “RelatedEntitiyNoteID” with the Note ID of the Opportunity, that I get from a GET 

I am out of ideas, good ole google hasn’t help either.   Any guidance would be helpful.   I also tried using the \activity endpoint as well, same 406. 

Headers have Content-Type:  application/json & Accept:  application/json

Any help would be appreciated.

Best answer by jinin

Hi ​@SethB ,

Could you please try the steps below and check if it helps?

  1. Make a GET call to retrieve the Opportunity's NoteID.

              GET /entity/Default/24.200.001/Opportunity/{OpportunityID}

  1. Use that NoteID as the RelatedEntityNoteID in your Activity request.
  2. Set the RelatedEntityType to:

            "RelatedEntityType": {
             "value": "PX.Objects.CR.CROpportunity"
            }

  1. Ensure RelatedEntityDescription matches the Opportunity (optional but recommended).
    If you're receiving a 406 Not Acceptable, it's likely not because you're linking to an Opportunity. Since the same pattern works for Sales Orders, I'd verify:
  • The GET returns a valid Opportunity NoteID.
  •  RelatedEntityType is PX.Objects.CR.CROpportunity.
  •  You're using the Activity endpoint (or Email Activity endpoint if applicable) with the correct entity version.
  •  Required fields (Type, Status, Summary/Subject, etc.) are valid for the Activity type being created.

Sample:
url: /entity/Default/24.200.001/Activity
Method: Put
Request:
{
  "Subject": {
    "value": "Draft Email for Opportunity"
  },
  "Body": {
    "value": "This is the body of the draft email."
  },
  "MailStatus": {
    "value": "Draft"
  },
  "ClassID": {
    "value": "Email"
  },
  "IsIncoming": {
    "value": false
  },
  "RelatedEntityDescription": {
    "value": "OPPR000123"
  },
  "RelatedEntityNoteID": {
    "value": "02686d2e-7f68-f111-bb12-0e2c1f509de5"
  },
  "RelatedEntityType": {
    "value": "PX.Objects.CR.CROpportunity"
  },
  "To": {
    "value": "recipient@somecompany.com"
  },
  "From": {
    "value": "sender@mycompany.com"
  }
}

3 replies

jinin
Pro I
Forum|alt.badge.img+12
  • Pro I
  • Answer
  • July 14, 2026

Hi ​@SethB ,

Could you please try the steps below and check if it helps?

  1. Make a GET call to retrieve the Opportunity's NoteID.

              GET /entity/Default/24.200.001/Opportunity/{OpportunityID}

  1. Use that NoteID as the RelatedEntityNoteID in your Activity request.
  2. Set the RelatedEntityType to:

            "RelatedEntityType": {
             "value": "PX.Objects.CR.CROpportunity"
            }

  1. Ensure RelatedEntityDescription matches the Opportunity (optional but recommended).
    If you're receiving a 406 Not Acceptable, it's likely not because you're linking to an Opportunity. Since the same pattern works for Sales Orders, I'd verify:
  • The GET returns a valid Opportunity NoteID.
  •  RelatedEntityType is PX.Objects.CR.CROpportunity.
  •  You're using the Activity endpoint (or Email Activity endpoint if applicable) with the correct entity version.
  •  Required fields (Type, Status, Summary/Subject, etc.) are valid for the Activity type being created.

Sample:
url: /entity/Default/24.200.001/Activity
Method: Put
Request:
{
  "Subject": {
    "value": "Draft Email for Opportunity"
  },
  "Body": {
    "value": "This is the body of the draft email."
  },
  "MailStatus": {
    "value": "Draft"
  },
  "ClassID": {
    "value": "Email"
  },
  "IsIncoming": {
    "value": false
  },
  "RelatedEntityDescription": {
    "value": "OPPR000123"
  },
  "RelatedEntityNoteID": {
    "value": "02686d2e-7f68-f111-bb12-0e2c1f509de5"
  },
  "RelatedEntityType": {
    "value": "PX.Objects.CR.CROpportunity"
  },
  "To": {
    "value": "recipient@somecompany.com"
  },
  "From": {
    "value": "sender@mycompany.com"
  }
}


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7

@SethB  It should be PUT, not POST


  • Author
  • Freshman II
  • July 14, 2026

@Dmitrii Naumov I had tried both, but the 406 was because it could not location the record with the RelatedEntityNoteID alone, as soon as I added the RelatedEntityDescription & RelatedEntityType it PUT w/ 200 OK to /email, if you post to /activity it looks like you need a “Summary” { “value”: “Something”}.  

@jinin Thank You, very much appreciated.   Seems for me I had to use /email vs /activity for an email type activity, the system threw and error when I tried /activity with Type “AE”  which is my Email type for my system.