Creating Deal from API for Custom Pipeline


I am trying to create a deal for a contact in a custom pipeline for a custom dealstage.

While dealstageid is correct and linked to the pipeline, the validation says the contrary:

{“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“05629922-fec8-42ef-b86c-b1fc1f9db4e7”,“validationResults”:[{“isValid”:false,“message”:"Dealstage (485b8338-f5b6-4855-9b0b-0ab1175c3ba5) must exist within specified pipeline (Automated).

While i have this in the response that confirms the link between the dealstage and the pipeline:
{“pipelineId”:“25eb64d3-79ba-461e-bf0f-0943b3d9ff94”,“stages”:[{“stageId”:“485b8338-f5b6-4855-9b0b-0ab1175c3ba5”,“label”:“Trial Created 1”,“probability”:0.1,“active”:true,“displayOrder”:0,“closedWon”:false}],“label”:“Automated”,“active”:true,“displayOrder”:5},

Can you help me on this.

Thank you for your time,


@sdehousse can you share with me the body of your call? You might have an issue there.


Here is my python method.
Thank you for your support
def create_deal(contact_id):
print(“create new deal”)
post_createDeal_url = “

    #Trial Created 1
    deal_property = {
    {"value": "Automated","name": "pipeline"},
    {"value": "AUTOGENERATED","name": "dealname"}

    r =, json=deal_property)

    response = json.loads(r.text)




@sdehousse If you made a call to get all the deal stages of the pipeline can you print here the results? I want to make sure you stageID to the pipeline you have actually exists in you Automated pipeline


Here you are.

{"pipelineId":"25eb64d3-79ba-461e-bf0f-0943b3d9ff94","stages":[{"stageId":"485b8338-f5b6-4855-9b0b-0ab1175c3ba5","label":"Trial Created 1","probability":0.1,"active":true,"displayOrder":0,"closedWon":false}],"label":"Automated","active":true,"displayOrder":5}


@sdehousse are you sending over the data with the header defining the content type as application/json? I have seen in the past where we have thrown errors because it cannot correctly parse the json.


Yes. As you can see my call “” uses param json which generates the header.

This code is working when i target a default pipeline and one of its dealstage.
I think the issue is related to the fact that i am targeting a “custom pipeline”.


@sdehousse Ok cool, I am a little lost as to why this giving you trouble. I have a coupe thoughts

Could you try with the pipeline ID instead of the label?

Any chance you can capture the actual call you make? You have shown me your code, which looks correct but I can’t see for sure the actual call that gets generated and made.


Here is what i am sending


Content-Length: 249
Content-Type: application/json

{“associations”: {“associatedVids”: [7228605]}, “portalId”: “437856”, “properties”: [{“name”: “dealstage”, “value”: “c38aa505-6629-4397-8f71-dc28615c2038”}, {“name”: “pipeline”, “value”: “Automated”}, {“name”: “dealname”, “value”: “AUTOGENERATED”}]}


Goodnews ! Using the pipeline id solved the issue.

Thank you for your support,


Sorry for the delayed response. I’m glad you got it figured out. Let me know if you run into anything else.


To use the actual pipeline name, use label. The value is always the ID of the property. {"name": "pipeline", "label": "Automated"}