Engati - User Guide
Engati APIs
7 min
introduction introduction engati apis allow you to integrate with the platform and create useful functionality around the platform the apis are rest based using json as the standard response type headers api keys need to be added to the authorization header as follows – authorization basic \<authorization key> the api keys can be generated by going to https //agents engati ai/admin/integrations/platform api section engati apis follow basic authentication utilizing api keys to authenticate the api calls the api keys can be revoked or regenerated at any point in time and would throw authentication errors for the api calls made using them { "tab" "examples", "url" "https //api engati ai", "name" "engati apis", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "keltcmns8tbz5b30bmdy ", "code" "{\n \\"responseobject\\" true\n}", "language" "200", "customlabel" "" }, { "id" "aw tt2mo1dwcgf 4c9xwp", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }", "language" "404", "customlabel" "" } ], "selectedlanguageid" "keltcmns8tbz5b30bmdy " }, "examples" { "languages" \[ { "id" "s6zzpicp khm klwsha4f", "language" "curl", "code" "curl location request get 'https //api engati ai/bot api/v1 0/customer/61179/bot/bb67e0773bed4c7e/users?attribute name=opt1\&attribute value=yes' \\\\\n header 'authorization basic 2082e8f4 0011 479b 9edb 74293c62d91b gkouziq' \\\\\n header 'content type application/json' \\\\\n data raw ''", "customlabel" "users" }, { "id" "atvkd tpyg doqfof92bz", "language" "curl", "code" "curl location request get 'https //api engati ai/bot api/v1 0/customer/61179/bot/bb67e0773bed4c7e/channel user/919565428256/conversations' \\\\\n header 'authorization basic 2082e8f4 0011 479b 9edb 74293c62d91b gkouziq' \\\\\n header 'content type application/json' \\\\\n data raw ''", "customlabel" "conversation history" }, { "id" "ybcwzhfmluyxoadhw1ap ", "language" "curl", "code" "curl location request post 'https //api engati ai/whatsapp api/v1 0/customer/49373/bot/f5afdd1c000742f0/template' \\\\\n header 'authorization basic 1b051089 77b5 4a97 ad8e f3186a6a7532 fqxcfmw' \\\\\n header 'content type application/json' \\\\\n data raw '{\n \\"phonenumber\\" \\"+919019486731\\",\n \\"payload\\" {\n \\"components\\" \[\n {\n \\"type\\" \\"header\\",\n \\"parameters\\" \[\n {\n \\"type\\" \\"document\\",\n \\"document\\" {\n \\"filename\\" \\"uribapplicationform 82121086 pdf\\",\n \\"link\\" \\"https //s3 ap south 1 amazonaws com/file upload public/prod/61179/broadcast template attachment/75549 uribapplicationform 82121086 pdf\\"\n }\n }\n ]\n },\n {\n \\"type\\" \\"body\\",\n \\"parameters\\" \[\n {\n \\"type\\" \\"text\\",\n \\"text\\" \\"john\\"\n },{\n \\"type\\" \\"text\\",\n \\"text\\" \\"john\\"\n },{\n \\"type\\" \\"text\\",\n \\"text\\" \\"john\\"\n }\n ]\n },\n {\n \\"index\\" 0,\n \\"parameters\\" \[\n {\n \\"payload\\" \\"flow 7bbb608c3b4b4e848f36cd2ccd7cfa35||data personx response=declined invoice no 12345\\",\n \\"type\\" \\"payload\\"\n }\n ],\n \\"sub type\\" \\"quick reply\\",\n \\"type\\" \\"button\\"\n },\n {\n \\"index\\" 1,\n \\"parameters\\" \[\n {\n \\"payload\\" \\"flow e30d44bcca4c49d49976d3ac0416c405||data personx response=approved invoice no 12345\\",\n \\"type\\" \\"payload\\"\n }\n ],\n \\"sub type\\" \\"quick reply\\",\n \\"type\\" \\"button\\"\n }\n ],\n \\"namespace\\" \\"980c3243 2d2a 4d2d a572 b2a50552cb04\\",\n \\"name\\" \\"renuka sugars paytest\\",\n \\"language\\" {\n \\"policy\\" \\"deterministic\\",\n \\"code\\" \\"en\\"\n }\n }\n}\n}'", "customlabel" "whatsapp broadcast" }, { "id" "snotmb7v7mba2uurq2m10", "language" "json", "code" "curl location request post 'https //api engati ai/bot api/v1 0/customer/61179/bot/bb67e0773bed4c7e/broadcast' \\\\\n header 'authorization basic 2082e8f4 0011 479b 9edb 74293c62d91b gkouziq' \\\\\n header 'content type application/json' \\\\\n data raw '{\n\\"broadcastid\\" null,\n\\"broadcasttitle\\" \\"testing broadcast\\",\n\\"publishedon\\" \\"2019 06 03t06 48 27 170z\\",\n\\"audience\\" {\n\\"rule\\" {\n\\"channels\\" \[\\"whatsapp\\"],\n\\"channeluserids\\" \[\\"919019486731\\"]\n}\n},\n\\"payload\\" {\n\\"type\\" \\"direct\\",\n\\"content\\" \[\n{\n\\"type\\" \\"text\\",\n\\"data\\" {\n\\"message\\" \\"this is a test message\\"\n}\n},\n{\n\\"type\\" \\"text\\",\n\\"data\\" {\n\\"message\\" \\"this is another message\\"\n}\n}\n]\n},\n\\"status\\" null\n}\n'", "customlabel" "broadcast" }, { "id" "fiz3qaxxvf4apscodbx9a", "language" "curl", "code" "curl location request post 'https //api engati ai/bot api/v1 0/customer/61179/bot/bb67e0773bed4c7e/flow/default fallback msg 74963' \\\\\n header 'authorization basic 2082e8f4 0011 479b 9edb 74293c62d91b gkouziq' \\\\\n header 'content type application/json' \\\\\n data raw ''", "customlabel" "api triggers" }, { "id" "sje6oda1qufydejy h0y5", "language" "curl", "code" "curl location 'https //api engati ai/bot api/v2 0/customer/52075/bot/19fc4e904cbc4358/broadcast' \\\\\n header 'authorization basic 65560f12 2c9a g5ac a34r acb596a28704 frsayel' \\\\\n header 'content type application/json' \\\\\n data raw '{\n \\"broadcastid\\" null,\n \\"broadcasttitle\\" \\"testing broadcast\\",\n \\"publishedon\\" \\"2021 10 08t03 29 27 170z\\",\n \\"platform\\" \\"whatsapp\\",\n \\"users\\" \[\n {\n \\"phonenumber\\" \\"\<phone no>\\",\n \\"email\\" \\"jahnavi suthar123\@engati com\\",\n \\"organization\\" \\"abc\\",\n \\"title\\" \\"123\\",\n \\"lastname\\" \\"suthar\\",\n \\"firstname\\" \\"jahnavi 1\\",\n \\"username\\" \\"\\"\n }\n ],\n \\"payload\\" {\n \\"type\\" \\"whatsapp template\\",\n \\"content\\" \[\n {\n \\"type\\" \\"template\\",\n \\"template\\" {\n \\"components\\" \[\n {\n \\"type\\" \\"header\\",\n \\"parameters\\" \[\n {\n \\"type\\" \\"image\\",\n \\"image\\" {\n \\"link\\" \\"\<image url>\\"\n }\n }\n ]\n },\n {\n \\"type\\" \\"body\\",\n \\"parameters\\" \[\n {\n \\"type\\" \\"text\\",\n \\"text\\" \\"1\\"\n }\n ]\n },\n {\n \\"type\\" \\"button\\",\n \\"index\\" 0,\n \\"sub type\\" \\"quick reply\\",\n \\"parameters\\" \[\n {\n \\"type\\" \\"payload\\",\n \\"payload\\" \\"\<flow key>\\"\n }\n ]\n }\n ],\n \\"namespace\\" \\"d44848c7 08b0 4a15 9c53 fbe0b4gft3182\\",\n \\"name\\" \\"test template\\",\n \\"language\\" {\n \\"code\\" \\"en\\",\n \\"policy\\" \\"deterministic\\"\n }\n }\n }\n ]\n },\n \\"status\\" null\n}'", "customlabel" "broadcast wrapper api" } ], "selectedlanguageid" "sje6oda1qufydejy h0y5" }, "description" "", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "autogeneratedanchorslug" "engati apis", "legacyhash" "g9 nl 6mu14zw ayujije" } users api an api to fetch users who match the value specified for the attribute example to get list of users who have feedback with 1 star list of required parameters for this api call true 220,220,221left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type conversations api an api to fetch a user conversation via user id example to store conversation data in crm parameters you can pass to filter the api response true 220,220,221left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type whatsapp template broadcasting for template broadcasting to bulk users on whatsapp note only templates can be sent to users as per whatsapp policy beyond the time limts https //app archbee com/doc/ct91voolupr1ulr9ogwxv/20aa1ohoanjki9jwcwryo broadcast api to enable and use broadcast wrapper api please contact support\@engati com for all channels including whatsapp with users within time limit for broadcast a simple text message or interactive messages to bulk users example marketing & advertisments, survey and promotion learn more about broadcasts in depth via https //help engati ai/simplified broadcast document broadcast will be published based on the time mentioned in utc, immediate broadcasts will be sent for expired time multiple numbers in list format "channeluserids" \[ "9178921978038123","9190193486731" ] api trigger to trigger automations build on engati platform for external usecases example sending an email to a customer who fills an external website form learn more about broadcasts in depth via https //help engati ai/api trigger document error scenarios error codes you might get while making the api call true 330,331left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type
