Update Document Status

PATCH

Update the status of a document. The document must be in draft status to be updated.

Update Document Status

Click Send to get a response

1. Important Note

Document status must be in draft to use this endpoint. You can change the status to sent or expired.

2. Endpoint Details

Endpoint Details

HTTP Method

PATCH

Endpoint URL

/api/v1/apiwarehouse/update-document-status

3. Required Headers

x-api-keyYour API authentication key
Content-Typeapplication/json

4. Request Body Schema

Json
{
"document_id": "6904f56d62b5947374323b8b",
"status": "sent"
}

5. Request Body Parameters

document_idstring (required)

Unique identifier of the document to update

statusstring (required)

New status for the document. Allowed values: sent, expired

6. Example Request

Json

curl --location --request PATCH 'https://api.swellsign.com/api/v1/apiwarehouse/update-document-status'
--header 'x-api-key: 4Ta9EvxmPFJaUuFI6hnp7tSvwmqCrZI8pFrcn05z'
--header 'Content-Type: application/json'
--data '{
"document_id": "6904f56d62b5947374323b8b",
"status": "sent"
}'

7. Example Response

Json
{
"success": true,
"message": "Document status updated to sent successfully",
"data": {
  "document_id": "690854e4077f70ed790c70ae",
  "name": "fmfk",
  "previous_status": "draft",
  "new_status": "sent",
  "updated_at": "2025-11-03T07:08:31.138Z"
}
}

5. Response Fields

successboolean

Indicates if the status update was successful

messagestring

Success message describing the status update

data.document_idstring

ID of the updated document

data.namestring

Name of the document

data.previous_statusstring

Status before the update (will always be "draft")

data.new_statusstring

New status after the update (sent/expired)

data.updated_atstring (ISO date)

Timestamp when the status was updated