Stamp ManagementIntroduction

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 actionEndpointDescription
New stampCreate a stamp POST /openapi/v1/stamps/createCreate a stamp from an image, returns StampId
Stamp permissionsGrant stamp permission POST /openapi/v1/stamps/grantGrant Space-level usage permission (permanent or time-bound) to members in batch
Revoke permissionRevoke stamp permission POST /openapi/v1/stamps/revokeRevoke members’ Space-level usage permission in batch
Stamp listList stamps POST /openapi/v1/stamps/listPaginated 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:

EndpointDescription
Grant envelope-level stamp permission POST /openapi/v1/stamps/grant-by-envelopeOnce 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-grantsPaginated list of the historical operation results of envelope-level stamp permissions; the results do not indicate currently active grants

Scope boundaries

  • stamps/grant / stamps/revoke manage Space-level permissions (permanent or time-bound), which apply to a member’s use of the stamp across the whole Space.
  • grant-by-envelope manages envelope-level permissions, which apply only to the signing of a specific envelope.
  • stamps/revoke does 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 Authorizations in 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

  1. Create an app under Integration > Apps and Keys in the console and obtain its client_id and client_secret.
  2. Exchange client_id + client_secret for an access_token through the OAuth 2.0 authorization server; see the authentication guide.
  3. Send every request with the header Authorization: Bearer <access_token>.
  4. The app must hold the stamp:manage scope, and the operator must be an administrator of the Space. In the client credentials flow, specify the operator via X-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:

  1. When creating the envelope, use AllowedStampIds to 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.
  2. 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.
  3. 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 in FailedGrants.
  4. 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.
  5. 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:

FieldDescription
ImageBase64-encoded stamp image; JPG / JPEG / PNG / BMP, up to 10 MB
FileIdA 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 StampId does not exist or belongs to another Space, list returns an empty array and grant/revoke return OPENAPI.STAMP_NOT_FOUND.
  • Member identification: grant and revoke take members’ business UserIDs, obtainable via List Members.
  • Batch limit: UserIds supports 1–100 after deduplication and removal of empty values; the result of one member does not affect the others.
  • Repeated grants overwrite: calling stamps/grant again for a member who already holds a Space-level grant overwrites its validity period, remark and grantor; using the default permanent turns an existing custom_time grant 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 FailedUsers with 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 in FailedUsers. 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 by Response.Error.Code. On success Response.Data holds 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 HTTP 401 + {"error":"invalid_token"}; an app missing the stamp:manage scope returns HTTP 403 + {"error":"insufficient_scope"}.
  • Required Scope: stamp:manage.