Create a webhook
webhooks.create(WebhookCreateParams**kwargs) -> WebhookWithSecret
POST/v2/webhooks/{teamId}
Registers a webhook and enqueues an asynchronous verification handshake (run by the dispatcher). The response includes the signing secret, shown only this once; verified is false until the handshake passes.
Create a webhook
import os
from micro_so import Micro
client = Micro(
api_key=os.environ.get("MICRO_API_KEY"), # This is the default and can be omitted
)
webhook_with_secret = client.webhooks.create(
name="x",
url="https://example.com",
)
print(webhook_with_secret){
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"name": "name",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com",
"verified": true,
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z",
"verification_token": "verification_token",
"verified_at": "2019-12-27T18:11:19.117Z",
"secret": "secret",
"verification": {
"status": "pending"
}
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"name": "name",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com",
"verified": true,
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z",
"verification_token": "verification_token",
"verified_at": "2019-12-27T18:11:19.117Z",
"secret": "secret",
"verification": {
"status": "pending"
}
}