To create an opportunity via API, you must first obtain the funnel ID, the step (stage) ID, and the contact ID in Flow. With this information, the opportunity can be created and correctly linked within the CRM.
Step 1: List Funnels and Steps
First, you need to list all available funnels along with their respective steps.
Endpoint
GET {{host}}/api/funnels?include_steps=true
What to do with the response
- Identify the desired funnel
- Copy the funnel
id - Within that funnel, identify the correct step
- Copy the step
id
These two values will be used when creating the opportunity.
Step 2: Get the Contact ID in Flow
Next, you need to retrieve the contact ID in Flow, which will be linked to the opportunity.
Endpoint
GET {{host}}/api/contacts/?phone={{phone}}
Important notes
- The
phoneparameter must contain the contact’s phone number - The response will return the contact data
- Copy the
idfield, as this will be used as thecontactIdwhen creating the opportunity
Step 3: Create the Opportunity
With all the required information in hand (funnel, step, and contact), you can now create the opportunity.
Endpoint
POST https://api.crm.poli.digital/api/cards
Body (JSON)
{
"title": " ",
"funnelId": " ",
"funnelStepId": " ",
"status": 1,
"uniqueValue": 1,
"recurrentValue": 1,
"companyId": null,
"ticketCategoryId": 1,
"labelIds": [1],
"contactId": 12721125,
"type": 1
}
After collecting the required IDs and sending the creation request, the opportunity will be created in the selected funnel and step, already associated with the correct contact. This process is ideal for API integrations and automations.
For more details, please refer to the official Triction API documentation:
https://triction.readme.io/reference/cardsapicontroller_create










