---
title: Register
slug: apis/webhooks/cos-webhooks/events-formats-cos/webhook-management-cos/register-for-webhook-events
description: Register a webhook by POST webhooks/v1/registrations with your partnerId, eventName, callback URL, type (push/poll), format, and optional auth.
icon: {"apiMethod":"POST"}
docTags: 
createdAt: 2025-05-07T13:17:37.024Z
---

:::ApiMethodV2
```json
{
  "name": "Endpoint: /webhooks/v1/registrations",
  "method": "POST",
  "url": "https://sandbox.crbcos.com/webhooks/v1/registrations",
  "description": "Registers for webhook event delivery",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "K11qC5kmTXI07ENz61ymD",
        "language": "curl",
        "code": "curl --location 'https://sandbox.crbcos.com/Webhooks/v1/registrations' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer token' \\\n--data '{\n    \"partnerId\": \"1101a33d-fbd9-4b9e-b169-b29500f12407\",\n    \"eventName\": \"Core.Customer.Address.Added\",\n    \"type\": \"Poll\",\n    \"format\": \"Extended\"\n}\n\n'",
        "customLabel": ""
      },
      {
        "id": "p2TMlg28Z74vo1e4PgyqC",
        "language": "nodejs",
        "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'POST',\n  'hostname': 'sandbox.crbcos.com',\n  'path': '/Webhooks/v1/registrations',\n  'headers': { 'Content-Type': 'application/json',\n    'Authorization': '••••••'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nvar postData =  \"{\\r\\n    \\\"partnerId\\\": \\\"19222b81-0e1e-452d-a842-b2f1011c16f3\\\",\\r\\n    \\\"eventName\\\": \\\"Cards.Card.Activated\\\",\\r\\n    \\\"callbackUrl\\\": \\\"https://webhook.site/27b9814b-16eb-4099-9999-32594aee5e04\\\",\\r\\n    \\\"type\\\": \\\"Push\\\",\\r\\n    \\\"format\\\": \\\"Extended\\\"\\r\\n}\\r\\n\\r\\n\";\n\nreq.write(postData);\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "SPxpI1Oypv2SIHlcZ4tVL",
        "language": "python",
        "code": "import requests\n\nurl = \"https://sandbox.crbcos.com/Webhooks/v1/registrations\"\n\npayload = \"{\\r\\n    \\\"partnerId\\\": \\\"19222b81-0e1e-452d-a842-b2f1011c16f3\\\",\\r\\n    \\\"eventName\\\": \\\"Cards.Card.Activated\\\",\\r\\n    \\\"callbackUrl\\\": \\\"https://webhook.site/27b9814b-16eb-4099-9999-32594aee5e04\\\",\\r\\n    \\\"type\\\": \\\"Push\\\",\\r\\n    \\\"format\\\": \\\"Extended\\\"\\r\\n}\\r\\n\\r\\n\"\nheaders = {'Content-Type': 'application/json',\n  'Authorization': '••••••'}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "uYwMY4GuujEm_eHqBQCrt",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/Webhooks/v1/registrations\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"Authorization\"] = \"••••••\"\n\nrequest.body = \"{\\r\\n    \\\"partnerId\\\": \\\"19222b81-0e1e-452d-a842-b2f1011c16f3\\\",\\r\\n    \\\"eventName\\\": \\\"Cards.Card.Activated\\\",\\r\\n    \\\"callbackUrl\\\": \\\"https://webhook.site/27b9814b-16eb-4099-9999-32594aee5e04\\\",\\r\\n    \\\"type\\\": \\\"Push\\\",\\r\\n    \\\"format\\\": \\\"Extended\\\"\\r\\n}\\r\\n\\r\\n\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "HUJYAEZPnn56wuuaAQQUv",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://sandbox.crbcos.com/Webhooks/v1/registrations\"\n  method := \"POST\"\n\n  payload := strings.NewReader(`{`+\"\n\"+`\n    \"partnerId\": \"19222b81-0e1e-452d-a842-b2f1011c16f3\",`+\"\n\"+`\n    \"eventName\": \"Cards.Card.Activated\",`+\"\n\"+`\n    \"callbackUrl\": \"https://webhook.site/27b9814b-16eb-4099-9999-32594aee5e04\",`+\"\n\"+`\n    \"type\": \"Push\",`+\"\n\"+`\n    \"format\": \"Extended\"`+\"\n\"+`\n}`+\"\n\"+`\n`+\"\n\"+`\n`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"Authorization\", \"••••••\")\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "HUJYAEZPnn56wuuaAQQUv"
  },
  "results": {
    "languages": [
      {
        "id": "b7QqXVpJA-IW0ITJ3V9Ed",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"id\": \"8d6115c0-2a88-4a58-b731-b306002e8bc2\",\n    \"partnerId\": \"19222b81-0e1e-452d-a842-b2f1011c16f3\",\n    \"eventName\": \"Cards.Card.Activated\",\n    \"callbackUrl\": \"https://webhook.site/27b9814b-16eb-4099-9999-32594aee5e04\",\n    \"consecutiveErrors\": 0,\n    \"status\": \"Active\",\n    \"type\": \"Push\",\n    \"format\": \"Extended\"\n}"
      },
      {
        "id": "5i16u7wEVlUx_FmcmrFny",
        "language": "400",
        "code": "{\n    \"errors\": [\n        {\n            \"code\": 2002,\n            \"message\": \"Registration for event name already exists\"\n        }\n    ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "b7QqXVpJA-IW0ITJ3V9Ed"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "partnerId",
        "kind": "required",
        "type": "string",
        "description": "Your unique ID in the Cross River system. This ID is in GUID format.",
        "": "Your unique ID in the Cross River system. This ID is in GUID format."
      },
      {
        "name": "eventName",
        "kind": "required",
        "type": "string",
        "description": "Webhook event being reported",
        "children": []
      },
      {
        "name": "callbackUrl",
        "kind": "optional",
        "type": "string",
        "description": "The value is a URL. Webhooks are reported to this URL as a result of a triggered action. Make sure the callback URL is added to Cross River's allowlist. SSL required.",
        "": "The value is a URL. Webhooks are reported to this URL as a result of a triggered action. Make sure the callback URL is added to Cross River's allowlist. SSL required."
      },
      {
        "name": "authUsername",
        "kind": "optional",
        "type": "string",
        "description": "Basic authentication username to include in header of event. 255 character limit.",
        "children": []
      },
      {
        "name": "authPassword",
        "kind": "optional",
        "type": "string",
        "description": "Basic authentication password to include in event header. 255 character limit.",
        "children": []
      },
      {
        "name": "type",
        "kind": "optional",
        "type": "string",
        "description": "Type of registration:\n- Push\n- Poll\n- File",
        "": "Type of registration:\n- Push\n- Poll\n- File"
      },
      {
        "name": "format",
        "kind": "optional",
        "type": "string",
        "description": "Event format:\n- Basic\n- Extended",
        "": "Event format:\n- Basic\n- Extended"
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "response": [
    {
      "name": "id",
      "kind": "optional",
      "type": "string",
      "description": "The webhook registration ID. You receive this ID in the response when you register a webhook event. This ID is in GUID format."
    },
    {
      "name": "partnerId",
      "kind": "optional",
      "type": "string",
      "description": "Your unique ID in the Cross River system. This ID is in GUID format.",
      "children": []
    },
    {
      "name": "eventName",
      "kind": "optional",
      "type": "string",
      "description": "Webhook event being reported",
      "children": []
    },
    {
      "name": "callbackUrl",
      "kind": "optional",
      "type": "string",
      "description": "The value is a URL. Webhooks are reported to this URL as a result of a triggered action. Make sure the callback URL is added to Cross River's allowlist. SSL required.",
      "children": []
    },
    {
      "name": "authUsername",
      "kind": "optional",
      "type": "string",
      "description": "Basic authentication username to include in header of event",
      "children": []
    },
    {
      "name": "authPassword",
      "kind": "optional",
      "type": "string",
      "description": "Basic authentication password to include in event header",
      "children": []
    },
    {
      "name": "consecutiveErrors",
      "kind": "optional",
      "type": "integer",
      "description": "The number of consecutive errors",
      "children": []
    },
    {
      "name": "lastError",
      "kind": "optional",
      "type": "string",
      "description": "Description of the last error",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "Status of registration:\n- Active\n- Suspended\n- Restarting",
      "children": []
    },
    {
      "name": "type",
      "kind": "optional",
      "type": "string",
      "description": "Type of registration:\n- Push\n- Poll\n- File",
      "children": []
    },
    {
      "name": "format",
      "kind": "optional",
      "type": "string",
      "description": "Event format:\n- Basic\n- Extended",
      "children": []
    }
  ],
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "endpoint-webhooksv1registrations",
  "legacyHash": "FQdVnboS8uHoSD85XTuSG"
}
```
:::

