Skip to main content

Test webhook

POST 

/v2/webhooks/:webhookId/test

Tests a webhook. Creates a webhook dispatch with a dummy payload.

Request

Path Parameters

    webhookId string required

    Webhook ID.


    Example: pVJtoTelgYUq4qJOt

Status 201

Response Headers
    {
    "data": {
    "id": "asdLZtadYvn4mBZmm",
    "userId": "wRsJZtadYvn4mBZmm",
    "webhookId": "asdLZtadYvn4mBZmm",
    "createdAt": "2019-12-12T07:34:14.202Z",
    "status": "ACTIVE",
    "eventType": "ACTOR.BUILD.ABORTED",
    "eventData": "Unknown Type: object,null",
    "webhook": {
    "_id": "YiKoxjkaS9gjGTqhF",
    "actionType": "HTTP_REQUEST",
    "condition": {
    "actorId": "hksJZtadYvn4mBuin",
    "actorTaskId": "asdLZtadYvn4mBZmm",
    "actorRunId": "hgdKZtadYvn4mBpoi"
    },
    "requestUrl": "https://example.com/webhook",
    "isAdHoc": false,
    "isApifyIntegration": false,
    "slackMessage": {
    "userIntegrationId": "kLcd8Z4dzXN1z3QzS",
    "channelId": "C01234ABCDE",
    "messageTemplate": "Actor run {{resource.id}} finished."
    },
    "googleMail": {
    "userIntegrationId": "kLcd8Z4dzXN1z3QzS",
    "emailTo": [
    "bob@example.com"
    ],
    "subject": "Actor run finished",
    "body": "Actor run {{resource.id}} finished.",
    "attachmentFormat": "csv",
    "attachmentTransformation": {
    "fields": [
    "title",
    "url"
    ],
    "omit": [
    "html"
    ]
    }
    },
    "googleDrive": {
    "userIntegrationId": "kLcd8Z4dzXN1z3QzS",
    "filename": "results",
    "format": "json",
    "transformation": {
    "fields": [
    "title",
    "url"
    ],
    "omit": [
    "html"
    ]
    }
    },
    "githubIssue": {
    "userIntegrationId": "kLcd8Z4dzXN1z3QzS",
    "repository": "apify/apify-docs",
    "title": "Actor run failed",
    "body": "Actor run {{resource.id}} failed."
    }
    },
    "calls": [
    {
    "startedAt": "2019-12-12T07:34:14.202Z",
    "finishedAt": "2019-12-12T07:34:14.202Z",
    "errorMessage": "Cannot send request",
    "responseStatus": 200,
    "responseBody": "{\"foo\": \"bar\"}",
    "debugPostMessage": {}
    }
    ]
    }
    }