Pike13 For Developers
Get Started
Authentication
Core API
Reporting API
Webhooks API
Announcements

Webhooks API Documentation

Webhook

Represents a subscription to a topic for changes within a business. Franchises will be automatically notified of changes in all franchisees provided the franchise has created a webhook with a relevant topic. Every webhook endpoint is scoped by the access token and the business.

The subscription endpoint conforms to JSON API version 1.0.

GET /api/v3/webhooks

Returns all webhooks created by an account and scoped by the subdomain.

Show curl example

REQUEST
$ curl https://mybiz.pike13.com/api/v3/webhooks \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{ "data": [ { "id": "2", "type": "webhooks", "links": { "self": "http://mybiz.pike13.com/api/v3/webhooks/2" }, "attributes": { "account_id": 1, "business_id": 2, "topic": "person.created", "target": "https://target.example.com", "name": "New Client", "description": "Webhook for integration with my other service" } } ] }

GET /api/v3/webhooks/:id

Returns a specific webhook.

POST /api/v3/webhooks

Create a webhook. account_id and business_id are not directly settable.

Required Attributes
topicstringMust be a valid topic.
targethttps urlAn endpoint for Pike13 servers to POST a payload to.
Optional Attributes
namestringA name for the webhook.
descriptionstringDescription.

Show curl example

REQUEST
$ curl -X POST https://mybiz.pike13.com/api/v3/webhooks \
-H 'Authorization: Bearer XXXXXX' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
  "data": {
    "type": "webhooks",
      "attributes": {
        "target": "https://target.example.com",
        "topic": "person.created"
      }
    }
  }'

RESPONSE
HTTP/1.1 201 Created
Content-Type: application/vnd.api+json
{ "data": { "id": "5", "type": "webhooks", "links": { "self": "https://mybiz.pike13.com/api/v3/webhooks/5" }, "attributes": { "account_id": 1, "business_id": 2, "topic": "person.created", "target": "https://target.example.com", "name": null, "description": null } } }

PATCH /api/v3/webhooks/:id

Update a specific webhook. account_id and business_id are immutable.

Show curl example

REQUEST
$ curl -X PATCH https://mybiz.pike13.com/api/v3/webhooks/2 \
-H 'Authorization: Bearer XXXXXX' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
  "data": {
    "id": "2",
    "type": "webhooks",
      "attributes": {
        "target": "https://other.target.com"
      }
    }
  }'

RESPONSE
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{ "data": { "id": "2", "type": "webhooks", "links": { "self": "https://mybiz.pike13.com/api/v3/webhooks/2" }, "attributes": { "account_id": 1, "business_id": 2, "topic": "person.created", "target": "https://other.target.com", "name": null, "description": null } } }

DELETE /api/v3/webhooks/:id

Deletes a specific webhook.

Show curl example

REQUEST
$ curl -X DELETE https://mybiz.pike13.com/api/v3/webhooks/2 \
-H 'Authorization: Bearer XXXXXX'

RESPONSE
HTTP/1.1 204 No Content