> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.plextera.com/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.plextera.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.plextera.com/_mcp/server.

# Get file

GET https://api.plextera.com/api/public/v1/files/{fileId}

Returns file metadata and a temporary `contentUrl` for downloading the content.

Reference: https://docs.plextera.com/api/api-reference/files/get-file

## Authentication

- `Authorization` header (required) — Use the API key format: `api-key <token>`.

## Request

### Path parameters

- `fileId` (string, required) — File identifier.

## Response

### 200

File metadata, including a temporary `contentUrl` for direct download.

- `id` (string, optional) — File identifier. Reference it as `fileId` in extractions and workflow payloads.
- `fileName` (string, optional) — Original file name.
- `mimeType` (string, optional) — Detected media type of the stored file.
- `size` (long, optional) — File size in bytes.
- `contentUrl` (string, optional) — Temporary, pre-signed URL to download the file content directly. Valid for a limited time; request the file again to obtain a fresh URL.

## Errors

### 400 Bad Request Error

INVALID_REQUEST — The request is malformed: unreadable JSON, an invalid parameter value, or a bad multipart body.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 401 Unauthorized Error

UNAUTHORIZED — The API key is missing, malformed, or revoked.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 403 Forbidden Error

FORBIDDEN — The API key is valid but not allowed to perform this operation.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 404 Not Found Error

NOT_FOUND — The resource does not exist in your workspace.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 405 Method Not Allowed Error

METHOD_NOT_ALLOWED — The HTTP method is not supported for this path.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 406 Not Acceptable Error

NOT_ACCEPTABLE — The requested response media type is not supported.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 409 Conflict Error

CONFLICT — The request conflicts with existing state in an upstream Plextera service.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 429 Too Many Requests Error

RATE_LIMITED — Too many requests in a short window. 429 responses are enforced at the network edge; the body may be plain text instead of this envelope, so rely on the status code and the Retry-After header.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 500 Internal Server Error

INTERNAL_ERROR — Unexpected failure inside Plextera. Retry with backoff; contact support with the requestId if it persists.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

### 502 Bad Gateway Error

DOWNSTREAM_ERROR — A downstream Plextera service failed while handling the request. Retry with backoff.

- `error` (ApiError, optional) — Machine-readable error details shared by every error response.

## Types

### ApiError

Machine-readable error details shared by every error response.

- `code` (string, optional) — Stable machine-readable error code. Branch your handling on this, not on `message`.
- `message` (string, optional) — Human-readable explanation. Wording may change; do not parse it.
- `requestId` (string, optional) — Unique request identifier, also returned in the X-Request-Id response header. Include it in support requests.
- `retryable` (boolean, optional) — True when retrying the same request later may succeed.
- `details` (list of ApiErrorDetail, optional) — Field-level validation issues. Present only for VALIDATION_FAILED.

### ApiErrorDetail

Field-level validation issue.

- `field` (string, optional) — Name of the invalid request field.
- `issue` (string, optional) — What is wrong with the field value.

## Examples

**Response**

```json
{
  "id": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM",
  "fileName": "invoice.pdf",
  "mimeType": "application/pdf",
  "size": 63877,
  "contentUrl": "https://files.plextera.com/acme/2026/06/23/invoice_01JY7M4ZVX.pdf?Expires=1782825600&KeyName=key1&Signature=abc123"
}
```

**SDK Code**

```python
import requests

url = "https://api.plextera.com/api/public/v1/files/fileId"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.plextera.com/api/public/v1/files/fileId';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.plextera.com/api/public/v1/files/fileId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.plextera.com/api/public/v1/files/fileId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.plextera.com/api/public/v1/files/fileId")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.plextera.com/api/public/v1/files/fileId', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.plextera.com/api/public/v1/files/fileId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.plextera.com/api/public/v1/files/fileId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```