Apideck Vault is here!Learn more

Search docs

Webhook API Reference

Webhook API traffic. Add monitoring to every API call with the Proxy API.

Introduction

Welcome to the Webhook API.

Authentication

apiKey

To use API you have to sign up and get your own API key. Unify API accounts have sandbox mode and live mode API keys. To change modes just use the appropriate key to get a live or test object. You can find your API keys on the unify settings of your Apideck app. Your Apideck application_id can also be found on the same page.

Authenticate your API requests by including your test or live secret API key in the request header.

  • Bearer authorization header: Authorization: Bearer <your-apideck-api-key>
  • Application id header: x-apideck-app-id: <your-apideck-app-id>

You should use the public keys on the SDKs and the secret keys to authenticate API requests.

Do not share or include your secret API keys on client side code. Your API keys carry significant privileges. Please ensure to keep them 100% secure and be sure to not share your secret API keys in areas that are publicly accessible like GitHub.

Learn how to set the Authorization header inside Postman https://learning.postman.com/docs/postman/sending-api-requests/authorization/#api-key

Go to Unify to grab your API KEY https://app.apideck.com/unify/api-keys

Security Scheme Type API Key
Header parameter name Authorization

Webhooks

The Webhooks model

idstring
descriptionstring

An optional description of what the webhook is used for.

statusstring
required
  • Enum:
  • enabled
  • disabled

The status of the webhook.

urlstring
required

The URL of the webhook endpoint.

updated_atstring
created_atstring

Webhooks example

{}

List webhooks

get/webhook/webhooks

List webhooks

Authorizations:

Header parameters

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). See the full list in the connector section. Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

cursorstring

Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.

limitinteger[ 1 .. 200 ]
Default:20

Number of records to return

Responses

200Webhooks
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Request example

Node

import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID'
})

try {
  const { data } = await apideck.webhook.webhooksAll({})
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "data": [
    {
      "id": "1234",
      "description": "This is a webhook. It listens to connection events",
      "status": "enabled",
      "url": "https://example.com/my/webhook/endpoint",
      "updated_at": "2020-09-30T07:43:32.000Z",
      "created_at": "2020-09-30T07:43:32.000Z",
      "events": [
        "vault.connection.created",
        "vault.connection.updated"
      ]
    }
  ],
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    }
  },
  "links": {
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
  }
}

Create webhook

post/webhook/webhooks

Create webhook

Authorizations:

Header parameters

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). See the full list in the connector section. Only needed when a consumer has activated multiple integrations for a Unified API.

Request body schema

application/json
statusstring
required
  • Enum:
  • enabled
  • disabled

The status of the webhook.

urlstring
required

The URL of the webhook endpoint.

eventsstrings
required
  • Enum:
  • *
  • vault.connection.created
  • vault.connection.updated
  • vault.connection.deleted

The list of subscribed events for this webhook. [’*’] indicates that all events are enabled.

descriptionstring

An optional description of what the webhook is used for.

Responses

201Webhooks
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Request example

{
  "description": "This is a webhook. It listens to connection events",
  "status": "enabled",
  "url": "https://example.com/my/webhook/endpoint",
  "events": [
    "vault.connection.created",
    "vault.connection.updated"
  ]
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "data": {
    "id": "1234",
    "description": "This is a webhook. It listens to connection events",
    "status": "enabled",
    "url": "https://example.com/my/webhook/endpoint",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z",
    "events": [
      "vault.connection.created",
      "vault.connection.updated"
    ]
  }
}

Get webhook

get/webhook/webhooks/{id}

Get webhook

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). See the full list in the connector section. Only needed when a consumer has activated multiple integrations for a Unified API.

Responses

200Webhooks
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Request example

Node

import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID'
})

try {
  const { data } = await apideck.webhook.webhooksOne({
    id: 'id_example'
  })
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "data": {
    "id": "1234",
    "description": "This is a webhook. It listens to connection events",
    "status": "enabled",
    "url": "https://example.com/my/webhook/endpoint",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z",
    "events": [
      "vault.connection.created",
      "vault.connection.updated"
    ]
  }
}

