POST
/
attachments
/
signature
curl --request POST \
  --url https://app.teable.io/api/attachments/signature \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"contentType":"image/png","contentLength":123,"expiresIn":3600,"hash":"xxxxxxxx","type":1,"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

contentLength
number
required

File size

type
enum<integer>
required

Type

Available options:
1,
2,
3,
4,
5,
6,
7
expiresIn
number

Token expire time, seconds

hash
string

File hash

baseId
string

Response

201 - application/json
return the upload URL and the key.
url
string
required

Upload url

uploadMethod
string
required

Upload method

token
string
required

Secret key

requestHeaders
object
required