Create webhook .

POST

Request

/webhooks

Authentication

There are three authentication options for webhooks; basic authentication (username and password), bearer token and API keys.

Basic Authentication

Body

{
    "url": "https://myendpoint.com",
        "authentication": "basic_auth",
        "username": "test",
        "password": "pass"
}

Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 12345,
        "created_at": "2021-03-22T11:19:27.000000Z",
        "updated_at": "2021-03-22T11:19:27.000000Z",
        "url": "https://myendpoint.com",
        "authentication": "basic_auth",
        "username": "test",
        "password": "pass"
    }
}

Bearer Token

Body

{
    "url": "https://myendpoint.com",
        "authentication": "bearer_token",
        "token": "AbCdEf123456"
}

Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 12345,
        "created_at": "2021-03-22T11:19:27.000000Z",
        "updated_at": "2021-03-22T11:19:27.000000Z",
        "url": "https://myendpoint.com",
        "authentication": "bearer_token",
        "token": "AbCdEf123456"
    }
}

API Keys

Body

{
    "url": "https://myendpoint.com",
        "authentication": "api_key",
        "key": "AbCdsefEf123456",
        "value": "AbCdEf113123fes"
}

Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 12345,
        "created_at": "2021-03-22T11:19:27.000000Z",
        "updated_at": "2021-03-22T11:19:27.000000Z",
        "url": "https://myendpoint.com",
        "authentication": "api_key",
        "key": "AbCdsefEf123456",
        "value": "AbCdEf113123fes"
    }
}

Fail codes

Code Status Description
too_many_webhooks 422 Max webhooks created

Stay in the loop..

Sign up to our newsletter to keep up-to-date.