The Webhooks API is organized around REST and is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients, and we support cross-origin resource sharing to allow you to interact securely with our API from a client-side web application (though you should remember to use a client token when using API calls in client-side code). JSON will be returned in all responses from the API, including errors.
All API requests must be send over SSL. The base URL is https://api.webhooks.io which will hit our US East data center. In the near future, we are looking to add region based endpoints as well.
Each API request will include a JSON response.
You authenticate to the Webhooks API by providing one of your API keys in the request. You can manage your API keys from your account. You can have multiple API keys active at one time. Your API keys carry many privileges, so be sure to keep them secret!
Authentication to the API can occur via a header value or via a query string parameter.
curl -X GET -H Authorization:'Bearer {your-api-token}' https://api.webhooks.io/v1/accounts/{account_id}/users
curl -X GET https://api.webhooks.io/v1/accounts/{account_id}/users?_token={your-api-token}
When we make backwards-incompatible changes to the API, we release new versions. The current version is v1. The version should be specified in the URL following the domain name, eg: https://api.webhooks.io/v1/
Content TBD...
Some intro text into the methods
When you sign up with Webhooks.io you will be provided one account - your Master Account. However, you have the ability to create more accounts called sub-accounts. These sub-accounts are useful for segmenting your clients if you are using the platform to deliver webhooks for your application.
###Account Registration
POST /v1/register
Creates a new account. This is the same call that is used when a user registers from webhooks.io.
name
- Account/Company name (example: Sample Company, LLC)first_name
(required) - First name of the primary user on the account. (example: Bob)last_name
(required) - Last name of the primary user on the account. (example: Smith)email_address
(required) - The primary email address for the user on the account. (example: bob.smith@example.com)password
(required) - The password for the user on the account (example: mypassword)password_confirm
(required) - The confirmation entry for the password. (example: mypassword)plan_id
(required) - The plan id selected for the account. Use /plans resource for a list of all plans. (example: free)card_number
- The credit card number to be used for billing.card_month
- The expiration month for the credit card.card_year
- The expiration year for the credit card.card_cvc
- The CVC on the credit card.coupon
- A coupon code to be used.referrer
- The location the user came from.email_verification_callback_url
- The URL for where the user should be directed to upon verification of the email address. A query param of ?status=[success,failure] will be appended to this URL.invite_code
- The invite code used to create account.
{
name: 'Sample Company, LLC'
first_name: 'Bob'
last_name: 'Smith'
email_address: 'bob.smith@example.com'
password: 'mypassword'
password_confirm: 'mypassword'
plan_id: 'free'
}
###Create Sub Account
POST /v1/accounts/:account_id/subaccounts
Creates a sub account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
name
(required) - First name of the primary user on the account. (example: Bob)account_key
- Identifier from another system. (example: acct123456789)
{
name: 'Bob'
account_key: 'acct123456789'
}
###List Sub Accounts
GET /v1/accounts/:account_id/subaccounts
Lists all sub accounts user an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
account_key
- Identifier from another system. (example: acct123456789)
###List Accounts
GET /v1/accounts
Lists all accounts.
account_key
- Identifier from another system. (example: acct123456789)
###Get Account
GET /v1/accounts/:account_id
Returns the details of a specific account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
###Update Account
PUT /v1/accounts/:account_id
Updates the details on an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Friendly name for the account. (example: Bob)account_key
- Identifier from another system. (example: acct123456789)
{
name: 'Bob'
account_key: 'acct123456789'
}
###Delete Account
DELETE /v1/accounts/:account_id
Deletes an account or sub account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
###Get My Embedded View HTML
POST /v1/accounts/:account_id/embedded-view-html
Returns the HTML for the embedded view.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
bucket_key
- The bucket key the client token should be generated for. This can be an arbitrary value that maps back to your system. (example: development)paths
- The permitted paths.css_url
- URL to a css file that will be applied to the application styles.default_tab
- The default tab to show.show_introduction
- If the introduction should be displayed.introduction_url
- The URL to the actual introduction.element_id
- The element id for the manager to populate.api_url
- The API URL to use. (example: https://api.webhooks.io)embedded_url
- The embedded javascript file to use. (example: https://embedded.webhooks.io/js/embedded.js)
{
bucket_key: 'development'
api_url: 'https://api.webhooks.io'
embedded_url: 'https://embedded.webhooks.io/js/embedded.js'
}
###Create Application
POST /v1/accounts/:account_id/applications
Adds an application to an account
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the bucket. (example: My Awesome Application)categories
(required) - The categories the application belongs to. (example: ecommerce,payment)overview
(required) - A short description of the application - 255 characters or less. (example: This is the details of my awesome application.)description
(required) - A full description of the application. (example: This is the details of my awesome application.)homepage_url
(required) - The url of the application homepage. (example: http://mywebsite.com)api_url
(required) - The url to the API documention for the application. (example: http://api.mywebsite.com)logo_url
(required) - The url to the logo. (example: http://mywebsite.com/webhooksio/logo.jpg)active
(required) - If the application should be active (viewable) or not. (example: true)
{
name: 'My Awesome Application'
categories: 'ecommerce,payment'
overview: 'This is the details of my awesome application.'
description: 'This is the details of my awesome application.'
homepage_url: 'http://mywebsite.com'
api_url: 'http://api.mywebsite.com'
logo_url: 'http://mywebsite.com/webhooksio/logo.jpg'
active: 'true'
}
###Update Application
PUT /v1/accounts/:account_id/applications/:application_id
Updates an Application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the bucket. (example: My Awesome Application)categories
(required) - The categories the application belongs to. (example: ecommerce,payment)overview
(required) - A short description of the application - 255 characters or less. (example: This is the details of my awesome application.)description
(required) - A full description of the application. (example: This is the details of my awesome application.)homepage_url
(required) - The url of the application homepage. (example: http://mywebsite.com)api_url
(required) - The url to the API documention for the application. (example: http://api.mywebsite.com)logo_url
(required) - The url to the logo. (example: http://mywebsite.com/webhooksio/logo.jpg)active
(required) - If the application should be active (viewable) or not.
{
name: 'My Awesome Application'
categories: 'ecommerce,payment'
overview: 'This is the details of my awesome application.'
description: 'This is the details of my awesome application.'
homepage_url: 'http://mywebsite.com'
api_url: 'http://api.mywebsite.com'
logo_url: 'http://mywebsite.com/webhooksio/logo.jpg'
}
###Get Application
GET /v1/accounts/:account_id/applications/:application_id
Returns the details for a specfic application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
###List Applications
GET /v1/accounts/:account_id/applications
Returns a collection of applications for an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
###Delete Application
DELETE /v1/accounts/:account_id/applications/:application_id
Deletes an application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
###Create Application Version
POST /v1/accounts/:account_id/applications/:application_id/versions
Adds a version to an application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
key
(required) - The key/id for this version. (example: 1.1)release_date
(required) - The date this version was released. (example: 2015-01-01)version_json
(required) - The complete JSON definition for the version. (example: [object Object])examples_json
(required) - The complete JSON definition for the version examples/recipes (example: [object Object])active
(required) - If the version should be active (viewable) or not. (example: true)
{
key: '1.1'
release_date: '2015-01-01'
version_json: '[object Object]'
examples_json: '[object Object]'
active: 'true'
}
###Update Application Version
PUT /v1/accounts/:account_id/applications/:application_id/versions/:application_version_id
Updates an application version.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)application_version_id
- (example: AVe987d754d82a419e8c54c2185ed0ef29)
key
(required) - The key/id for this version. (example: 1.1)release_date
(required) - The date this version was released.version_json
(required) - The complete JSON definition for the version.examples_json
(required) - The complete JSON definition for the version examples/recipiesactive
(required) - If the version should be active (viewable) or not.
{
key: '1.1'
}
###Get Application Version
GET /v1/accounts/:account_id/applications/:application_id/versions/:application_version_id
Returns the details for a specfic application version.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)application_version_id
- (example: AVe987d754d82a419e8c54c2185ed0ef29)
###List Application Versions
GET /v1/accounts/:account_id/applications/:application_id/versions
Returns a collection of versions for an application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
###Delete Application Version
DELETE /v1/accounts/:account_id/applications/:application_id/versions/:application_version_id
Deletes a version for an application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)application_version_id
- (example: AVe987d754d82a419e8c54c2185ed0ef29)
###Create Subscription
POST /v1/accounts/:account_id/subscriptions
Creates a new subscription for an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
user_id
(required) - The user that is logged into the system. (example: USe987d754d82a419e8c54c2185ed0ef29)plan_id
(required) - The ID of the plan that the subscription is to be started for. (example: plan-free-01)payment_token
- The temporary stripe payment token used for the payment of the subscription. This is required if the value of the plan being added is greater than $0. (example: tok_17mJQS2eZvKYlo2CFZnKpZNx)coupon_code
- A coupon code to apply to this subscription. (example: my-coupon)
{
user_id: 'USe987d754d82a419e8c54c2185ed0ef29'
plan_id: 'plan-free-01'
payment_token: 'tok_17mJQS2eZvKYlo2CFZnKpZNx'
coupon_code: 'my-coupon'
}
###Update Subscription
PUT /v1/accounts/:account_id/subscriptions
Updates the details of a subscription.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
user_id
- The user that is logged into the system. This should be passed to change the billing contact on the account. (example: USe987d754d82a419e8c54c2185ed0ef29)plan_id
- The ID of the plan that the subscription should be change to. (example: plan-free-01)payment_token
- The temporary stripe payment token used for the payment of the subscription. This only needs to be passed when changing the credit card info. (example: tok_17mJQS2eZvKYlo2CFZnKpZNx)coupon_code
- A coupon code to apply to this subscription. (example: my-coupon)end_of_term
- If the change should take effect at the end of the term, or now. Defaults to now - false. (example: false)
{
user_id: 'USe987d754d82a419e8c54c2185ed0ef29'
plan_id: 'plan-free-01'
payment_token: 'tok_17mJQS2eZvKYlo2CFZnKpZNx'
coupon_code: 'my-coupon'
end_of_term: 'false'
}
###Get Subscription Details
GET /v1/accounts/:account_id/subscriptions
Returns the details of a subscription for the customer. Does not take pending changes into account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
###List Invoices
GET /v1/accounts/:account_id/invoices
Returns a list of all invoices for an account
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
###Get Invoice
GET /v1/accounts/:account_id/invoices/:invoice_id
Returns the URL to a PDF version of an invoice.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)invoice_id
- (example: IV10)
###Cancel Subscription
DELETE /v1/accounts/:account_id/subscriptions
Cancels the current subscription, essentially moving it back to the default free plan.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
end_of_term
- If the change should take effect at the end of the term, or now. Defaults to now - false. (example: false)
###Create Bucket
POST /v1/accounts/:account_id/buckets
Adds a bucket to an account
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the bucket. (example: My Bucket)key
- The key for the bucket. (example: my-bucket)
{
name: 'My Bucket'
key: 'my-bucket'
}
###Update Bucket
PUT /v1/accounts/:account_id/buckets/:bucket_id
Updates a bucket.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)bucket_id
- (example: BUe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the bucket. (example: My Bucket)key
- The key for the bucket. (example: my-bucket)
{
name: 'My Bucket'
key: 'my-bucket'
}
###Get Bucket
GET /v1/accounts/:account_id/buckets/:bucket_id
Returns the details for a specfic bucket.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)bucket_id
- (example: BUe987d754d82a419e8c54c2185ed0ef29)
expand
- If the results should be expanded to include the inputs and destinations (example: true)include_stats
- Include the traffic summary. (example: true)
###List Buckets
GET /v1/accounts/:account_id/buckets
Returns a collection of buckets for an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
expand
- If the results should be expanded to include the inputs and destinations (example: true)
###Delete Bucket
DELETE /v1/accounts/:account_id/buckets/:bucket_id
Deletes a bucket.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)bucket_id
- (example: BUe987d754d82a419e8c54c2185ed0ef29)
###Create Destination
POST /v1/accounts/:account_id/inputs/:input_id/destinations
Adds an destination for an input.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the input. (example: My Final Destination)endpoint_url
(required) - The URL the messages should be sent to. (example: http://mydomain.com/webhook-endpoint)delivery_order
- How the deliveries should operate. Valid options are random or fifo. The default is random (example: random)status
- The status of the bucket, defaults to active.message_method
- The HTTP method the message will be sent with. If null the method will pass through. (example: GET)event_filters
- The events that this input should be triggerd for. This can be a comma delimited list of events. (example: account.created,message.sent)authentication_type
- The type of authentication to apply to incoming requests.retry_policy_id
- The retry algorithm that will be used for failed attempts.retry_count
- The number of times the hook will be retried.retry_interval
- The interval for which the retries will be set.verify_ssl
- Ensure the SSL certificate is trusted and valid. If false, this will bypass this protection.headers_to_include
- A comma delimited list of custom headers to include.header_prefix
- The prefix of the custom headers that will be included. The default is Webhooks (example: Webhooks)alert_on_failure
- A comma delimited list of email addresses to alert when a webhook enters the failed status. (example: bob@mail.com,john@email.com)recipe_id
- If a recipe should be applied to messages coming through this destination it can be specified. (example: REe987d754d82a419e8c54c2185ed0ef29)rate_limit
- The max rate for webhooks to be relayed. This will default to your plan max. (example: 5)
{
name: 'My Final Destination'
endpoint_url: 'http://mydomain.com/webhook-endpoint'
delivery_order: 'random'
message_method: 'GET'
event_filters: 'account.created,message.sent'
header_prefix: 'Webhooks'
alert_on_failure: 'bob@mail.com,john@email.com'
recipe_id: 'REe987d754d82a419e8c54c2185ed0ef29'
rate_limit: '5'
}
###Update Destination
PUT /v1/accounts/:account_id/destinations/:destination_id
Updates the details of an destination.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)destination_id
- (example: OUe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the input. (example: My Final Destination)endpoint_url
(required) - The URL the messages should be sent to.delivery_order
- How the deliveries should operate. Valid options are random or fifo. The default is random (example: random)status
- The status of the bucket, defaults to active.message_method
- The HTTP method the message will be sent with. If null the method will pass through. (example: GET)event_filters
- The events that this input should be triggerd for. This can be a comma delimited list of events. (example: account.created,message.sent)authentication_type
- The type of authentication to apply to incoming requests.retry_policy_id
- The retry algorithm that will be used for failed attempts.retry_count
- The number of times the hook will be retried.retry_interval
- The interval for which the retries will be set.verify_ssl
- Ensure the SSL certificate is trusted and valid. If false, this will bypass this protection.headers_to_include
- A comma delimited list of custom headers to include.header_prefix
- The prefix of the custom headers that will be included. The default is Webhooks (example: Webhooks)alert_on_failure
- A comma delimited list of email addresses to alert when a webhook enters the failed status. (example: bob@mail.com,john@email.com)recipe_id
- If a recipe should be applied to messages coming through this destination it can be specified. (example: REe987d754d82a419e8c54c2185ed0ef29)rate_limit
- The max rate for webhooks to be relayed. This will default to your plan max. (example: 5)
{
name: 'My Final Destination'
delivery_order: 'random'
message_method: 'GET'
event_filters: 'account.created,message.sent'
header_prefix: 'Webhooks'
alert_on_failure: 'bob@mail.com,john@email.com'
recipe_id: 'REe987d754d82a419e8c54c2185ed0ef29'
rate_limit: '5'
}
###Get Destination
GET /v1/accounts/:account_id/destinations/:destination_id
Returns the details for a specific destination.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)destination_id
- (example: OUe987d754d82a419e8c54c2185ed0ef29)
include_certificate_data
- Will return the imported SSL Certificate that will be used, if any. (Default is false) (example: true)
###List Destination
GET /v1/accounts/:account_id/inputs/:input_id/destinations
Returns a collection of destinations.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
destination_key
- Name for the bucket.
###Delete Destination
DELETE /v1/accounts/:account_id/destinations/:destination_id
Deletes an destination.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)destination_id
- (example: OUe987d754d82a419e8c54c2185ed0ef29)
###Gateway Auth Details
GET /v1/gateway/authentication/:type/:option
Returns the details for a specific authentication type.
type
- (example: input)option
- (example: basic)
###Gateway Auth Options
GET /v1/gateway/authentication/:type
Returns all the options for the gateway authentication.
type
- (example: input)
###Request Gateway
POST /v1/:input_name/:input_id
This is the gateway for accepting incoming requests.
input_name
- (example: sample-input)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
###Request Gateway (Dynamic)
POST /:input_id/:target_url
This is the gateway for accepting dynamic incoming webhook requests requests.
input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)target_url
- (example: /demo.tld-domain.com/receiver/path)
###Request Gateway
HEAD /v1/:input_name/:input_id
This is the gateway for accepting incoming requests.
input_name
- (example: sample-input)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
###Resend Request
POST /v1/accounts/:account_id/resend
Duplicates the messages and attempts to resends them.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
outgoing_message_ids
(required) - An array of all the outgoing message ids that should be resent.
{
}
###Retry Request
POST /v1/retry
Manually retries a webhook request.
###Create Input
POST /v1/accounts/:account_id/inputs
Adds an input to an account
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
bucket_id
(required) - The bucket the input belongs to (example: BUe987d754d82a419e8c54c2185ed0ef29)name
(required) - Name for the input. (example: My Bucket)status
- The status of the bucket, defaults to active.event_location
- The location of the event, header, payload, query param, etc (example: payload)event_path
- The path to the value that specifies what type of event is coming in. This starts with the value msg. (example: msg.event)event_filters
- The events that this input should be triggerd for. This can be a comma delimited list of events. (example: account.created,message.sent)delivery_mode
- The mode the request should be made in. Valid options include sync and async.response_code
- HTTP Response code to provide upon hook receipt - defaults to 200response_content
- Any content that should be provided upon hook receipt.response_content_type
- The content type that should be returned upon hook receipt, this should mirror the data in the response_content variable. (example: application/json)authentication_failures
- How to handle authentication failures.authentication_type
- The type of authentication to apply to incoming requests.recipe_id
- If a recipe should be applied to messages coming through this input it can be specified. (example: REe987d754d82a419e8c54c2185ed0ef29)type
- The type of input that is being created. Valid values include dynamic or static. Default is static. (example: static)
{
bucket_id: 'BUe987d754d82a419e8c54c2185ed0ef29'
name: 'My Bucket'
event_location: 'payload'
event_path: 'msg.event'
event_filters: 'account.created,message.sent'
response_content_type: 'application/json'
recipe_id: 'REe987d754d82a419e8c54c2185ed0ef29'
type: 'static'
}
###Update Input
PUT /v1/accounts/:account_id/inputs/:input_id
Updates the details for an input.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the input. (example: My Bucket)status
- The status of the bucket, defaults to active.event_location
- The location of the event, header, payload, query param, etc (example: payload)event_path
- The path to the value that specifies what type of event is coming in. This starts with the value msg. (example: msg.event)event_filters
- The events that this input should be triggerd for. This can be a comma delimited list of events. (example: account.created,message.sent)delivery_mode
- The mode the request should be made in. Valid options include sync and async.response_code
- HTTP Response code to provide upon hook receipt - defaults to 200response_content
- Any content that should be provided upon hook receipt.response_content_type
- The content type that should be returned upon hook receipt, this should mirror the data in the response_content variable. (example: application/json)authentication_failures
- How to handle authentication failures.authentication_type
- The type of authentication to apply to incoming requests.recipe_id
- If a recipe should be applied to messages coming through this input it can be specified. (example: REe987d754d82a419e8c54c2185ed0ef29)
{
name: 'My Bucket'
event_location: 'payload'
event_path: 'msg.event'
event_filters: 'account.created,message.sent'
response_content_type: 'application/json'
recipe_id: 'REe987d754d82a419e8c54c2185ed0ef29'
}
###Get Input
GET /v1/accounts/:account_id/inputs/:input_id
Returns the details for a specfic input.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
###List Inputs
GET /v1/accounts/:account_id/buckets/:bucket_id/inputs
Returns a collection of inputs for an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)bucket_id
- (example: BUe987d754d82a419e8c54c2185ed0ef29)
key
- Name for the bucket.event_filter
- The event that should be filtered on.
###Delete Input
DELETE /v1/accounts/:account_id/inputs/:input_id
Deletes an input.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
###Get Incoming Message
GET /v1/accounts/:account_id/incoming/:incoming_message_id
Returns the details regarding an incoming message.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)incoming_message_id
- (example: IMe987d754d82a419e8c54c2185ed0ef29)
include_outgoing_messages
- If the outgoing messages should be included as well.
###Get Outgoing Message
GET /v1/accounts/:account_id/outgoing/:outgoing_message_id
Returns the details regarding an outgoing message, including all attempts
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)outgoing_message_id
- (example: OMe987d754d82a419e8c54c2185ed0ef29)
###Get Outgoing Message Attempt
GET /v1/accounts/:account_id/attempts/:attempt_id
Returns the details regarding an attempt for an outgoing message
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)attempt_id
- (example: ATe987d754d82a419e8c54c2185ed0ef29)
###Get Outgoing Message Status Details
GET /v1/accounts/:account_id/outgoing/:outgoing_message_id/status
Returns the basic information regarding the status of the outgoing request.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)outgoing_message_id
- (example: OMe987d754d82a419e8c54c2185ed0ef29)
###Create Consumer
POST /v1/accounts/:account_id/applications/:application_id/consumers
Creates a consumer for an application
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
consumer_id
(required) - The id for the consumer of the application. This id should be the unique id from the application provider that identifies this customer/consumer of the application. (example: my-internal-customer-id)bucket_key
(required) - The bucket key that identifies the container for this consumer, if this does not exist it will be created. Default is default. (example: default)name
(required) - The name of the consumer. This could be the account name within the provider application for example. (example: ACME Corp, Inc.)
{
consumer_id: 'my-internal-customer-id'
bucket_key: 'default'
name: 'ACME Corp, Inc.'
}
###Get Consumers
GET /v1/accounts/:account_id/applications/:application_id/consumers
Returns a list of all the consumers for a particular application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)
###Update Consumer
PUT /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id
Updates the details for a particular consumer.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)
name
(required) - The name of the consumer. This could be the account name within the provider application for example. (example: ACME Corp, Inc.)
{
name: 'ACME Corp, Inc.'
}
###Get Consumer
GET /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id
Get the details for a particular consumer.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)
###Delete Consumer
DELETE /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id
Removes a consumer from a particular application.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)
###Create Consumer Destination
POST /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/destinations
Adds an destination for a consumer.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)
name
(required) - Name for the destination. (example: My Final Destination)endpoint_url
(required) - The URL the messages should be sent to. (example: http://mydomain.com/webhook-endpoint)delivery_order
- How the deliveries should operate. Valid options are random or fifo. The default is random (example: random)status
- The status of the bucket, defaults to active.message_method
- The HTTP method the message will be sent with. If null the method will pass through. (example: GET)event_filters
- The events that this input should be triggerd for. This can be a comma delimited list of events. (example: account.created,message.sent)authentication_type
- The type of authentication to apply to incoming requests.retry_policy_id
- The retry algorithm that will be used for failed attempts.retry_count
- The number of times the hook will be retried.retry_interval
- The interval for which the retries will be set.verify_ssl
- Ensure the SSL certificate is trusted and valid. If false, this will bypass this protection.headers_to_include
- A comma delimited list of custom headers to include.header_prefix
- The prefix of the custom headers that will be included. The default is Webhooks (example: Webhooks)alert_on_failure
- A comma delimited list of email addresses to alert when a webhook enters the failed status. (example: bob@mail.com,john@email.com)recipe_id
- If a recipe should be applied to messages coming through this destination it can be specified. (example: REe987d754d82a419e8c54c2185ed0ef29)rate_limit
- The max rate for webhooks to be relayed. This will default to your plan max. (example: 5)
{
name: 'My Final Destination'
endpoint_url: 'http://mydomain.com/webhook-endpoint'
delivery_order: 'random'
message_method: 'GET'
event_filters: 'account.created,message.sent'
header_prefix: 'Webhooks'
alert_on_failure: 'bob@mail.com,john@email.com'
recipe_id: 'REe987d754d82a419e8c54c2185ed0ef29'
rate_limit: '5'
}
###Update Consumer Destination
PUT /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/destinations/:destination_id
Updates the details of an destination for a consumer.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)destination_id
- (example: OUe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the input. (example: My Final Destination)endpoint_url
(required) - The URL the messages should be sent to.delivery_order
- How the deliveries should operate. Valid options are random or fifo. The default is random (example: random)status
- The status of the bucket, defaults to active.message_method
- The HTTP method the message will be sent with. If null the method will pass through. (example: GET)event_filters
- The events that this input should be triggerd for. This can be a comma delimited list of events. (example: account.created,message.sent)authentication_type
- The type of authentication to apply to incoming requests.retry_policy_id
- The retry algorithm that will be used for failed attempts.retry_count
- The number of times the hook will be retried.retry_interval
- The interval for which the retries will be set.verify_ssl
- Ensure the SSL certificate is trusted and valid. If false, this will bypass this protection.headers_to_include
- A comma delimited list of custom headers to include.header_prefix
- The prefix of the custom headers that will be included. The default is Webhooks (example: Webhooks)alert_on_failure
- A comma delimited list of email addresses to alert when a webhook enters the failed status. (example: bob@mail.com,john@email.com)recipe_id
- If a recipe should be applied to messages coming through this destination it can be specified. (example: REe987d754d82a419e8c54c2185ed0ef29)rate_limit
- The max rate for webhooks to be relayed. This will default to your plan max. (example: 5)
{
name: 'My Final Destination'
delivery_order: 'random'
message_method: 'GET'
event_filters: 'account.created,message.sent'
header_prefix: 'Webhooks'
alert_on_failure: 'bob@mail.com,john@email.com'
recipe_id: 'REe987d754d82a419e8c54c2185ed0ef29'
rate_limit: '5'
}
###Get Consumer Destination
GET /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/destinations/:destination_id
Returns the details for a specific destination for a consumer.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)destination_id
- (example: OUe987d754d82a419e8c54c2185ed0ef29)
include_certificate_data
- Will return the imported SSL Certificate that will be used, if any. (Default is false) (example: true)
###List Consumer Destination
GET /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/destinations
Returns a collection of destinations for a consumer and bucket.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)input_id
- (example: INe987d754d82a419e8c54c2185ed0ef29)
destination_key
- Name for the bucket.
###Delete Consumer Destination
DELETE /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/destinations/:destination_id
Deletes a destination for a consumer.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)destination_id
- (example: OUe987d754d82a419e8c54c2185ed0ef29)
###Send webhook to consumer
POST /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/send/:bucket_key
Sends a webhook to a particular consumer of an application for the given bucket_key.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)bucket_key
- (example: development)
###Send webhook to consumer (Dynamic)
POST /:application_id/:consumer_id/:bucket_key/:target_url
Sends a webhook to a particular consumer of an application for the given application_id, bucket_key and dynamic URL.
application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)bucket_key
- (example: development)target_url
- (example: my.api.com/webhooks)
###Check consumer subscription
POST /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/check/:bucket_key
Checks to see if the consumer is subscribed to a given event or set of events. If the event query param is not passed the complete list of events will be returned.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)bucket_key
- (example: development)
event_type
(required) - The name of the event to check.include_destination_detail
- If the details of each subscribed destination should be returned.
{
}
###Create Client Token
POST /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/client-token
Generates a client token to be used with the embedded views.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)
bucket_key
- The bucket key the client token should be generated for. This can be an arbitrary value that maps back to your system. (example: development)paths
- The permitted paths.
{
bucket_key: 'development'
}
###Get Embedded View HTML
POST /v1/accounts/:account_id/applications/:application_id/consumers/:consumer_id/embedded-view-html
Returns the HTML for the embedded view.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)application_id
- (example: APe987d754d82a419e8c54c2185ed0ef29)consumer_id
- (example: my_customer_id)
bucket_key
- The bucket key the client token should be generated for. This can be an arbitrary value that maps back to your system. (example: development)paths
- The permitted paths.css_url
- URL to a css file that will be applied to the application styles.default_tab
- The default tab to show.show_introduction
- If the introduction should be displayed.introduction_url
- The URL to the actual introduction.element_id
- The element id for the manager to populate.api_url
- The API URL to use. (example: https://api.webhooks.io)embedded_url
- The embedded javascript file to use. (example: https://embedded.webhooks.io/js/embedded.js)
{
bucket_key: 'development'
api_url: 'https://api.webhooks.io'
embedded_url: 'https://embedded.webhooks.io/js/embedded.js'
}
###Create Recipe
POST /v1/accounts/:account_id/recipes
Adds a Recipe to an account
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the recipe. (example: My Recipe)sample_code
- Sample code used to pass to the recipe during editing to test script.type
(required) - The type of recipe, either input or destination. (example: input)notes
- Any notes required to help understand the recipe. (example: This is used to transform the payload to work with Slack webhooks.)recipe_draft
(required) - During development, this is the recipe that is saved. (example: return { x: 1, x: 2 };)run_on_each_attempt
- If the recipe should be run each time it is attempted. (example: true)
{
name: 'My Recipe'
type: 'input'
notes: 'This is used to transform the payload to work with Slack webhooks.'
recipe_draft: 'return { x: 1, x: 2 };'
run_on_each_attempt: 'true'
}
###Update Recipe
PUT /v1/accounts/:account_id/recipes/:recipe_id
Updates a Recipe.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)recipe_id
- (example: REe987d754d82a419e8c54c2185ed0ef29)
name
(required) - Name for the recipe. (example: My Recipe)sample_code
- Sample code used to pass to the recipe during editing to test script.notes
- Any notes required to help understand the recipe. (example: This is used to transform the payload to work with Slack webhooks.)recipe_draft
(required) - During development, this is the recipe that is saved. (example: return { x: 1, x: 2 };)run_on_each_attempt
- If the recipe should be run each time it is attempted. (example: true)
{
name: 'My Recipe'
notes: 'This is used to transform the payload to work with Slack webhooks.'
recipe_draft: 'return { x: 1, x: 2 };'
run_on_each_attempt: 'true'
}
###Publish Recipe
POST /v1/accounts/:account_id/recipes/:recipe_id/publish
Publishes the draft recipe so it can be used as the production recipe.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)recipe_id
- (example: REe987d754d82a419e8c54c2185ed0ef29)
###Get Recipe
GET /v1/accounts/:account_id/recipes/:recipe_id
Returns the details for a specfic recipe.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)recipe_id
- (example: REe987d754d82a419e8c54c2185ed0ef29)
###List Recipe
GET /v1/accounts/:account_id/recipes
Returns a collection of recipes for an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
type
- The type of recipe, either input or destination. (example: input)
###Delete Recipe
DELETE /v1/accounts/:account_id/recipes/:recipe_id
Deletes a Recipe.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)recipe_id
- (example: REe987d754d82a419e8c54c2185ed0ef29)
###Test Recipe
PUT /v1/accounts/:account_id/recipes/test
Provides the ability to test a recipe to ensure the output is correct. The recipe MUST be wrapped in 'function wh(){}' and return exit([data]) as shown in the sample below.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
sample_code
- Sample code to be used during the testing of this recipe. (example: [object Object])type
(required) - The type of recipe, either input or destination. (example: input)recipe
(required) - The recipe to be tested. (example: function wh(){ result.data = {"name": data.name, "client_id": 8000}; exit(result); })event_type
- The event type. (example: invoice.create)
{
sample_code: '[object Object]'
type: 'input'
recipe: 'function wh(){ result.data = {"name": data.name, "client_id": 8000}; exit(result); }'
event_type: 'invoice.create'
}
###Overview Report
GET /v1/accounts/:account_id/stats/overview
Returns a general overview.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
start_date
(required) - The start date for the data.end_date
(required) - The end date for the data.precision
(required) - The end date for the data.application_id
- The application id the data should be filtered with.bucket_id
- The end date for the data.destination_id
- The end date for the data.input_id
- The end date for the data.include_sub_accounts
- If sub account data should be included.
###Summary Report
GET /v1/accounts/:account_id/stats/summary
Returns a general summary report.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
start_date
- The start date for the data.end_date
- The end date for the data.bucket_id
- The end date for the data.destination_id
- The end date for the data.input_id
- The end date for the data.
###Request Log
GET /v1/accounts/:account_id/log
Returns a log of all messages.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
start_date
- The start date for the data. This can be an exact UTC date or a texted based time period. Valid text time periods can be found at: http://sugarjs.com/date_formats#text_formatsend_date
- The end date for the data. This can be an exact UTC date or a texted based time period. Valid text time periods can be found at: http://sugarjs.com/date_formats#text_formatsinput_id
-bucket_id
-http_status
-
###Import SSL Certificate
PUT /v1/accounts/:account_id/certificates
Imports an SSL cert into your account keystore so it can be used during webhook reqeusts. This can be useful for self-signed SSL certificates.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
domain
(required) - The domain for the certificate that you wish to import (example: api.webhooks.io)port
(required) - The port to use. (defaults to 443) (example: 443)
{
domain: 'api.webhooks.io'
port: '443'
}
###Get SSL Certificate
GET /v1/accounts/:account_id/certificates/:certificate_id
Get an imported SSL certificate.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)certificate_id
- (example: api.webhooks.io:443)
###List SSL Certificates
GET /v1/accounts/:account_id/certificates
Returns a collection of all the imported SSL certificates
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
###Delete SSL Certificate
DELETE /v1/accounts/:account_id/certificates/:certificate_id
Deletes an imported SSL certificate.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)certificate_id
- (example: api.webhooks.io:443)
###Login
PUT /v1/authenticate
Authenticates the users login credentials
email_address
(required) - The user's email address.password
(required) - The password supplied for login.
{
}
###Change Password
PUT /v1/accounts/:account_id/users/:user_id/change_password
Allows a user to change their password. Either the existing password or change key must be passed...and must match in order for this call to be successful.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
new_password
(required) - The new password for the account.new_confirm_password
(required) - A confirmation of the new password for their account.change_key
- The code that was supplied in the password change email to allow them to change their email.existing_password
- The current password on the user account.
{
}
###Lookup API Token
GET /v1/accounts/:account_id/users/:user_id/api-token
Provides a user a way to lookup their own API token. This is used when using ST or client-bearer-token authentication so the user can get a longer lasting API token. This operation can only be carried out for the currently authenticated user.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
###Reset Password
POST /v1/reset_password
Allows the user to request their password to be emailed to them. Really this provides them a link to the change password form.
email_address
(required) - The primary email address for the user on the account. (example: bob.smith@example.com)
{
email_address: 'bob.smith@example.com'
}
###Lookup Password Change Key
GET /v1/password_change_key/:password_change_key
Looks up the meta data for the password change key.
password_change_key
- (example: CKe987d754d82a419e8c54c2185ed0ef29)
###Create User
POST /v1/accounts/:account_id/users
Adds a user to an account.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)
first_name
(required) - First name of the primary user on the account. (example: Bob)last_name
(required) - Last name of the primary user on the account. (example: Smith)email_address
(required) - The primary email address for the user on the account. (example: bob.smith@example.com)password
(required) - The password for the user on the account (example: mypassword)permission_level
(required) - The permission level for the user account. (example: mypassword)timezone
(required) - The timezone the user is located in. Default is Etc/GTM (example: Etc/GTM)notify
(required) - If the user should be notified that an account has been created for them. (example: true)
{
first_name: 'Bob'
last_name: 'Smith'
email_address: 'bob.smith@example.com'
password: 'mypassword'
permission_level: 'mypassword'
timezone: 'Etc/GTM'
notify: 'true'
}
###Update User
PUT /v1/accounts/:account_id/users/:user_id
Updates a users account information.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
first_name
(required) - First name of the primary user on the account. (example: Bob)last_name
(required) - Last name of the primary user on the account. (example: Smith)email_address
(required) - The primary email address for the user on the account. (example: bob.smith@example.com)password
- The password for the user on the accounttimezone
(required) - The timezone the user is located in. Default is Etc/GMTpermission_level
- The permission level for the user account.
{
first_name: 'Bob'
last_name: 'Smith'
email_address: 'bob.smith@example.com'
}
###Get User
GET /v1/accounts/:account_id/users/:user_id
Returns the details for a specific user.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
###List Users
GET /v1/accounts/:account_id/users
Returns a collection of users.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
###Delete User
DELETE /v1/accounts/:account_id/users/:user_id
Deletes a user.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
###Verify Email Address
GET /v1/verify/:email_verification_key
Handles validating the email address once the user has clicked the validation link in an email.
email_verification_key
- (example: EV4d3dc5927f304df08ad36c5a3a893c52)
###Resend Verification Email
GET /v1/accounts/:account_id/users/:user_id/resend_verification
Resends a verification email for a user.
account_id
- (example: ACe987d754d82a419e8c54c2185ed0ef29)user_id
- (example: USe987d754d82a419e8c54c2185ed0ef29)
###Health Check
GET /v1/health
System health check
###Gets Plans
GET /v1/plans
Returns all the possible public plans.
###Get Plan
GET /v1/plans/:plan_id
Returns the details of a specific plan.
plan_id
- (example: starter)
###Get Timezones
GET /v1/util/timezones
Returns all valid timezones.
###Gets Retry Policies
GET /v1/retry_policies
Returns the possible retry policies along with the system default policy.
###Gets Retry Policy
GET /v1/retry_policies/:policy_id
Returns the details of a specific retry policy.
policy_id
- (example: linear)
###ChargeBee Webhooks
POST /v1/webhooks/chargebee
The receiver to handle accepting chargebee webhooks.