ConsistlyAPI
Files

Upload a file

POST
/files
AuthorizationBearer <token>

Bearer API key in the form sk_live_…, sk_test_…, or pk_live_…. Keys are issued from the Consistly dashboard and carry product-prefixed scopes.

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/files" \  -F purpose="icon_source"
{  "id": "string",  "object": "file",  "purpose": "icon_source",  "size_bytes": 0,  "sha256": "string",  "content_type": "string",  "original_filename": "string",  "url": "http://example.com",  "attached_to": [    {      "kind": "string",      "id": "string"    }  ],  "metadata": {    "property1": "string",    "property2": "string"  },  "livemode": true,  "expires_at": "2019-08-24T14:15:22Z",  "created": "2019-08-24T14:15:22Z",  "updated": "2019-08-24T14:15:22Z",  "organization": "string",  "created_by": "string"}