Search code examples
podio

Podio - customize webhook request data


When a Podio webhook is triggered by its subscribed event, the hook will send a request to an external url with information about that event. Is it possible to customize the information contained in the request?

For example, I am planning to create a webhook that will be triggered when an app field is updated. The default webhook settings will include

body: { item_id: '12345',
        item_revision_id: '2',
        type: 'item.update',
        hook_id: 54321' }

in the request. However, this means that I have to chain this to another GET request back to Podio if I want to get more information about the updated item (these are 'user' items, so I want things like 'first_name', 'last_name', etc.).

When I create a hook via the API (https://developers.podio.com/doc/hooks/create-hook-215056), is there a way that I can customize it so that the entire updated item record is included in the requests when the hook is called? In the Ruby and PHP client examples, there's an attributes parameter - can you set the request data via attributes and, if so, how should that be formatted?


Solution

  • It is not possible to customize Podio webhook request. Each and every Podio webhook has same structure, and if you need more information about item being updated/created you will need to fire another GET request.