Talk to your AI agent to run Simetrik. →
SimetrikDocs

Register a webhook

POST /api/v2/webhooks — create the source and the webhook that feeds it, in one call.

Creates the source and registers the webhook that will feed it. Call it once; the webhook_id it returns is what your systems notify from then on.

POST /api/v2/webhooks

Headers

Same as any authenticated JaaS call — see Authentication. You need x-api-key, x-skt-workspace, x-skt-account and Content-Type: application/json.

Body

FieldTypeRequiredWhat it does
namestringYesSource name, as it will appear in the platform.
webhookobjectYesThe webhook configuration. All three of its sections have defaults.
folder_idintegerNoFolder to create the source in.
notification_configobjectNoWhere to call you back as files move. See Status notifications.

webhook.file_mapping

Where to read the file's URL and name from in the notifications you'll send.

FieldDefaultWhat it does
url_fieldfile_urlPath to the file URL in your payload.
filename_fieldfilenamePath to the file name.

Both accept dot and index notation, so you can point at a field nested inside the payload your platform already emits — data.file.url, files[0].url. See Send a notification for how it resolves.

webhook.credentials

How Simetrik authenticates when it downloads the file from your URL.

typeFieldsWhat is sent
basic_authusername, passwordHTTP Basic authentication.
api_keyapi_keyAn X-API-Key header.
bearertokenAn Authorization: Bearer header.

Omit credentials entirely if your URLs are pre-signed or otherwise public — the file is then fetched with no authentication.

webhook.response_config

What Simetrik answers your systems with. Useful when the platform sending the notification expects a specific acknowledgement.

FieldDefaultWhat it does
status_code200Status code of the reply.
content_typeapplication/jsonContent type of the reply.
body{"status": "accepted"}Body of the reply, verbatim.

Example

curl -X POST "$SIMETRIK_INGESTION_URL/api/v2/webhooks" \
  -H "x-api-key: $SIMETRIK_API_KEY" \
  -H "x-skt-workspace: 886" \
  -H "x-skt-account: 23" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Settlement files from the core",
    "webhook": {
      "file_mapping": {
        "url_field": "data.file.url",
        "filename_field": "data.file.name"
      },
      "credentials": {
        "type": "bearer",
        "token": "'"$FILE_SERVER_TOKEN"'"
      },
      "response_config": {
        "status_code": 202,
        "content_type": "application/json",
        "body": {"notification": "accepted"}
      }
    }
  }'

Response

201 Created:

{
  "id": 61171,
  "name": "Settlement files from the core",
  "webhook_id": "61171_wh_9d200105"
}
FieldWhat to do with it
idThe source id.
webhook_idGoes in the path of every notification you send.

webhook_id is a credential. Anyone who has it can queue files into your source, so store it the way you'd store an API key and rotate it — by registering a new webhook — if it leaks.

Errors

StatusMeaningWhat to change
400The platform rejected the source definition.Check the errors array; a duplicate name is the usual cause.
403Authorization failed.See Authentication.
422Missing name or webhook, or a field that didn't validate.The errors array names each one.
502Storage provisioning failed upstream.Transient. Retry.
500Unexpected error.Retry; if it persists, contact support.

On this page