- Provisioning: An entitlement uses a webhook as its provisioning strategy, and access was approved.
- Policies: A policy includes a webhook step, which can drive notifications or even approve, deny, or reassign the request.
- Automations: An automation runs a Run webhook step.
- Testing: You manually send a test webhook.
This page covers outbound webhooks (C1 calling your systems). To let external systems trigger C1 automations instead, see Inbound webhooks.
Add a new webhook
Create the webhook in C1 first, then reference it from a provisioning policy, policy step, or automation.1
Navigate to Integrations > Webhooks.
2
Click Add webhook.
3
Give the webhook a name and description so that you and your colleagues can easily identify its purpose.
4
Enter the URL for the webhook. See Webhook URL requirements.
5
Optional. Set Callback timeout (days), which controls how long C1 waits for an asynchronous callback before failing the webhook. Choose from 1 to 30 days. The default is 8 days.
6
Click Save. The new webhook is set up and assigned an ID. Click View history to see the webhook’s recent activity.
Webhook URL requirements
- The URL must use HTTPS on the default port (443). Other schemes and ports are rejected.
- The URL must not contain a username or password.
- The URL must resolve to a publicly routable address. C1 blocks requests to private, loopback, and link-local IP ranges, including after redirects.
Test a webhook
Here’s how to test a webhook once you’ve set it up in C1:1
On the Webhooks tab, click the more actions (…) menu and select Test webhook. C1 sends a
c1.webhooks.v1.PayloadTest event with an empty payload through the same signed delivery pipeline as production events.2
Click View history to see details of the webhook’s payload and status.
Webhook requests
Every webhook is delivered as an HTTP POST request with a JSON body and these headers:
The request body is an envelope with a set of common fields, plus a payload that varies by event type. The most basic request is a test webhook, and it looks like this:
Event types
Webhook authentication
Webhooks include theAuthorization header set with a bearer token that can be used to authenticate that the webhook came from C1. This bearer token is a JWT that can be verified using the JWKS available at https://<YOUR DOMAIN>.conductor.one/auth/v1/jwks. Tokens are signed with RS256, ES256, or EdDSA, depending on your tenant’s signing key. After the token is verified, you can validate the request body by comparing its SHA-256 checksum against the htb_s256 claim included in the token.
The payload of the JWT looks like this:
Responding to webhooks
Your endpoint’s HTTP status code tells C1 whether you’re answering the webhook immediately or completing it later:- Respond synchronously by returning any 2xx status code except 202 (typically 200) with a response document as the response body. C1 processes your response right away, and the webhook is complete.
- Respond asynchronously by returning HTTP status code 202 Accepted. This tells C1 that you’ve received the webhook and will finish the work later. C1 ignores the response body and waits for you to POST a response document to the webhook’s callback URL.
Respond synchronously (200)
Return a 2xx status code (other than 202) and include a response document appropriate to the event type as the response body. For example, an endpoint handling a webhook policy step can approve the request immediately:Respond asynchronously (202 and callback)
Return HTTP status code 202, then later send your response document as an HTTP POST to thecallbackUrl from the webhook request (also available in the Webhook-Callback-Url header).
When sending the callback:
- The callback URL contains an encrypted token that identifies the webhook delivery, so no additional authentication or session token is required.
- The POST body must be a non-empty JSON response document matching the response format for the event type. An empty request body is rejected.
- Each callback URL can be used only once. After a successful callback, or after the webhook expires, further POSTs to the URL are rejected with HTTP status code 400.
- C1 responds to a successful callback with HTTP status code 200.
How C1 interprets your response status
Webhook response formats
Whether you respond synchronously or through the callback URL, the response document format is the same, and depends on the webhook’s event type. Every response document must include"version": "v1".
Provisioning webhooks
Report the outcome of the provisioning work using eithercomplete or errored. Comments are optional and appear in the task’s audit trail.
To report that provisioning succeeded:
Policy step webhooks
A webhook step in a policy can act on the request using one of these actions. Comments are optional, up to 1024 characters, and appear in the request’s audit trail. To approve a request:policySteps field uses the same policy step format as the Policy API, and must contain at least one step.
Automation webhooks
For webhooks fired by an automation’s Run webhook step, return acontext object. Its contents are made available to downstream automation steps — see the Run webhook step reference for how to access the response data.
Test webhooks
Test webhooks don’t require a meaningful response — returning any 2xx status code marks the test as delivered. A minimal valid response document is:Delivery retries and failures
If a delivery attempt fails — the connection fails, the request times out after 30 seconds, or your endpoint returns a status code that isn’t 2xx — C1 retries with a short randomized delay (3 to 15 seconds) between attempts, up to 50 attempts. Two situations stop delivery early:- Your endpoint returns 410 Gone, which C1 treats as a permanent signal to stop.
- The webhook’s callback timeout window elapses.
- Provisioning: The task falls back to manual provisioning, and the fallback is noted in the task’s audit trail.
- Policy steps: The failure is recorded in the request’s audit trail, and the policy continues processing.
- Automations: The step fails, and the error is visible in the automation’s execution log.
Webhook history
Click View history on a webhook to see its recent deliveries, including each delivery’s event type, status, payload, and per-attempt details such as the response status code. History is retained for the webhook’s callback timeout window — 8 days by default, or up to 30 days if you’ve configured a longer callback timeout.Using a webhook to trigger a C1 automation
You can configure external systems to trigger C1 automations by sending authenticated HTTP requests to an inbound webhook endpoint. C1 supports both HMAC and JWT authentication methods. For complete setup instructions, authentication details, code examples, and troubleshooting, see Inbound webhooks.Using webhooks for provisioning in C1
You can configure an entitlement to use a webhook as its provisioning strategy, meaning that when access to the entitlement is approved, the webhook will automatically fire. The webhook can perform a wide variety of work to automate the provisioning process, such as:- Automatically creating a Jira, ServiceNow, or other service desk ticket
- Making a public API call to a tool your organization uses
- Calling the internal API of a backoffice, homegrown, or airgapped tool
- Sending a notification to a collaboration platform, such as pinging a Slack channel
- Adding an entry to an audit log
{"version": "v1", "complete": {}} to the callback URL to complete the task.