webhooks
Webhook API Endpoint: Register a webhook to receive asynchronous updates on events.

Webhooks API Endpoint

A webhook allows you to be notified when certain system actions occur via a call to a URL you provide. Register a webhook by providing your URL and the type of action you wish to be notified. When the action occurs a POST message will be sent to the provided URL.
Business Plan required.
❗Click the β€Ί in the endpoint to view details.
post
https://app.ayrshare.com/api
/hook/webhook
Register Webhook
​
delete
https://app.ayrshare.com/api
/hook/webhook
Unregister Webhook
​
get
https://app.ayrshare.com/api
/hook/webhook
List Registered Webhooks

Actions

Scheduled Action

Notification when a scheduled post has been processed. Only future scheduled posts receive a webhook notification.
Business Plan required.

POST Action to Your URL

1
{
2
"action": "scheduled", // The action taken
3
"refId": "140b8700bd6ade089b242d845e268fb886130c53", // User Reference ID
4
"status": "success", // success or error
5
"id": "TBAAAqAMMpoweA9wKHUp", // Ayrshare id of post
6
"errors": [], // List of errors if any occurred
7
"postIds": [ // Individual successful posts status
8
{
9
"postUrl" :"https://www.facebook.com/102775127855689_361718068618052",
10
"platform": "facebook",
11
"status":"success",
12
"id":"102775127855689_361718068618052"
13
}
14
]
15
}
Copied!

Social Action

Notification when a user's profile links or unlinks a social network.
Business Plan required.

POST Action to Your URL

1
{
2
"action": "social", // The action taken
3
"details": { // Optional: if details available
4
"status": "error",
5
"code": 349,
6
"message": "Account locked"
7
},
8
"displayName": "Instagram Title", // If a user account name is present at the social network
9
"platform": "instagram", // The social platform the action occured
10
"refId": "140b8700bd6ade089b242d845e268fb886130c53", // User Reference ID
11
"refreshBy": "2022-11-05T12:21:29Z" // Optional: If type is refresh, the date the social network authorization must be refreshed on the social account linkage page
12
"source": "system", // Initiated by "system" or "user". If system, recommend taking action with your user
13
"title": "User Profile Name", // The user profile's account title
14
"type": "link" // Type of action: link, unlink, or refresh
15
}
Copied!
If the initiatedBy equals "system", Ayrshare automatically unlinked the account. We recommend you notify your user so they can continue posting. Details of the unlinking found details field.

Feed Action

Notification when a new RSS feed item is found for registered RSS feeds. Note: if the webhook is active, new RSS items will not be automatically posted to the social networks.
Business Plan required.

POST Action to Your URL

1
{
2
"action": "feed",
3
"refId": "140b8700bd6ade089b242d845e268fb886130c53", // User Reference ID
4
"title": "Title of profile if available", // optional, only if available
5
"data": { ... }
6
}
Copied!
​