Update webhook

patch/webhook/webhooks/{id}

Update webhook

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). See the full list in the connector section. Only needed when a consumer has activated multiple integrations for a Unified API.

Request body schema

application/json
descriptionstring

An optional description of what the webhook is used for.

statusstring
  • Enum:
  • enabled
  • disabled

The status of the webhook.

urlstring

The URL of the webhook endpoint.

eventsstrings
  • Enum:
  • *
  • vault.connection.created
  • vault.connection.updated
  • vault.connection.deleted

The list of subscribed events for this webhook. [’*’] indicates that all events are enabled.

Responses

200Webhooks
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Request example

{
  "description": "This is a webhook. It listens to connection events",
  "status": "enabled",
  "url": "https://example.com/my/webhook/endpoint",
  "events": [
    "vault.connection.created",
    "vault.connection.updated"
  ]
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "data": {
    "id": "1234",
    "description": "This is a webhook. It listens to connection events",
    "status": "enabled",
    "url": "https://example.com/my/webhook/endpoint",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z",
    "events": [
      "vault.connection.created",
      "vault.connection.updated"
    ]
  }
}

Delete webhook

delete/webhook/webhooks/{id}

Delete webhook

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-app-idstring
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). See the full list in the connector section. Only needed when a consumer has activated multiple integrations for a Unified API.

Responses

200Webhooks
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Request example

Node

import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID'
})

try {
  const { data } = await apideck.webhook.webhooksDelete({
    id: 'id_example'
  })
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "data": {
    "id": "1234",
    "description": "This is a webhook. It listens to connection events",
    "status": "enabled",
    "url": "https://example.com/my/webhook/endpoint",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z",
    "events": [
      "vault.connection.created",
      "vault.connection.updated"
    ]
  }
}

List event logs

get/webhook/logs

List event logs

Authorizations:

Header parameters

x-apideck-app-idstring
required

The ID of your Unify application

Query parameters

cursorstring

Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.

limitinteger[ 1 .. 200 ]
Default:20

Number of records to return

filterobjectfilter[status_code]=201

Filter results

Responses

200EventLogs
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Request example

Node

import { Apideck } from '@apideck/node'

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID'
})

try {
  const { data } = await apideck.webhook.eventLogsAll({})
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "data": [
    {
      "id": "1d174c4d-fe9e-4377-a76c-6da22fe9cd87",
      "status_code": 200,
      "success": true,
      "error_message": "Forbidden",
      "application_id": "1111",
      "consumer_id": "test_consumer_id",
      "unified_api": "crm",
      "service": {
        "id": "101-data-solution",
        "name": "101 Data Solution"
      },
      "endpoint": "https://example.com/my/webhook/endpoint",
      "event_type": "vault.connection.updated",
      "execution_attempt": 3,
      "http_method": "GET",
      "timestamp": "2021-07-12T14:26:17.420Z",
      "entity_type": "Connection",
      "request_body": "{\"entity\":{\"id\":\"2222+test_user_id\",\"application_id\":\"2222\",\"consumer_id\":\"test_user_id\",\"name\":\"ActiveCampaign\",\"icon\":\"https://res.cloudinary.com/apideck/image/upload/v1529455970/catalog/activecampaign/icon128x128.png\",\"logo\":\"https://www.activecampaign.com/site/assets/social-2x.png\",\"unified_api\":\"crm\",\"service_id\":\"activecampaign\",\"auth_type\":\"apiKey\",\"enabled\":true,\"tag_line\":\"Integrated email marketing, marketing automation, and small business CRM. Save time while growing your business with sales automation.\",\"website\":\"https://www.activecampaign.com/\",\"settings\":{\"instance_url\":\"https://eu28.salesforce.com\",\"base_url\":\"https://updated.api-us1.com\"},\"metadata\":{\"plan\":\"enterprise\",\"account\":{\"name\":\"My Company\"}},\"state\":\"callable\",\"created_at\":\"2021-09-10T10:39:49.628Z\",\"updated_at\":\"2021-09-10T10:39:52.715Z\"},\"entityType\":\"Connection\"}",
      "response_body": "{\"status\":\"OK\"}"
    }
  ],
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    }
  },
  "links": {
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
  }
}

