# Create Encrypted File

Creates an encrypted file on your account.

Encryption details is available [here](encryption-details.html#encryption-details-v35).

## Request

HTTP Method: `POST`

URI Path: `/v3/encrypted_files`

Header: `Content-Type: multipart/form-data`

Note

In version `2026-11-19`, `POST /v3/encrypted_files` accepts a **single file** per request and returns JSON:API-formatted
success and error responses.
A successful upload returns `201 Created` with `Content-Type: application/vnd.api+json`. The request itself is still sent as `multipart/form-data`.

### Request Body Object Attributes

| Name | Parameter Type | Type | Is Required? | Description |
| --- | --- | --- | --- | --- |
| encrypted\_files[encryption\_fingerprint] | `formData` | `string` | Yes | The encryption fingerprint. |
| encrypted\_files[description] | `formData` | `string` | No | The encrypted file description. |
| encrypted\_files[file] | `formData` | `file` | Yes | The encrypted file. |

Note

- Accepted file formats:

  > - .pdf
  > - .jpg
  > - .png
- You may upload **1 file per request**.
- Each file **must not exceed 20 MB** in size.
- Uploaded encrypted files will **expire after 24 hours**.
- Legacy batch parameters such as `encrypted_files[items][][file]` are not supported in version `2026-11-19` and return `400 Bad Request`.

## Examples

201 Created201 Created Without Description422 Unprocessable Entity (Outdated Fingerprint)422 Unprocessable Entity
(Missing File)400 Bad Request (Invalid Params)

[[DIDWW-API-EXAMPLE-START]]

http

```
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]
```

curl

```
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/vnd.api+json" -H "Content-Type: multipart/form-data" -H "Authorization: Bearer [access token]"
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "data": {
 6        "id": "377dc5cf-55b3-45b8-9fed-156600a7f151",
 7        "type": "encrypted_files",
 8        "attributes": {
 9            "description": "my file",
10            "expires_at": "2026-04-07T20:53:11.747Z"
11        }
12    },
13    "meta": {
14        "api_version": "2026-11-19"
15    }
16}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]
```

curl

```
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/vnd.api+json" -H "Content-Type: multipart/form-data" -H "Authorization: Bearer [access token]"
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "data": {
 6        "id": "377dc5cf-55b3-45b8-9fed-156600a7f151",
 7        "type": "encrypted_files",
 8        "attributes": {
 9            "description": null,
10            "expires_at": "2026-04-07T20:53:11.747Z"
11        }
12    },
13    "meta": {
14        "api_version": "2026-11-19"
15    }
16}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]
```

curl

```
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/vnd.api+json" -H "Content-Type: multipart/form-data" -H "Authorization: Bearer [access token]"
```

response

```
 1HTTP/1.1 422 Unprocessable Entity
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "errors": [
 6        {
 7            "title": "outdated fingerprint",
 8            "detail": "outdated fingerprint",
 9            "code": "100",
10            "source": {
11                "pointer": "/data"
12            },
13            "status": "422"
14        }
15    ]
16}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]
```

curl

```
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/vnd.api+json" -H "Content-Type: multipart/form-data" -H "Authorization: Bearer [access token]"
```

response

```
 1HTTP/1.1 422 Unprocessable Entity
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "errors": [
 6        {
 7            "title": "can't be blank",
 8            "detail": "file - can't be blank",
 9            "code": "100",
10            "source": {
11                "pointer": "/data/attributes/file"
12            },
13            "status": "422"
14        }
15    ]
16}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
1POST /v3/encrypted_files HTTP/1.1
2Host: api.didww.com
3Content-Type: multipart/form-data
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]
```

curl

```
1curl -i -X POST https://api.didww.com/v3/encrypted_files -H "Accept: application/vnd.api+json" -H "Content-Type: multipart/form-data" -H "Authorization: Bearer [access token]"
```

response

```
 1HTTP/1.1 400 Bad Request
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "errors": [
 6        {
 7            "title": "invalid params",
 8            "detail": "invalid params",
 9            "code": "400",
10            "status": "400"
11        }
12    ]
13}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 403 | No | The access token carries the `read` scope, which does not cover this method (title `Insufficient scope`). The response carries `WWW-Authenticate: Bearer error="insufficient_scope"`. See [Scopes](../../authentication.html#authentication-scopes-v35). |
| 400 | No | [Bad Request Error Object](../../../specification/errors/index.html#api-bad-request) |
| 422 | No | [Validation Error Object](../../../specification/errors/index.html#api-validation-error-object) |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
