---
title: "Edit event subscription (basic auth)"
url: "https://docs.signnow.com/docs/basic-auth/operations/update-event-subscription"
type: "endpoint"
section: "basic-auth"
slug: "basic-auth/operations/update-event-subscription"
method: "PUT"
path: "/api/v2/events/{event_subscription_id}"
operation_id: "update-event-subscription"
authorization: "basic"
---

# Edit event subscription (basic auth)

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

This endpoint allows API users to change an existing event subscription. This request uses Basic authorization. For the request with Bearer authorization, see [Update event subscription (bearer auth)](/docs/manage-event-subscriptions/operations/put-v2-event-subscriptions-subscription-id).

## Authorization

basic

## Path Parameters

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

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "event",
    "entity_id",
    "action",
    "attributes"
  ],
  "properties": {
    "event": {
      "type": "string",
      "description": "Name of the event, for example `document.complete`. See the [list of events](/docs/guides-webhooks#entity-events)."
    },
    "action": {
      "type": "string",
      "description": "Action to perform when the event occurs. Always `callback`."
    },
    "entity_id": {
      "type": "string",
      "description": "ID of the document, document group, or user the event relates to."
    },
    "attributes": {
      "type": "object",
      "required": [
        "callback"
      ],
      "properties": {
        "headers": {
          "type": "object",
          "description": "Custom headers to send with each callback, as key-value pairs. Values can be strings, numbers, or booleans.",
          "additionalProperties": true
        },
        "callback": {
          "type": "string",
          "description": "URL that receives the callback."
        },
        "use_tls_12": {
          "type": "boolean",
          "description": "Whether to use TLS 1.2 for the callback request."
        },
        "integration_id": {
          "type": "string",
          "description": "ID of the integration the subscription belongs to."
        },
        "docid_queryparam": {
          "type": "boolean",
          "description": "Whether to add the document ID to the callback URL as a query parameter."
        }
      },
      "description": "Callback settings."
    }
  }
}
```

**Example** (`Request`)

```json
{
  "event": "document.complete",
  "action": "callback",
  "entity_id": "d6e3311eadce49eeff483f6c46ed2d11993840f3",
  "attributes": {
    "headers": {
      "int_head": 12,
      "bool_head": false,
      "float_head": 12.24,
      "string_head": "test"
    },
    "callback": "https://example.com/callback",
    "use_tls_12": true,
    "docid_queryparam": false
  }
}
```

## Responses

### 200

The event subscription was updated.

**Example** (`Successful response`)

```json
{
  "id": "48ba2d64d76ed2b86aec79263f599aa3484c4789"
}
```

### 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.complete", "action": "callback", "entity_id": "d6e3311eadce49eeff483f6c46ed2d11993840f3", "attributes": {"headers": {"int_head": 12, "bool_head": false, "float_head": 12.24, "string_head": "test"}, "callback": "https://example.com/callback", "use_tls_12": true, "docid_queryparam": false}}'
```

---
*Full reference: https://docs.signnow.com/docs/basic-auth/operations/update-event-subscription*
