# Source: https://gitbook.com/docs/developers/gitbook-api/api-reference/storage.md

# Storage

Whether you're hosting images, documents, or other assets, Storage endpoints allow you to integrate those files into your documentation and spaces seamlessly.

## Create a signed URL to upload a file

> Generate a pre-signed URL that can be used to upload a file to storage

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"storage","description":"Whether you're hosting images, documents, or other assets, Storage endpoints allow you to integrate those files into your documentation and spaces seamlessly.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user-internal":[]}],"components":{"securitySchemes":{"user-internal":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}}},"schemas":{"StorageFileMetadata":{"type":"object","properties":{"name":{"type":"string","description":"Original filename"},"type":{"type":"string","description":"MIME type of the file"},"size":{"type":"number","description":"Size of the file in bytes"}},"required":["name","type","size"]},"StorageUploadKind":{"type":"string","enum":["customization_font","import_file"]},"StorageUploadURL":{"type":"object","properties":{"object":{"type":"string","description":"The kind of file to upload","enum":["storage-signed-url"]},"url":{"$ref":"#/components/schemas/URL","description":"Presigned URL for uploading the file"},"key":{"type":"string","description":"The bucket object key for the file"}},"required":["object","url","key"]},"URL":{"type":"string","format":"uri","maxLength":2048}},"responses":{"BadRequestError":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[400]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/orgs/{organizationId}/storage/upload":{"post":{"operationId":"generateStorageUploadURL","summary":"Create a signed URL to upload a file","description":"Generate a pre-signed URL that can be used to upload a file to storage","tags":["storage"],"parameters":[{"$ref":"#/components/parameters/organizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file","kind"],"properties":{"file":{"$ref":"#/components/schemas/StorageFileMetadata"},"kind":{"$ref":"#/components/schemas/StorageUploadKind"}}}}}},"responses":{"201":{"description":"Successfully generated signed URL for file upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUploadURL"}}}},"400":{"$ref":"#/components/responses/BadRequestError"}}}}}}
```