Create a stamp
POST/openapi/v1/stamps/create
Create a stamp in the current Space and return its stamp ID.
In the console: Admin > Stamps > New stamp.
Required Scope: stamp:manage
Request Parameters
Header Parameters
AuthorizationRequiredstring
Bearer <access_token>
X-Operator-User-IdOptionalstring
Operator user ID. Not required in the authorization code flow (the authorized user is used automatically); **required** in the client credentials flow. The operator must be an administrator of the current Space.
Request Body
application/jsonNameRequiredstring
Stamp name, up to 30 characters, subject to content review.
ImageOptionalstring
Base64-encoded stamp image (choose one of `Image` / `FileId`). JPG / JPEG / PNG / BMP, up to 10 MB. Takes precedence when `FileId` is also provided; an error is returned if neither is provided.
FileIdOptionalstring
An already-uploaded image resource ID (choose one of `Image` / `FileId`), returned by the upload file endpoint and valid for 24 hours. Use it to create the stamp within that window. On creation, the file content is read, converted to PNG and stored as the stamp image; the stamp is then independent of the original upload. Ignored when `Image` is also provided.
Response Parameters
Response.Data
StampIdOptionalstring
The newly created stamp ID.
Error Codes
| Error Code | Description |
|---|---|
INVALID_REQUEST | Invalid request parameters (empty Name or over 30 characters, invalid Image format or size, neither Image nor FileId provided, FileId not found or not an image, etc.) |
OPENAPI.OPERATOR_USER_ID_REQUIRED | X-Operator-User-Id not provided in the client credentials flow |
OPENAPI.OPERATOR_USER_NOT_FOUND | Operator user does not exist, account not enabled, or not an enabled member of the current Space |
OPENAPI.OPERATOR_USER_NOT_HUMAN | Operator user is not a real user |
MEMBER.INSUFFICIENT_PERMISSION | Operator user is not a Space administrator |
VALIDATION.INAPPROPRIATE_CONTENT | Stamp name failed content review |
INTERNAL_ERROR | Internal server error |