Skip to main content
POST
/
attachments
/
signature
cURL
curl --request POST \
  --url http://127.0.0.1:3000/api/attachments/signature \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contentType": "image/png",
  "contentLength": 123,
  "type": 1,
  "expiresIn": 3600,
  "hash": "xxxxxxxx",
  "baseId": "<string>"
}
'
{
  "url": "https://example.com/attachment/upload",
  "uploadMethod": "POST",
  "token": "xxxxxxxx",
  "requestHeaders": {
    "Content-Type": "image/png"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
contentType
string
required

Mime type

Example:

"image/png"

contentLength
number
required

File size

Example:

123

type
enum<integer>
required

Type

Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14
Example:

1

expiresIn
number

Token expire time, seconds

Example:

3600

hash
string

File hash

Example:

"xxxxxxxx"

baseId
string

Response

201 - application/json

return the upload URL and the key.

url
string
required

Upload url

Example:

"https://example.com/attachment/upload"

uploadMethod
string
required

Upload method

Example:

"POST"

token
string
required

Secret key

Example:

"xxxxxxxx"

requestHeaders
object
required
Example:
{ "Content-Type": "image/png" }
Last modified on December 10, 2025