---
title: "Update event subscription"
url: "https://docs.signnow.com/docs/webhooks-1/operations/put__api_v2_events_event_subscription_id"
type: "endpoint"
section: "webhooks-1"
slug: "webhooks-1/operations/put__api_v2_events_event_subscription_id"
method: "PUT"
path: "/api/v2/events/{event_subscription_id}"
operation_id: "put__api_v2_events_event_subscription_id"
authorization: "basic"
---

# Update event subscription

`PUT /api/v2/events/{event_subscription_id}`

Allows changing an existing event subscription

## Authorization

basic

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `event_subscription_id` | string | Yes |  |

## Request Body

**Schema**

```json
{
  "type": "object",
  "properties": {
    "event": {
      "type": "string"
    },
    "action": {
      "type": "string"
    },
    "entity_id": {
      "type": "string"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "headers": {
          "type": "object",
          "properties": {
            "int_head": {
              "type": "integer"
            },
            "bool_head": {
              "type": "boolean"
            },
            "float_head": {
              "type": "number"
            },
            "string_head": {
              "type": "string"
            }
          }
        },
        "callback": {
          "type": "string"
        },
        "use_tls_12": {
          "type": "boolean"
        },
        "integration_id": {
          "type": "string"
        },
        "docid_queryparam": {
          "type": "boolean"
        }
      }
    }
  }
}
```

**Example** (`application/json`)

```json
{
  "event": "document.fieldinvite.sent",
  "action": "callback",
  "entity_id": "63fde884ad755149ff213563de654f9a61a1884c",
  "attributes": {
    "headers": {
      "int_head": 12,
      "bool_head": false,
      "float_head": 12.24,
      "string_head": "test"
    },
    "callback": "https://enlvww20vv7m.x.pipedream.net/",
    "use_tls_12": true,
    "integration_id": "b98fc00add6b43a606bc527c81eee741bf16a7d8",
    "docid_queryparam": true
  }
}
```

## Responses

### 201

**Example** (`application/json`)

```json
"{\n\n\"id\": \"\" //event subscription unique ID\n\n}"
```

### 400

* "attributes must not be empty" - "attributes" array is missing or empty
* "'callback' is missing." -  required parameter "callback" is missing
* "Action must be equal 'callback'" - required parameter "action" is missing OR value of "action" parameter differs from 'callback'
* "event must not be empty" - required parameter "event" is missing or has an empty value
* "event must be string" - value of the "event" parameter is not a string
* "callback must be string" - value of the "callback" parameter is not a string
* "callback must be url" - value of "callback" parameter is not an URL
* "Invalid integration id - {integration_id}" - value of "integration_id" parameter doesn't exist in database

**Example** (`event`)

```json
"{\n  \"code\": 65582,\n  \"message\": \"event must be string\"\n}"
```

**Example** (`action`)

```json
{
  "message": "Action must be equal 'callback'"
}
```

**Example** (`callback`)

```json
{
  "code": 400,
  "message": "attributes must not be empty"
}
```

**Example** (`attributes`)

```json
{
  "code": 400,
  "message": "attributes must not be empty"
}
```

**Example** (`empty event`)

```json
{
  "code": 65582,
  "message": "event must not be empty"
}
```

**Example** (`integration`)

```json
{
  "message": "Invalid integration id - {integration_id}"
}
```

**Example** (`callback is not an url`)

```json
{
  "code": 400,
  "message": "callback must be url"
}
```

**Example** (`callback is not a string`)

```json
{
  "code": 65582,
  "message": "callback must be string"
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X PUT \
  "https://api.signnow.com/api/v2/events/{event_subscription_id}" \
  -H "Authorization: Basic $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"event": "document.fieldinvite.sent", "action": "callback", "entity_id": "63fde884ad755149ff213563de654f9a61a1884c", "attributes": {"headers": {"int_head": 12, "bool_head": false, "float_head": 12.24, "string_head": "test"}, "callback": "https://enlvww20vv7m.x.pipedream.net/", "use_tls_12": true, "integration_id": "b98fc00add6b43a606bc527c81eee741bf16a7d8", "docid_queryparam": true}}'
```

---
*Full reference: https://docs.signnow.com/docs/webhooks-1/operations/put__api_v2_events_event_subscription_id*
