[{"data":1,"prerenderedAt":957},["ShallowReactive",2],{"help-nav:en:off":3,"pm-handbook-nav:en:off":3,"doc:\u002Fapi\u002Fwebhook":4},null,{"doc":5,"missing":956},{"id":6,"title":7,"body":8,"description":947,"extension":948,"locale":949,"meta":950,"navigation":951,"path":952,"seo":953,"stem":954,"__hash__":955},"apiGuides\u002Fapi\u002Fwebhook.md","Webhook",{"type":9,"value":10,"toc":928},"minimark",[11,15,19,24,27,46,51,54,58,70,75,368,372,471,475,683,686,809,813,820,824,829,833,836,839,850,857,861,880,888,894,907,911,917,921,924],[12,13,7],"h1",{"id":14},"webhook",[16,17,18],"p",{},"Repsona Webhook allows you to receive event notifications and trigger actions automatically. It sends events such as task or note updates, comment additions, status changes, etc. to a specified URL (HTTP request). Can be used for integration with other services and systems.",[20,21,23],"h2",{"id":22},"steps-to-receive-a-webhook","Steps to receive a webhook",[16,25,26],{},"You can initiate a webhook in the following steps",[28,29,30,34,37,40,43],"ul",{},[31,32,33],"li",{},"Create a Webhook endpoint.",[31,35,36],{},"Process (implement) the request from Repsona",[31,38,39],{},"Configure the Webhook endpoint with Repsona",[31,41,42],{},"Test the Webhook endpoint",[31,44,45],{},"Verify the Webhook signature (recommended)",[47,48,50],"h3",{"id":49},"create-a-webhook-endpoint","Create a Webhook endpoint",[16,52,53],{},"Create an HTTP endpoint that can accept unauthenticated Webhook requests using the POST method.",[47,55,57],{"id":56},"process-requests-from-repsona-implementation","Process requests from Repsona (implementation)",[16,59,60,61,65,66,69],{},"The endpoint must be configured to read an Event (Event) object of the type of event notification it receives; Repsona sends the event to the Webhook endpoint as part of a POST request with a JSON payload. The event should be parsed and return a 2xx status code. Use ",[62,63,64],"code",{},"type"," (",[62,67,68],{},"\u003CModel>.\u003Caction>",") to determine what to do.",[71,72,74],"h4",{"id":73},"example-payload","Example payload.",[76,77,82],"pre",{"className":78,"code":79,"language":80,"meta":81,"style":81},"language-json shiki shiki-themes github-light github-light github-dark","{\n  \"type\": \"Task.update\",\n  \"event\": {\n    \"id\": 20004,\n    \"createdAt\": 1673021684000,\n    \"task\": {\n      \"id\": 2,\n      \"status\": {\n        \"id\": 1,\n        \"name\": \"Todo\",\n        \"isClosed\": false\n      }\n    },\n    \"user\": {\n      \"id\": 1,\n      \"name\": \"Reon\",\n      \"fullName\": \"Reon Walls\",\n      \"avatarUrl\": \"\u002Fdummy\u002Favatar1.png\"\n    },\n    \"project\": {\n      \"id\": 1,\n      \"name\": \"elephant-website\",\n      \"fullName\": \"Elephant website development project\"\n    }\n  },\n  \"url\": {\n    \"ref\": \"https:\u002F\u002F\u003Cspace>.repsona.com\u002Fp\u002F1\u002Fstatus\u002F2\"\n  }\n}\n","json","",[62,83,84,93,110,119,132,145,153,166,174,187,200,211,217,223,231,242,255,268,279,284,292,303,315,325,331,337,345,356,362],{"__ignoreMap":81},[85,86,89],"span",{"class":87,"line":88},"line",1,[85,90,92],{"class":91},"sxrX7","{\n",[85,94,96,100,103,107],{"class":87,"line":95},2,[85,97,99],{"class":98},"sBjJW","  \"type\"",[85,101,102],{"class":91},": ",[85,104,106],{"class":105},"sIIMD","\"Task.update\"",[85,108,109],{"class":91},",\n",[85,111,113,116],{"class":87,"line":112},3,[85,114,115],{"class":98},"  \"event\"",[85,117,118],{"class":91},": {\n",[85,120,122,125,127,130],{"class":87,"line":121},4,[85,123,124],{"class":98},"    \"id\"",[85,126,102],{"class":91},[85,128,129],{"class":98},"20004",[85,131,109],{"class":91},[85,133,135,138,140,143],{"class":87,"line":134},5,[85,136,137],{"class":98},"    \"createdAt\"",[85,139,102],{"class":91},[85,141,142],{"class":98},"1673021684000",[85,144,109],{"class":91},[85,146,148,151],{"class":87,"line":147},6,[85,149,150],{"class":98},"    \"task\"",[85,152,118],{"class":91},[85,154,156,159,161,164],{"class":87,"line":155},7,[85,157,158],{"class":98},"      \"id\"",[85,160,102],{"class":91},[85,162,163],{"class":98},"2",[85,165,109],{"class":91},[85,167,169,172],{"class":87,"line":168},8,[85,170,171],{"class":98},"      \"status\"",[85,173,118],{"class":91},[85,175,177,180,182,185],{"class":87,"line":176},9,[85,178,179],{"class":98},"        \"id\"",[85,181,102],{"class":91},[85,183,184],{"class":98},"1",[85,186,109],{"class":91},[85,188,190,193,195,198],{"class":87,"line":189},10,[85,191,192],{"class":98},"        \"name\"",[85,194,102],{"class":91},[85,196,197],{"class":105},"\"Todo\"",[85,199,109],{"class":91},[85,201,203,206,208],{"class":87,"line":202},11,[85,204,205],{"class":98},"        \"isClosed\"",[85,207,102],{"class":91},[85,209,210],{"class":98},"false\n",[85,212,214],{"class":87,"line":213},12,[85,215,216],{"class":91},"      }\n",[85,218,220],{"class":87,"line":219},13,[85,221,222],{"class":91},"    },\n",[85,224,226,229],{"class":87,"line":225},14,[85,227,228],{"class":98},"    \"user\"",[85,230,118],{"class":91},[85,232,234,236,238,240],{"class":87,"line":233},15,[85,235,158],{"class":98},[85,237,102],{"class":91},[85,239,184],{"class":98},[85,241,109],{"class":91},[85,243,245,248,250,253],{"class":87,"line":244},16,[85,246,247],{"class":98},"      \"name\"",[85,249,102],{"class":91},[85,251,252],{"class":105},"\"Reon\"",[85,254,109],{"class":91},[85,256,258,261,263,266],{"class":87,"line":257},17,[85,259,260],{"class":98},"      \"fullName\"",[85,262,102],{"class":91},[85,264,265],{"class":105},"\"Reon Walls\"",[85,267,109],{"class":91},[85,269,271,274,276],{"class":87,"line":270},18,[85,272,273],{"class":98},"      \"avatarUrl\"",[85,275,102],{"class":91},[85,277,278],{"class":105},"\"\u002Fdummy\u002Favatar1.png\"\n",[85,280,282],{"class":87,"line":281},19,[85,283,222],{"class":91},[85,285,287,290],{"class":87,"line":286},20,[85,288,289],{"class":98},"    \"project\"",[85,291,118],{"class":91},[85,293,295,297,299,301],{"class":87,"line":294},21,[85,296,158],{"class":98},[85,298,102],{"class":91},[85,300,184],{"class":98},[85,302,109],{"class":91},[85,304,306,308,310,313],{"class":87,"line":305},22,[85,307,247],{"class":98},[85,309,102],{"class":91},[85,311,312],{"class":105},"\"elephant-website\"",[85,314,109],{"class":91},[85,316,318,320,322],{"class":87,"line":317},23,[85,319,260],{"class":98},[85,321,102],{"class":91},[85,323,324],{"class":105},"\"Elephant website development project\"\n",[85,326,328],{"class":87,"line":327},24,[85,329,330],{"class":91},"    }\n",[85,332,334],{"class":87,"line":333},25,[85,335,336],{"class":91},"  },\n",[85,338,340,343],{"class":87,"line":339},26,[85,341,342],{"class":98},"  \"url\"",[85,344,118],{"class":91},[85,346,348,351,353],{"class":87,"line":347},27,[85,349,350],{"class":98},"    \"ref\"",[85,352,102],{"class":91},[85,354,355],{"class":105},"\"https:\u002F\u002F\u003Cspace>.repsona.com\u002Fp\u002F1\u002Fstatus\u002F2\"\n",[85,357,359],{"class":87,"line":358},28,[85,360,361],{"class":91},"  }\n",[85,363,365],{"class":87,"line":364},29,[85,366,367],{"class":91},"}\n",[71,369,371],{"id":370},"payload-fields","Payload fields",[373,374,375,388],"table",{},[376,377,378],"thead",{},[379,380,381,385],"tr",{},[382,383,384],"th",{},"Field",[382,386,387],{},"Description",[389,390,391,406,420,441,451,461],"tbody",{},[379,392,393,398],{},[394,395,396],"td",{},[62,397,64],{},[394,399,400,402,403],{},[62,401,68],{},". For example, ",[62,404,405],{},"Task.update",[379,407,408,417],{},[394,409,410,413,414],{},[62,411,412],{},"event.id"," \u002F ",[62,415,416],{},"event.createdAt",[394,418,419],{},"The event ID and when it happened (UNIX time in milliseconds)",[379,421,422,427],{},[394,423,424],{},[62,425,426],{},"event.\u003Cmodel>",[394,428,429,430,433,434,437,438],{},"The target. The key is the model name with a lowercase first letter (",[62,431,432],{},"task",", ",[62,435,436],{},"taskComment",", etc.). Always includes ",[62,439,440],{},"id",[379,442,443,448],{},[394,444,445],{},[62,446,447],{},"event.user",[394,449,450],{},"The user who made the change",[379,452,453,458],{},[394,454,455],{},[62,456,457],{},"event.project",[394,459,460],{},"The project of the target",[379,462,463,468],{},[394,464,465],{},[62,466,467],{},"url.ref",[394,469,470],{},"The Repsona URL that opens the target",[71,472,474],{"id":473},"event-types","Event types",[373,476,477,489],{},[376,478,479],{},[379,480,481,485],{},[382,482,483],{},[62,484,64],{},[382,486,487],{},[62,488,426],{},[389,490,491,546,565,589,614,635,658],{},[379,492,493,498],{},[394,494,495],{},[62,496,497],{},"Task.create",[394,499,500,102,502,433,504,433,507,433,510,433,513,433,516,433,519,433,522,433,525,433,528,433,531,433,534,433,537,433,540,433,543],{},[62,501,432],{},[62,503,440],{},[62,505,506],{},"name",[62,508,509],{},"description",[62,511,512],{},"status",[62,514,515],{},"responsibleUser",[62,517,518],{},"ballHoldingUser",[62,520,521],{},"milestone",[62,523,524],{},"project",[62,526,527],{},"parent",[62,529,530],{},"priority",[62,532,533],{},"planned",[62,535,536],{},"actual",[62,538,539],{},"startDate",[62,541,542],{},"dueDate",[62,544,545],{},"tags",[379,547,548,552],{},[394,549,550],{},[62,551,405],{},[394,553,554,102,556,558,559,561,562],{},[62,555,432],{},[62,557,440],{}," and the changed fields. Adding or removing files sends ",[62,560,440],{}," and ",[62,563,564],{},"files",[379,566,567,575],{},[394,568,569,413,572],{},[62,570,571],{},"TaskComment.create",[62,573,574],{},"TaskComment.update",[394,576,577,102,579,433,581,433,584,433,586],{},[62,578,436],{},[62,580,440],{},[62,582,583],{},"comment",[62,585,432],{},[62,587,588],{},"user",[379,590,591,596],{},[394,592,593],{},[62,594,595],{},"Note.create",[394,597,598,102,601,433,603,433,605,433,607,433,610,433,612],{},[62,599,600],{},"note",[62,602,440],{},[62,604,506],{},[62,606,509],{},[62,608,609],{},"isWip",[62,611,524],{},[62,613,527],{},[379,615,616,621],{},[394,617,618],{},[62,619,620],{},"Note.update",[394,622,623,102,625,627,628,630,631,561,633],{},[62,624,600],{},[62,626,440],{}," and the changed fields (saving in the editor sends all the fields of ",[62,629,595],{},"). Adding or removing files sends ",[62,632,440],{},[62,634,564],{},[379,636,637,645],{},[394,638,639,413,642],{},[62,640,641],{},"NoteComment.create",[62,643,644],{},"NoteComment.update",[394,646,647,102,650,433,652,433,654,433,656],{},[62,648,649],{},"noteComment",[62,651,440],{},[62,653,583],{},[62,655,600],{},[62,657,588],{},[379,659,660,665],{},[394,661,662],{},[62,663,664],{},"Reaction.create",[394,666,667,102,670,433,672,433,675,433,678,433,681],{},[62,668,669],{},"reaction",[62,671,440],{},[62,673,674],{},"text",[62,676,677],{},"target",[62,679,680],{},"reactedUser",[62,682,524],{},[16,684,685],{},"Fields that refer to other data are objects in the following shapes, not numeric IDs.",[373,687,688,697],{},[376,689,690],{},[379,691,692,694],{},[382,693,384],{},[382,695,696],{},"Shape",[389,698,699,710,730,741,758,769,780],{},[379,700,701,705],{},[394,702,703],{},[62,704,512],{},[394,706,707],{},[62,708,709],{},"{id, name, isClosed}",[379,711,712,722],{},[394,713,714,413,716,413,718,413,720],{},[62,715,515],{},[62,717,518],{},[62,719,588],{},[62,721,680],{},[394,723,724,65,727,729],{},[62,725,726],{},"{id, name, fullName, avatarUrl}",[62,728,506],{}," is the username)",[379,731,732,736],{},[394,733,734],{},[62,735,524],{},[394,737,738],{},[62,739,740],{},"{id, name, fullName}",[379,742,743,753],{},[394,744,745,413,747,413,749,413,751],{},[62,746,521],{},[62,748,527],{},[62,750,432],{},[62,752,600],{},[394,754,755],{},[62,756,757],{},"{id, name}",[379,759,760,764],{},[394,761,762],{},[62,763,564],{},[394,765,766],{},[62,767,768],{},"[{id, hash, filename, size, type}]",[379,770,771,775],{},[394,772,773],{},[62,774,545],{},[394,776,777],{},[62,778,779],{},"[{id, name}]",[379,781,782,786],{},[394,783,784],{},[62,785,677],{},[394,787,788,791,792,794,795,413,797,413,799,413,801,413,803,413,806],{},[62,789,790],{},"{type, id}",". ",[62,793,64],{}," is one of ",[62,796,524],{},[62,798,436],{},[62,800,649],{},[62,802,588],{},[62,804,805],{},"activity",[62,807,808],{},"introduction",[47,810,812],{"id":811},"configure-the-webhook-endpoint-to-repsona","Configure the Webhook endpoint to Repsona.",[16,814,815,816,819],{},"From the ",[62,817,818],{},"Project Settings > Webhooks"," page, set the webhook endpoint URL and the event type to be notified The webhook endpoint URL must be a publicly accessible HTTPS URL.",[47,821,823],{"id":822},"testing-webhook-endpoints","Testing Webhook endpoints.",[16,825,815,826,828],{},[62,827,818],{}," page, test data can be sent to the registered URL. You can check the contents and results of the transmission in the transmission history list.",[47,830,832],{"id":831},"checking-the-webhook-signature-recommended","Checking the Webhook signature (recommended)",[16,834,835],{},"Send events including a signature in the Repsona-Signature header. This allows you to verify that the event was sent by Repsona and not by a third party. To verify the signature, the signature secret must have been previously obtained from the webhook configuration.",[16,837,838],{},"You can regenerate the signing secret in the webhook settings. The previous secret stops working immediately, so update your receiver with the new one.",[16,840,841,842,845,846,849],{},"The Repsona-Signature header in the event contains a timestamp and a signature. The timestamp is preceded by ",[62,843,844],{},"t="," and the signature by ",[62,847,848],{},"s=",".",[76,851,855],{"className":852,"code":854,"language":674},[853],"language-text","Repsona-Signature: t=1674544389,s=768b05feb76b244902ab3a4eca119abb98e530ccbc3f2c48e18a7ed3a1cea0ab\n",[62,856,854],{"__ignoreMap":81},[71,858,860],{"id":859},"extracting-timestamps-and-signatures-from-headers","Extracting timestamps and signatures from headers",[16,862,863,864,867,868,871,872,875,876,879],{},"To get a list of elements, split the header using the ",[62,865,866],{},","," character as a delimiter. Then, separate each element using the ",[62,869,870],{},"="," character as a delimiter to get the prefix-value pairs. The value of the ",[62,873,874],{},"t"," prefix corresponds to the timestamp, while the ",[62,877,878],{},"s"," corresponds to the signature.",[71,881,883,884,887],{"id":882},"preparing-the-signed_payload-string","Preparing the ",[62,885,886],{},"signed_payload"," string",[16,889,890,891,893],{},"A ",[62,892,886],{}," string is created by concatenating the following.",[28,895,896,899,904],{},[31,897,898],{},"Timestamp (as a string)",[31,900,901,902],{},"Character ",[62,903,849],{},[31,905,906],{},"The actual JSON payload (request body)",[71,908,910],{"id":909},"determine-the-expected-signature","Determine the expected signature",[16,912,913,914,916],{},"Calculate the HMAC using the SHA256 hash function. Use the endpoint's signature secret as key and the ",[62,915,886],{}," string as message.",[71,918,920],{"id":919},"comparing-signatures","Comparing signatures",[16,922,923],{},"Compares the signature in the header with the expected signature. If a match is found, the difference between the current timestamp and the received timestamp is calculated to determine if the difference is acceptable.",[925,926,927],"style",{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":81,"searchDepth":95,"depth":112,"links":929},[930],{"id":22,"depth":95,"text":23,"children":931},[932,933,938,939,940],{"id":49,"depth":112,"text":50},{"id":56,"depth":112,"text":57,"children":934},[935,936,937],{"id":73,"depth":121,"text":74},{"id":370,"depth":121,"text":371},{"id":473,"depth":121,"text":474},{"id":811,"depth":112,"text":812},{"id":822,"depth":112,"text":823},{"id":831,"depth":112,"text":832,"children":941},[942,943,945,946],{"id":859,"depth":121,"text":860},{"id":882,"depth":121,"text":944},"Preparing the signed_payload string",{"id":909,"depth":121,"text":910},{"id":919,"depth":121,"text":920},"The Repsona Webhook enables you to receive event notifications and trigger actions automatically. Events such as task or note updates, comment additions, status changes, etc. are sent (HTTP requests) to a specified URL. Can be used for integration with other services and systems.","md","en",{},true,"\u002Fapi\u002Fwebhook",{"title":7,"description":947},"api\u002Fwebhook","d2U3z7C7wXZypKqKs0VWlre_O9oZjxp4EgcdB_EXR_Y",[],1795506130514]