Working With Linked Actions

The actions specification allows for multiple actions to be served via a single Action URL. To do this, the payload must include a links field with a list of actions to be included. Here's an example of what that would look like:

{
 icon: '<image-url>',
 label: 'Donate SOL',
 title: 'Donate to Alice',
 description: 'Cybersecurity Enthusiast | Support my research with a donation.',
 links: {
  actions: [
    {
      href: `/api/donate/{${amountParameterName}}/{${thankYouNote}}`,
      label: 'Donate',
      parameters: [
        {
          name: amountParameterName,
          label: 'Enter a custom SOL amount',
        },
        {
          name: thankYouNote,
          label: 'Thank you note',
        },
      ],
    },
  ],
 },
}

For further reading into the full scope of the links field, check out the Multi-Actions specifications.

In the next section, we'll discuss the different ways to create multiple inputs.

Last updated