Bitrix24 Community

Support » Forum » Yaman Tarakji
Select date in calendarSelect date in calendar

Pages: 1
How to use webhook to add lead in my bitrix, can't input data using the webhook
[QUOTE]DJ Gillespie wrote:
@Yaman,

I'm getting the above error with that input, as well. I tried swapping out TITLE with "LEAD_NAME" with the same results.

For my test, a post request was going to this URL

[URL=https://tbn.bitrix24.com/rest/18/xxxxxxxxx/]https://tbn.bitrix24.com/rest/18/xxxxxxxxx/[/URL] crm.lead.add

With the following body:

{"fields":{"TITLE":"my test","NAME":"tester","EMAIL":[{"VALUE":" [URL=mailto:name@email.com]name@email.com[/URL] ","VALUE_TYPE":"WORK"}],"ADDRESS_COUNTRY":"SA","ADDRESS_CITY":"","PHONE":[{"VALUE":"18582445555","VALUE_TYPE":"WORK"}],"ASSIGNED_BY_ID":"18","CURRENCY_ID":"SAR","SOURCE_ID":"WEB","STATUS_ID":"UNASSIGNED","COMMENTS":"uu"},"params":{"REGISTER_SONET_EVENT":"y"}}[/QUOTE]
Hi there after talking with technical support at helpdesk.bitrix24.com
they helped me and this is a working example:
[CODE]fields[TITLE]=Valve Co.&fields[NAME]=Gabe Newell&fields[EMAIL][0][VALUE]=gabe@valve.com&fields[EMAIL][0][VALUE_TYPE]=WORK&fields[ADDRESS_COUNTRY]="USA"&fields[ADDRESS_CITY]="Seattle"&fields[PHONE][0][VALUE]=0530447351&fields[PHONE][0[VALUE_TYPE]=WORK&fields[ASSIGNED_BY_ID]=1&fields[CURRENCY_ID]=SAR&fields[UTM_SOURCE]=adward&fields[UTM_CAMPAIGN]=test&fields[UTM_CONTENT]=default&fields[SOURCE_ID]=WEB&fields[STATUS_ID]=ASSIGNED&fields[COMMENTS]=CEO[/CODE]must be single line..
Edited: Yaman Tarakji - 04/05/2017 09:49:34
How to use webhook to add lead in my bitrix, can't input data using the webhook
[QUOTE]DJ Gillespie wrote:
@Yaman,

I'm getting the above error with that input, as well. I tried swapping out TITLE with "LEAD_NAME" with the same results.

For my test, a post request was going to this URL

[URL=https://tbn.bitrix24.com/rest/18/xxxxxxxxx/]https://tbn.bitrix24.com/rest/18/xxxxxxxxx/[/URL] crm.lead.add

With the following body:

{"fields":{"TITLE":"my test","NAME":"tester","EMAIL":[{"VALUE":" [URL=mailto:name@email.com]name@email.com[/URL] ","VALUE_TYPE":"WORK"}],"ADDRESS_COUNTRY":"SA","ADDRESS_CITY":"","PHONE":[{"VALUE":"18582445555","VALUE_TYPE":"WORK"}],"ASSIGNED_BY_ID":"18","CURRENCY_ID":"SAR","SOURCE_ID":"WEB","STATUS_ID":"UNASSIGNED","COMMENTS":"uu"},"params":{"REGISTER_SONET_EVENT":"y"}}[/QUOTE]
yes you're right I tried this and it's not working anymore, I swear it worked for me the other day,,, weird
How to use webhook to add lead in my bitrix, can't input data using the webhook
[QUOTE]Yana Prokopets wrote:
Hi!

Please contact our  [URL=https://helpdesk.bitrix24.com/ticket.php]Helpdesk[/URL] . Thank you.

Best,

Yana.[/QUOTE]
I did yesterday
no answer
ticket id = 1412647
How to use webhook to add lead in my bitrix, can't input data using the webhook

If you put this in any REST Tester, it should work

[URL=https://your.bitrix24.com/rest/1/xxxxxxxxxxxxxxxxxx/crm.lead.add]https://your.bitrix24.com/rest/1/xxxxxxxxxxxxxxxxxx/crm.lead.add[/URL]

{"fields":{"TITLE":"my test","NAME":"tester","EMAIL":[{"VALUE":"[URL=mailto:name@email.com]name@email.com[/URL]","VALUE_TYPE":"WORK"}],"ADDRESS_COUNTRY":"SA","ADDRESS_CITY":"","PHONE":[{"VALUE":"18582445555","VALUE_TYPE":"WORK"}],"ASSIGNED_BY_ID":"10","CURRENCY_ID":"SAR","UTM_SOURCE":"adward","UTM_CAMPAIGN":"test","UTM_CONTENT":"default","SOURCE_ID":"WEB","STATUS_ID":"ASSIGNED","COMMENTS":"uu"},"params":{"REGISTER_SONET_EVENT":"y"}}

Edited: Yaman Tarakji - 03/07/2017 10:11:03
How to use webhook to add lead in my bitrix, can't input data using the webhook
I've created an Inbound webhook that has access to crm and if I use it in a GET request and use the crm.lead.list method I get results
however I tried and tried to use the crm.lead.add method but couldn't get it to work it always says "{"error":"","error_description":"The required field \u0027Lead name\u0027 is missing.\u003Cbr \/\u003E"}"
can someone please show me how to do this
my main goal is to insert data from my mysql database using php, I jsut need to figure out how to use the bitrix24 webhook
[URL=https://fennecfox.bitrix24.com/rest/1/6]https://fennecfox.bitrix24.com/rest/1/6[/URL]randomeky/crm.lead.add?name=myname
Edited: Yaman Tarakji - 01/18/2017 19:02:30
Pages: 1
2,000,000+
organizations
are already using Bitrix24