Connection

Connection Created Webhook

postConnectionCreated

Connection Created

Authorizations:

Request body schema

application/json
entityobject
entity_typestring

Responses

200Return a 200 status to indicate that the data was received successfully

Request example

Payload

{
  "entity": {
    "name": "Salesforce",
    "icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
    "logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
    "service_id": "teamleader",
    "unified_api": "crm",
    "consumer_id": "test_user_id",
    "auth_type": "oauth2",
    "enabled": true,
    "settings": {
      "instance_url": "https://eu28.salesforce.com"
    },
    "metadata": {
      "account": {
        "name": "My Company",
        "id": "c01458a5-7276-41ce-bc19-639906b0450a"
      },
      "plan": "enterprise"
    },
    "created_at": "2020-09-19T12:18:37.071Z",
    "updated_at": "2020-09-19T12:18:37.071Z",
    "state": "authorized"
  },
  "entity_type": "Connection"
}

Connection Updated Webhook

postConnectionUpdated

Connection Updated

Authorizations:

Request body schema

application/json
entityobject
entity_typestring

Responses

200Return a 200 status to indicate that the data was received successfully

Request example

Payload

{
  "entity": {
    "name": "Salesforce",
    "icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
    "logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
    "service_id": "teamleader",
    "unified_api": "crm",
    "consumer_id": "test_user_id",
    "auth_type": "oauth2",
    "enabled": true,
    "settings": {
      "instance_url": "https://eu28.salesforce.com"
    },
    "metadata": {
      "account": {
        "name": "My Company",
        "id": "c01458a5-7276-41ce-bc19-639906b0450a"
      },
      "plan": "enterprise"
    },
    "created_at": "2020-09-19T12:18:37.071Z",
    "updated_at": "2020-09-19T12:18:37.071Z",
    "state": "authorized"
  },
  "entity_type": "Connection"
}

Connection Deleted Webhook

postConnectionDeleted

Connection Deleted

Authorizations:

Request body schema

application/json
entityobject
entity_typestring

Responses

200Return a 200 status to indicate that the data was received successfully

Request example

Payload

{
  "entity": {
    "name": "Salesforce",
    "icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
    "logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
    "service_id": "teamleader",
    "unified_api": "crm",
    "consumer_id": "test_user_id",
    "auth_type": "oauth2",
    "enabled": true,
    "settings": {
      "instance_url": "https://eu28.salesforce.com"
    },
    "metadata": {
      "account": {
        "name": "My Company",
        "id": "c01458a5-7276-41ce-bc19-639906b0450a"
      },
      "plan": "enterprise"
    },
    "created_at": "2020-09-19T12:18:37.071Z",
    "updated_at": "2020-09-19T12:18:37.071Z",
    "state": "authorized"
  },
  "entity_type": "Connection"
}

Connection Callable Webhook

postConnectionCallable

Connection Callable

Authorizations:

Request body schema

application/json
entityobject
entity_typestring

Responses

200Return a 200 status to indicate that the data was received successfully

Request example

Payload

{
  "entity": {
    "name": "Salesforce",
    "icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
    "logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
    "service_id": "teamleader",
    "unified_api": "crm",
    "consumer_id": "test_user_id",
    "auth_type": "oauth2",
    "enabled": true,
    "settings": {
      "instance_url": "https://eu28.salesforce.com"
    },
    "metadata": {
      "account": {
        "name": "My Company",
        "id": "c01458a5-7276-41ce-bc19-639906b0450a"
      },
      "plan": "enterprise"
    },
    "created_at": "2020-09-19T12:18:37.071Z",
    "updated_at": "2020-09-19T12:18:37.071Z",
    "state": "authorized"
  },
  "entity_type": "Connection"
}