---
title: "Add custom history event"
url: "https://docs.signnow.com/docs/document/operations/add-document-custom-history-event"
type: "endpoint"
section: "document"
slug: "document/operations/add-document-custom-history-event"
method: "POST"
path: "/document/{document_id}/custom_history_event"
operation_id: "add-document-custom-history-event"
authorization: "bearer"
---

# Add custom history event

`POST /document/{document_id}/custom_history_event`

This endpoint allows API users to add custom events to the document history (audit log). For example, if you are using a single SignNow account to make API calls but authenticating multiple people, use this call to add a record to the audit log for that specific document that references the authentication method.

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_id` | string | Yes | ID of the document. |

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "client_timestamp",
    "event_type"
  ],
  "properties": {
    "event_type": {
      "type": "string",
      "description": "Name of the event to add to the document history."
    },
    "client_timestamp": {
      "type": "integer",
      "description": "Time of the event as a Unix timestamp, in seconds."
    }
  }
}
```

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

```json
{
  "event_type": "test_event",
  "client_timestamp": 1460739202
}
```

## Responses

### 200

The custom event was added to the document history.

**Example** (`Successful response`)

```json
{
  "status": "success"
}
```

### 400

* Wrong, expired, or missing token.
* The document doesn't exist.
* The document belongs to another user.
* `client_timestamp` is missing.
* `event_type` is missing.

**Example** (`Wrong token`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`Not the owner`)

```json
{
  "errors": [
    {
      "code": 65610,
      "message": "not readable"
    }
  ]
}
```

**Example** (`Document not found`)

```json
{
  "errors": [
    {
      "code": 65544,
      "message": "internal api error"
    }
  ]
}
```

**Example** (`Missing event_type`)

```json
{
  "errors": [
    {
      "code": 65544,
      "message": "internal api error"
    }
  ]
}
```

**Example** (`Missing client_timestamp`)

```json
{
  "errors": [
    {
      "code": 65536,
      "message": "client_timestamp is required"
    }
  ]
}
```

## Code Examples

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

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/document/{document_id}/custom_history_event" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"event_type": "test_event", "client_timestamp": 1460739202}'
```

---
*Full reference: https://docs.signnow.com/docs/document/operations/add-document-custom-history-event*
