> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Register Webhook

> Register a webhook URL for an action such as scheduled, messages, or comments on the Primary Profile or a User Profile, with an optional HMAC secret.

## Register Webhook

Register a new Webhook for one of the [available actions](https://www.ayrshare.com/docs/apis/webhooks/actions.md).
A Webhook may be registered with the Primary Profile or a User Profile.

You may also register a webhook in the Ayrshare dashbboard on the Webhooks page.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Body Parameters

**action** `string` *required*

Available actions: `feed`, `social`, `scheduled`, `batch`, `messages`, `mentions`, `comments`, `automations`, `demo`, `suspended`, `ads`

**url** `string` *required*

The URL to be called on action. URL must be in a valid format and begin with *https\://*

The URL must be reachable on the public internet. A URL that points to `localhost`, a private network address such as `192.168.x.x` or `10.x.x.x`, or another internal address returns error `101`.

**secret** `string`

Secret text used for HMAC. Please see [overview](https://www.ayrshare.com/docs/apis/webhooks/overview.md#webhook-security) for more details.

```json 200: Response theme={"system"}
{
  "status": "success",
  "action": "scheduled",
  "url": "https://mysite.com/hook",
  "refId": "3dc079614bdc3f281d9" // User Profile Ref Id
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.