Stamp Management
The stamp management APIs create stamps, grant or revoke members’ permission to use a stamp, and list the stamps in a Space together with their image download URLs. Some of these endpoints correspond to Admin > Stamps in the console; others are additional envelope-level stamp permission capabilities provided by OpenAPI, with no corresponding console entry.
Capabilities with a console counterpart
The following four endpoints mirror the capabilities of Admin > Stamps in the console, with the same permissions and business rules:
| Console action | Endpoint | Description |
|---|---|---|
| New stamp | Create a stamp POST /openapi/v1/stamps/create | Create a stamp from an image, returns StampId |
| Stamp permissions | Grant stamp permission POST /openapi/v1/stamps/grant | Grant Space-level usage permission (permanent or time-bound) to members in batch |
| Revoke permission | Revoke stamp permission POST /openapi/v1/stamps/revoke | Revoke members’ Space-level usage permission in batch |
| Stamp list | List stamps POST /openapi/v1/stamps/list | Paginated list, or look up a single stamp by StampId to obtain its image download URL; Authorizations returns Space-level grant details |
Additional OpenAPI envelope-level stamp permission capabilities
The following endpoints grant envelope-level stamp permissions. They are provided by OpenAPI and have no corresponding console entry:
| Endpoint | Description |
|---|---|
Grant envelope-level stamp permission POST /openapi/v1/stamps/grant-by-envelope | Once an envelope is created and in a signable state, grant its signing members the stamps they need for that envelope |
List envelope-level stamp permissions POST /openapi/v1/stamps/list-envelope-grants | Paginated list of the historical operation results of envelope-level stamp permissions; the results do not indicate currently active grants |
Scope boundaries
stamps/grant/stamps/revokemanage Space-level permissions (permanent or time-bound), which apply to a member’s use of the stamp across the whole Space.grant-by-envelopemanages envelope-level permissions, which apply only to the signing of a specific envelope.stamps/revokedoes not revoke envelope-level permissions; once an envelope is completed or voided, its envelope-level permissions can no longer be used for signing.- View the current details of Space-level grants via
Authorizationsin List stamps; List envelope-level stamp permissions returns envelope-level stamp permission operation results only and cannot be used to query Space-level grant history.
Getting started
- Create an app under Integration > Apps and Keys in the console and obtain its
client_idandclient_secret. - Exchange
client_id+client_secretfor anaccess_tokenthrough the OAuth 2.0 authorization server; see the authentication guide. - Send every request with the header
Authorization: Bearer <access_token>. - The app must hold the
stamp:managescope, and the operator must be an administrator of the Space. In the client credentials flow, specify the operator viaX-Operator-User-Id.
Each app (client_id) is bound to exactly one SpaceId. All endpoints operate on that Space; there is no need to pass a SpaceId in the request.
Integration flow: create → grant → Trusted signing
When a signer needs to use a stamp from the Space in a Trusted signing session, integrate in this order:
- When creating the envelope, use
AllowedStampIdsto define the stamps that are visible/selectable to the signer. The allowlist is only a visibility range — it is not a grant and does not create one automatically. - The allowlist accepts stamps from the current Space and from other Spaces. Stamps in the current Space need no prior permission for the signer at creation time; grant them via the Grant envelope-level stamp permission endpoint before a Trusted session. Stamps from other Spaces require the signer to already hold permission at creation time, cannot be granted via that endpoint, and are therefore usable only in a signed-in (non-Trusted) session. Both kinds are shown on the signing page, but only stamps from the current Space can be granted for a Trusted session via the envelope-level permission flow.
- After the envelope is created and in a signable state, call Grant envelope-level stamp permission to grant the needed stamps to the signing members, and check the per-row results in
Items: a grant is written for each valid user × valid stamp combination, with failed targets reported inFailedGrants. - In a Trusted signing session, Space-level permanent/time-bound grants and administrator status do not substitute for envelope-level permissions: a stamp that appears in the allowlist but lacks an envelope-level permission is unusable.
- Related pages: Quick create envelope, Create envelope from template, Get signing view, List Members, List stamps, Grant envelope-level stamp permission, List envelope-level stamp permissions.
Image source: Image vs FileId
Create a stamp accepts the image from one of two fields:
| Field | Description |
|---|---|
Image | Base64-encoded stamp image; JPG / JPEG / PNG / BMP, up to 10 MB |
FileId | A resource ID obtained from the Upload File endpoint (valid for 24 hours; the content is read to create the stamp image, after which the stamp is independent of the original upload) |
If both are provided, Image takes precedence and FileId is ignored; if neither is provided, INVALID_REQUEST is returned.
Image download URL
DownloadUrl returned by List stamps is a temporary link valid for 24 hours that can be downloaded directly with a GET request. After it expires, call the list endpoint again to issue a fresh link (pass StampId to fetch just one stamp’s link).
General rules
- Stamp scope: endpoints only operate on stamps in the current Space. If a
StampIddoes not exist or belongs to another Space, list returns an empty array and grant/revoke returnOPENAPI.STAMP_NOT_FOUND. - Member identification: grant and revoke take members’ business UserIDs, obtainable via List Members.
- Batch limit:
UserIdssupports 1–100 after deduplication and removal of empty values; the result of one member does not affect the others. - Repeated grants overwrite: calling
stamps/grantagain for a member who already holds a Space-level grant overwrites its validity period, remark and grantor; using the defaultpermanentturns an existingcustom_timegrant into a permanent one. Confirm the intended validity period before calling. - Failures and idempotency: when granting, a member that does not exist or is deactivated is reported in
FailedUserswith a reason; when revoking, a UserID that does not exist or holds no grant is treated as success (idempotent), and only an internal service error is reported inFailedUsers. This is so stale grants of disabled or removed members can still be revoked. - Response structure: all endpoints return HTTP
200; success and failure are distinguished byResponse.Error.Code. On successResponse.Dataholds the business payload. - Authentication errors (RFC 6750, not business error codes): a missing token returns HTTP
401(no body); an invalid or expired token returns HTTP401+{"error":"invalid_token"}; an app missing thestamp:managescope returns HTTP403+{"error":"insufficient_scope"}. - Required Scope:
stamp:manage.