---
title: "POST /poktroll.application.Msg/DelegateToGateway"
method: POST
path: "/poktroll.application.Msg/DelegateToGateway"
tags: ["Msg"]
---

# POST /poktroll.application.Msg/DelegateToGateway

`POST /poktroll.application.Msg/DelegateToGateway`

## Request body

- PoktrollApplicationMsgDelegateToGateway
  - `app_address` string — The Bech32 address of the application.
  - `gateway_address` string — The Bech32 address of the gateway the application wants to delegate to.

## Response `200`

A successful response.

- PoktrollApplicationMsgDelegateToGatewayResponse
  - `application` PoktrollApplicationApplication
    - `address` string
    - `delegatee_gateway_addresses` string[]
    - `pending_transfer` PoktrollApplicationPendingApplicationTransfer — PendingTransfer is used to store the details of a pending transfer. It is only intended to be used inside of an Application object.
      - `destination_address` string
      - `session_end_height` string, uint64
    - `pending_undelegations` object — Mapping of session end heights to gateways being undelegated from - Key: Height of the last block of the session when undelegation tx was committed - Value: List of gateways being undelegated from TODO_DOCUMENT(@red-0ne): Need to document the flow from this comment so its clear to everyone why this is necessary; https://github.com/pokt-network/poktroll/issues/476#issuecomment-2052639906.
    - `service_configs` PoktrollSharedApplicationServiceConfig[]
      - `service_id` string
    - `stake` CosmosBaseV1beta1Coin — Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.
      - `amount` string
      - `denom` string
    - `unstake_session_end_height` string, uint64

## Other responses

- `default` — An unexpected error response.

## Changes

- **2024-08-14** `21c607e4fa20` — 1 info
  - api operation id `PoktrollApplicationMsg_DelegateToGateway` removed and replaced with `GithubCompoktNetworkpoktrollMsg_DelegateToGateway`
- **2024-02-23** `54713b4a9d25` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/pokt-network/apis/http-api-console/changes/poktroll.application.Msg/DelegateToGateway/post.md)

---

[API](https://skmtc.dev/pokt-network/apis/http-api-console.md) · [All operations](https://skmtc.dev/pokt-network/apis/http-api-console/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pokt-network/http-api-console/revisions/de0653d8a73d/schema)
