Content Watcher Service
Webhooks Reference
Method | Path | Description |
---|---|---|
POST | /content-announcements | Notify a webhook client of a content announcement found on the blockchain |
Reference Table
Name | Path | Description |
---|---|---|
AnnouncementType | #/components/schemas/AnnouncementType | |
AnnouncementResponse | #/components/schemas/AnnouncementResponse | |
TypedAnnouncement | #/components/schemas/TypedAnnouncement | |
TombstoneAnnouncement | #/components/schemas/TombstoneAnnouncement | |
BroadcastAnnouncement | #/components/schemas/BroadcastAnnouncement | |
ReplyAnnouncement | #/components/schemas/ReplyAnnouncement | |
ReactionAnnouncement | #/components/schemas/ReactionAnnouncement | |
ProfileAnnouncement | #/components/schemas/ProfileAnnouncement | |
UpdateAnnouncement | #/components/schemas/UpdateAnnouncement |
Path Details
[POST]/content-announcements
- Summary
Notify a webhook client of a content announcement found on the blockchain
RequestBody
- application/json
{
// An optional identifier for the request, may be used for tracking or correlation
requestId?: string
// An optional webhook URL registered as part of a specific search request
webhookUrl?: string
// Identifier for the schema being used or referenced
schemaId: integer
// The block number on the blockchain where this announcement was recorded
blockNumber: integer
announcement: #/components/schemas/TombstoneAnnouncement | #/components/schemas/BroadcastAnnouncement | #/components/schemas/ReplyAnnouncement | #/components/schemas/ReactionAnnouncement | #/components/schemas/ProfileAnnouncement | #/components/schemas/UpdateAnnouncement
}
Responses
-
201 Content announcement notification received
-
400 Bad request
References
#/components/schemas/AnnouncementType
{
"enum": [
0,
2,
3,
4,
5,
6
],
"x-enum-varnames": [
"Tombstone",
"Broadcast",
"Reply",
"Reaction",
"Profile",
"Update"
]
}
#/components/schemas/AnnouncementResponse
{
// An optional identifier for the request, may be used for tracking or correlation
requestId?: string
// An optional webhook URL registered as part of a specific search request
webhookUrl?: string
// Identifier for the schema being used or referenced
schemaId: integer
// The block number on the blockchain where this announcement was recorded
blockNumber: integer
announcement: #/components/schemas/TombstoneAnnouncement | #/components/schemas/BroadcastAnnouncement | #/components/schemas/ReplyAnnouncement | #/components/schemas/ReactionAnnouncement | #/components/schemas/ProfileAnnouncement | #/components/schemas/UpdateAnnouncement
}
#/components/schemas/TypedAnnouncement
{
announcementType: AnnouncementType
fromId: string
}
#/components/schemas/TombstoneAnnouncement
{
"allOf": [
{
"$ref": "#/components/schemas/TypedAnnouncement"
},
{
"type": "object",
"properties": {
"targetAnnouncementType": {
"type": "integer"
},
"targetContentHash": {
"type": "string"
}
},
"required": [
"targetAnnouncementType",
"targetContentHash"
]
}
]
}
#/components/schemas/BroadcastAnnouncement
{
"allOf": [
{
"$ref": "#/components/schemas/TypedAnnouncement"
},
{
"type": "object",
"properties": {
"contentHash": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"contentHash",
"url"
]
}
]
}
#/components/schemas/ReplyAnnouncement
{
"allOf": [
{
"$ref": "#/components/schemas/TypedAnnouncement"
},
{
"type": "object",
"properties": {
"contentHash": {
"type": "string"
},
"inReplyTo": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"contentHash",
"inReplyTo",
"url"
]
}
]
}
#/components/schemas/ReactionAnnouncement
{
"allOf": [
{
"$ref": "#/components/schemas/TypedAnnouncement"
},
{
"type": "object",
"properties": {
"emoji": {
"type": "string"
},
"inReplyTo": {
"type": "string"
},
"apply": {
"type": "integer"
}
},
"required": [
"emoji",
"inReplyTo",
"apply"
]
}
]
}
#/components/schemas/ProfileAnnouncement
{
"allOf": [
{
"$ref": "#/components/schemas/TypedAnnouncement"
},
{
"type": "object",
"properties": {
"contentHash": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"contentHash",
"url"
]
}
]
}
#/components/schemas/UpdateAnnouncement
{
"allOf": [
{
"$ref": "#/components/schemas/TypedAnnouncement"
},
{
"type": "object",
"properties": {
"contentHash": {
"type": "string"
},
"targetAnnouncementType": {
"type": "integer"
},
"targetContentHash": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"contentHash",
"targetAnnouncementType",
"targetContentHash",
"url"
]
}
]
}