A response with this status code indicates the request was malformed or conflicts with an existing record.

For example, here's the response you'd receive when attempting to create an appointment via the API without providing the required parameters:

{
    "title": [
        "This field is required."
    ],
    "duration": [
        "This field is required."
    ],
    "type": [
        "This field is required."
    ],
    "division": [
        "This field is required."
    ],
    "participants": [
        "This field is required."
    ]
}

Here's the response you'd receive when attempting to create a roster contact with an email that already exists in OnCall:

[
    "Contact already exists."
]

Solution

Ensure all required parameters are being passed along with your request properly. If the response indicates the existence of a conflicting record, see if the endpoint you're using accepts PATCH calls. If it does, you can make a call to update the existing record as needed.