---
title: "Get metadata"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › documents

`GET /v2/documents/metadata`

## Query parameters

- `documentKey` (`document-get-metadata.query.documentKey`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sureshake.com/v2/documents/metadata?documentKey=string'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/documents/metadata?documentKey=string';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/documents/metadata?documentKey=string"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "documentKey": "string",
    "userId": "string",
    "filename": "string",
    "uploadedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`document-get-metadata.response.200.data`; object, required)
  - `documentKey` (`document-get-metadata.response.200.data.documentKey`; string, required)
  - `userId` (`document-get-metadata.response.200.data.userId`; string, required)
  - `filename` (`document-get-metadata.response.200.data.filename`; string, required)
  - `uploadedAt` (`document-get-metadata.response.200.data.uploadedAt`; string, required)
    - format `date-time`
- `meta` (`document-get-metadata.response.200.meta`; object, optional)
  - `timestamp` (`document-get-metadata.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.400.error`; object, required)
  - `code` (`document-get-metadata.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.401.error`; object, required)
  - `code` (`document-get-metadata.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.403.error`; object, required)
  - `code` (`document-get-metadata.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.404.error`; object, required)
  - `code` (`document-get-metadata.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 413

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.413.error`; object, required)
  - `code` (`document-get-metadata.response.413.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.413.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.413.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.413.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.500.error`; object, required)
  - `code` (`document-get-metadata.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`document-get-metadata.response.503.error`; object, required)
  - `code` (`document-get-metadata.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`document-get-metadata.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`document-get-metadata.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`document-get-metadata.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/document-get-metadata/index.md
