POST

POST Request

Actions support HTTP POST JSON requests to their URL with the the body payload:

{
  "account": "<account>"
}

where account is a base58-encoded representation of the public key of the user making the request.

Clients should use Accept-Encoding headers and the Action service should respond with a Content-Encoding header for HTTP compression.

Post Response

Actions services should respond to POST requests with an HTTP OK JSON response with a payload of the format below.

export interface ActionPostResponse {
  /** base64-encoded transaction */
  transaction: string;
  /** optional message, can be used to e.g. describe the nature of the transaction */
  message?: string;
  
  links?: {
      /**
     * The next action in a successive chain of actions to be obtained after
     * the previous was successful.
     */
    next: NextActionLink;
  };
}

The links.next parameter in ActionPostResponse is related to the Action Chaining spec and is currently not supported by all Blinks enabled wallets. We're working on bringing Blinks support for it as soon as possible.

The POST request also accepts responses of type ActionError which can be found in the GET specificiation, in cases where you want to have custom input validation in the POST and return an Error in cases where it doesn't satisfy requirements.

Last updated