Specify custom id when creating new deal stage

Hello,

I want to create new stages for a Deals pipeline, in the past we’ve managed to specifiy custom internal ids ourselves to make it easier to integrate Hubspot API and benefit from having the same value across different accounts (in our case different environments).

I’ve found the following post
https://community.hubspot.com/t5/APIs-Integrations/Setting-A-Custom-Stage-Id/m-p/460145#M45089

Is it still possible ? I can’t find how to do it using v3 crm api.

Ok so if someone has the same issue, I’ve managed to reach my goal using the v1 api

headers = {
 "Accept": "application/json",
 "Authorization": f"Bearer {access_token}",
 "Content-type": "application/json",
}
pipeline_id = "xxx"
url = f"https://api.hubapi.com/crm-pipelines/v1/pipelines/deals/{pipeline_id}}"
response = requests.get(url, headers=headers)

pipeline = json.loads(response.content)
pipeline["stages"].append({
 "stageId": "TEST_UNDER_CONTRACT",
 "label": "Test Under Contract",
 "displayOrder": len(pipeline["stages"]) + 1,
 "metadata": {
 "probability": 0.5,
 },
 "active": True
})

response = requests.put(
 url,
 data=json.dumps(pipeline),
 headers=headers
)

print(response.content)