Create Deal
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/crm/deals \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "<string>",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency": "<string>",
"expected_close_date": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_ids": [
"<string>"
],
"custom_fields": {},
"lost_reason": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/crm/deals"
payload = {
"title": "<string>",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency": "<string>",
"expected_close_date": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_ids": ["<string>"],
"custom_fields": {},
"lost_reason": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>',
currency: '<string>',
expected_close_date: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
organization_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact_ids: ['<string>'],
custom_fields: {},
lost_reason: '<string>',
pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/crm/deals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}CRM
Create Deal
Create a deal, by default in the first open stage of the default pipeline.
POST
/
api
/
v1
/
crm
/
deals
Create Deal
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/crm/deals \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "<string>",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency": "<string>",
"expected_close_date": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_ids": [
"<string>"
],
"custom_fields": {},
"lost_reason": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/crm/deals"
payload = {
"title": "<string>",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>",
"currency": "<string>",
"expected_close_date": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_ids": ["<string>"],
"custom_fields": {},
"lost_reason": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: '<string>',
currency: '<string>',
expected_close_date: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
organization_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact_ids: ['<string>'],
custom_fields: {},
lost_reason: '<string>',
pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/crm/deals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}Authorizations
Body
application/json
ISO 4217 code, e.g. EUR
YYYY-MM-DD
Replaces the deal's contacts
Defaults to the default pipeline
Response
201 - application/json
Created
The response is of type Response · object.
