Nuvelics documentation
APIAPI reference

Assets

Upload a file, such as a brand logo or a story photo, through a signed URL, then read or delete it; other operations refer to it by its ID.

POST
/api/tenant/v1/assets

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
purpose*string

Declared reason an asset was stored. Determines the content-type/size allowlist, the permission required to mint an upload for it, and whether it expires.

Value in"brand_logo""brand_font""brand_music""brand_stinger""brand_card_ground""video_render""pitch_seed_pdf""pitch_seed_image""story_photo""layout_import""card_render"
contentType*string

Declared MIME type of the object about to be uploaded

Length1 <= length
sizeBytes*integer

Declared size in bytes of the object about to be uploaded

Range0 <= value
filename?string

Client's original file name, display only, never used as a storage key

Length1 <= length

Response Body

Upload reserved; PUT the object's bytes to uploadUrl next

application/json
  1. response
assetId*string

Asset identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
uploadUrl*string

Short-lived signed URL the client PUTs the object's bytes to

Formaturi
requiredHeaders*

Headers the client must send verbatim on its PUT; the signature covers them

expiresAt*string

ISO 8601 timestamp after which uploadUrl no longer verifies

Formatdate-time
Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/assets' \  -H 'Content-Type: application/json' \  -d '{  "purpose": "brand_logo",  "contentType": "string",  "sizeBytes": 0}'
Example Response
{  "assetId": "string",  "uploadUrl": "http://example.com",  "requiredHeaders": {    "property1": "string",    "property2": "string"  },  "expiresAt": "2019-08-24T14:15:22Z"}
POST
/api/tenant/v1/assets/{id}/complete

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Asset identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

Uploaded object verified; asset is now ready

application/json
  1. response
id*string

Asset identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string

Owning organization identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
purpose*string

Declared reason an asset was stored. Determines the content-type/size allowlist, the permission required to mint an upload for it, and whether it expires.

Value in"brand_logo""brand_font""brand_music""brand_stinger""brand_card_ground""video_render""pitch_seed_pdf""pitch_seed_image""story_photo""layout_import""card_render"
status*string

Lifecycle state of an asset row

Value in"pending""ready"
contentType*string

MIME type: the declared one until complete, then the one the uploaded bytes were verified as, which may differ from the declared one

sizeBytes*integer

Size in bytes; null until an upload has been declared

filename*string

Client's original file name, display only

createdBy*string

User who minted the upload; null when written by a worker

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
expiresAt*string

ISO 8601 timestamp after which this asset is swept; null if it never expires

Formatdate-time
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
completedAt*string

ISO 8601 timestamp the upload was verified and marked ready

Formatdate-time
Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/assets/string/complete'
Example Response
{  "id": "string",  "orgId": "string",  "purpose": "brand_logo",  "status": "pending",  "contentType": "string",  "sizeBytes": 0,  "filename": "string",  "createdBy": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "completedAt": "2019-08-24T14:15:22Z"}
GET
/api/tenant/v1/assets/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Asset identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

The asset's metadata and a freshly signed download URL

application/json
  1. response
id*string

Asset identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string

Owning organization identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
purpose*string

Declared reason an asset was stored. Determines the content-type/size allowlist, the permission required to mint an upload for it, and whether it expires.

Value in"brand_logo""brand_font""brand_music""brand_stinger""brand_card_ground""video_render""pitch_seed_pdf""pitch_seed_image""story_photo""layout_import""card_render"
status*string

Lifecycle state of an asset row

Value in"pending""ready"
contentType*string

MIME type: the declared one until complete, then the one the uploaded bytes were verified as, which may differ from the declared one

sizeBytes*integer

Size in bytes; null until an upload has been declared

filename*string

Client's original file name, display only

createdBy*string

User who minted the upload; null when written by a worker

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
expiresAt*string

ISO 8601 timestamp after which this asset is swept; null if it never expires

Formatdate-time
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
completedAt*string

ISO 8601 timestamp the upload was verified and marked ready

Formatdate-time
downloadUrl*string

Freshly signed, short-lived URL to GET the object's bytes

Formaturi
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/assets/string'
Example Response
{  "id": "string",  "orgId": "string",  "purpose": "brand_logo",  "status": "pending",  "contentType": "string",  "sizeBytes": 0,  "filename": "string",  "createdBy": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "completedAt": "2019-08-24T14:15:22Z",  "downloadUrl": "http://example.com"}
DELETE
/api/tenant/v1/assets/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Asset identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

Asset deleted, row and object together

Example Request
curl -X DELETE 'https://api.nuvelics.com/api/tenant/v1/assets/string'
Example Response
Empty

Report a problem with this page

On this page