action truora_create_hook { label: "Creates a hook subscription" description: "Creates a hook subscription to notify events in Truora plataform. Subscriptions broadcast data as events occur and additional subscription instances are not required in order to refresh the information. Events are received in an array as a JWT and are decoded using the signing key returned by this endpoint. Their structure is as follows:\n\n```\n{\n \"events\": [\n {\n \"event_action\": \"created\",\n \"event_type\": \"check\",\n \"id\": \"HKEdd28c569cf5eb74e45f0f4c092096e62c1c95ba2\",\n \"object\": {\n \"check_id\": \"CHK9c39003424c521aec8566ce59e1ddc86\",\n \"country\": \"CO\",\n \"creation_date\": \"2020-04-01T23:00:30.581232281Z\",\n \"homonym_score\": 0,\n \"id_score\": 0,\n \"national_id\": \"1151959906\",\n \"previous_check\": \"CHK4ec814fecd147eaae41027081d7d5caf\",\n \"score\": -1,\n \"status\": \"not_started\",\n \"type\": \"person\",\n \"update_date\": \"2020-04-01T23:00:30.680937413Z\"\n },\n \"timestamp\": \"2020-04-01T23:00:30Z\",\n \"version\": \"1.0\"\n }\n ],\n \"iat\": 1585782031,\n \"iss\": \"Truora\"\n}\n```\n\nKeep in mind that the object attribute varies depending on the event_type." provider: truora method: POST path: "/v1/hooks" encoding: form output: { type: "object" description: "Represents a hook configuration" properties: { actions: { type: "array" description: "Actions you want to be notified. Possible inputs are created, started, and finished or any combination of those three" items: { type: "string" } } event_type: { type: "string" description: "Entity events you want to be notified. If all is selected, there is no need to enter actions" enum: ["all", "check"] } signing_key: { type: "string" description: "Secret random hexadecimal key used to sign the event and confirm its legitimacy. Signing keys are used to decode the JWT you get as payload from events" } status: { type: "string" description: "indicates whether the hook is active or not. enabled by default" enum: ["enabled", "disabled"] } subscriber_type: { type: "string" description: "Platform with an endpoint ready to process the information. Only web is supported currently" } subscriber_url: { type: "string" description: "Link where notification requests will be sent, required when subscriber_type is web" } } } }