> For the complete documentation index, see [llms.txt](https://docs.transactionlink.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.transactionlink.io/docs/transactionlink-api/api-reference/resources.md).

# Resources

The `resource` object representing a file hosted on TransactionLink's servers. The file may have been uploaded by yourself using the create resource request (for example, when uploading documents) or it may have been created by workflow

## Create a new resource

> Create a new resource. Requires \`can\_view\_workspace\` permission on the workspace.

```json
{"openapi":"3.0.1","info":{"title":"TransactionLink API","version":"v3"},"servers":[{"url":"https://api.transactionlink.io","description":"Production"}],"security":[{"organizationToken":[]},{"bearerAuthJWT":[]}],"components":{"securitySchemes":{"organizationToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Organization API token (tot_) — preferred authentication method. Pass the token directly without Bearer prefix."},"bearerAuthJWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Legacy JWT Bearer token — deprecated in favor of organization tokens (tot_). Still supported for backwards compatibility."}},"schemas":{"CreateResourceResponse":{"title":"CreateResourceResponse","required":["resourceId","resourceName","resourcePath"],"type":"object","properties":{"resourceId":{"type":"string","description":"Unique identifier of the created resource"},"resourcePath":{"type":"string","description":"Path to access the created resource"},"resourceName":{"type":"string","description":"Name of the created resource"}}},"ErrorResponse":{"required":["errors","fingerprint"],"type":"object","properties":{"fingerprint":{"type":"string","description":"Unique identifier for this error instance"},"errors":{"type":"array","description":"List of error details","items":{"required":["code","message"],"properties":{"code":{"type":"string","description":"Error code representing the type of error"},"message":{"type":"string","description":"Error message providing more details about the error"}}}}}}}},"paths":{"/resources":{"post":{"tags":["Resources"],"summary":"Create a new resource","description":"Create a new resource. Requires `can_view_workspace` permission on the workspace.","operationId":"create-resource","parameters":[{"name":"Authorization","in":"header","description":"Organization token (`tot_`) — preferred method, or legacy Bearer JWT token. Pass the `tot_` token directly without Bearer prefix; use `Bearer <jwt>` for legacy JWT auth.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"Content type of the request - multipart/form-data","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"description":"Upload file request","content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"description":"The file to upload","format":"binary"}}}}},"required":true},"responses":{"201":{"description":"201","headers":{"Content-Type":{"description":"Content type of the response - application/json","style":"simple","explode":false,"schema":{"type":"string"}}},"content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/CreateResourceResponse"}}}},"400":{"description":"Bad Request – invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized – JWT token missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden – insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found – resource does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error – unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Retrieve a specific resource

> Retrieve a specific resource. Requires \`can\_view\_workspace\` permission on the workspace.

```json
{"openapi":"3.0.1","info":{"title":"TransactionLink API","version":"v3"},"servers":[{"url":"https://api.transactionlink.io","description":"Production"}],"security":[{"organizationToken":[]},{"bearerAuthJWT":[]}],"components":{"securitySchemes":{"organizationToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Organization API token (tot_) — preferred authentication method. Pass the token directly without Bearer prefix."},"bearerAuthJWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Legacy JWT Bearer token — deprecated in favor of organization tokens (tot_). Still supported for backwards compatibility."}},"schemas":{"GetResourceResponse":{"title":"GetResourceResponse","type":"object"},"ErrorResponse":{"required":["errors","fingerprint"],"type":"object","properties":{"fingerprint":{"type":"string","description":"Unique identifier for this error instance"},"errors":{"type":"array","description":"List of error details","items":{"required":["code","message"],"properties":{"code":{"type":"string","description":"Error code representing the type of error"},"message":{"type":"string","description":"Error message providing more details about the error"}}}}}}}},"paths":{"/resources/{resourceId}":{"get":{"tags":["Resources"],"summary":"Retrieve a specific resource","description":"Retrieve a specific resource. Requires `can_view_workspace` permission on the workspace.","operationId":"get-resource","parameters":[{"name":"resourceId","in":"path","description":"Unique identifier of the resource to retrieve","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Organization token (`tot_`) — preferred method, or legacy Bearer JWT token. Pass the `tot_` token directly without Bearer prefix; use `Bearer <jwt>` for legacy JWT auth.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"200","headers":{"Content-Type":{"description":"Content type of the resource","style":"simple","explode":false,"schema":{"type":"string"}}},"content":{"application/pdf;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/GetResourceResponse"}}}},"400":{"description":"Bad Request – invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized – JWT token missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden – insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found – resource does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error – unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
