
Quick Answer
A 400 status code or a "reason phrase must not contain new-line characters" error from POST /api/v2/assignments/CreateAssignment, in an integration that previously worked, has been reported as linked to a change in the request payload's ContentAssignments object - confirm your payload structure against your own live Swagger/OpenAPI reference before changing your integration.
What This Article Helps With
This article is for technical/IT contacts whose integration calls POST /api/v2/assignments/CreateAssignment and has started returning errors, including on an integration that previously functioned correctly.
Symptoms
Calls to POST /api/v2/assignments/CreateAssignment return a 400 status code, sometimes with an error message stating "The reason phrase must not contain new-line characters." This typically appears on an integration that was previously functioning correctly.
Cause
The POST /api/v2/assignments/CreateAssignment endpoint itself is confirmed to exist in the Platform API. A reported cause of this specific error is a change to the required request payload structure following a product release — specifically, within the ContentAssignments object. Available documentation does not independently confirm the exact current request schema for this endpoint; confirm it against your own live Swagger/OpenAPI reference before relying on the payload structure described below.
Resolution
One reported fix for this error is updating the ContentAssignments object in your request payload as follows:
- Replace the ContentIds array (an array of strings) with a ContentIdsAndOrder array (an array of objects).
- Within each object in the ContentIdsAndOrder array, include a ContentId field for the content identifier.
- Optionally, include an Order field within the same object.
- Confirm there are no blank lines or embedded line breaks in your payload, particularly before the DueDate field or within an EmailTemplate Body value — these have been reported as contributing to the "reason phrase" error specifically.
For example, a payload using the reported older format:
{
"ContentAssignments": [
{
"AssigneeId": "string",
"AssignorIds": ["string"],
"ContentIds": ["string"]
}
],
"EmailTemplate": { "Subject": "string", "Body": "string" },
"DueDate": "YYYY-MM-DDTHH:MM:SS.SSSZ"
}
would become, in the reported updated format:
{
"ContentAssignments": [
{
"AssigneeId": "string",
"AssignorIds": ["string"],
"ContentIdsAndOrder": [
{ "ContentId": "string", "Order": 0 }
]
}
],
"EmailTemplate": { "Subject": "string", "Body": "string" },
"DueDate": "YYYY-MM-DDTHH:MM:SS.SSSZ"
}
These examples illustrate the reported change; confirm the exact field names and structure against your own live Swagger/OpenAPI reference for your tenant before updating a production integration.
After updating your payload, resend the POST /api/v2/assignments/CreateAssignment request and confirm it returns a successful response rather than a 400 status code, and that the assignment appears as expected in Pinnacle Series.
Helpful Tips
- Test payload changes against a non-production tenant, or with an API development tool such as Postman, before updating a live integration.
- If the error persists after confirming your payload against the live schema, log a support ticket with your request payload and the exact error response.