Create Signature

View Markdown

Create a new signature.


POST
/signatures

Authorization

AuthorizationRequiredBearer <token>

See API Security for more details.

In: header

Request Body

application/jsonRequired

The request body should contain a properly formatted JSON object with a filename property. Other optional properties are listed below.

filenameRequiredstring
folderstring
expiryinteger
Format: "unix-epoch"
methodstring
Default: "get"Value in: "get" | "put"

Response Body

Success

TypeScript Definitions

Use the response body type in TypeScript.

metaobject
dataobject
errorobject | null | null
linksobject
const body = JSON.stringify({
  "filename": "video.mp4",
  "folder": "example",
  "expiry": 1735689600,
  "method": "put"
})

fetch("https://api.ittybit.com/signatures", {
  headers: {
    "Authorization": "Bearer <token>"
  },
  body
})
{
  "meta": {
    "request_id": "req_abcdefghij1234567890",
    "org_id": "org_abcdefgh1234",
    "project_id": "prj_abcdefgh1234",
    "version": "2025-01-01",
    "type": "object"
  },
  "data": {
    "domain": "you.ittybit.net",
    "filename": "video.mp4",
    "folder": "example",
    "expiry": 1735689600,
    "method": "put",
    "signature": "a1b2c3d4e5f6...",
    "url": "https://you.ittybit.net/example/video.mp4?expiry=1735689600&method=put&signature=a1b2c3d4e5f6..."
  },
  "links": {
    "parent": "/signatures"
  }
}