# Publish Event

`POST` `https://api.getalby.com/nwc/publish`

Publishes any **signed** event to the specified relay

**Request Body**

| Name                                    | Type                                                                                                                                                                       | Description                                                                      |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| relayUrl                                | string                                                                                                                                                                     | If no relay is provided, it uses the default relay (wss\://relay.getalby.com/v1) |
| event<mark style="color:red;">\*</mark> | JSON object (see [example](https://guides.getalby.com/developer-guide/developer-guide/nostr-wallet-connect-api/building-lightning-apps/publish-nwc-request#event-example)) | **Signed** event                                                                 |

#### Response

{% tabs %}
{% tab title="200: OK" %}

```javascript
{
  "eventId": "a16ycf4a01bcxx........xxxxx",
  "relayUrl": "wss://relay.custom.com/v1",
  "state": "PUBLISHED",
}
```

{% endtab %}
{% endtabs %}
