# Create a new file

> Create a new file

POST

/files/

Creates a new file and returns the file's details.

#### Helpful resources

-   [Upload and attach files](https://developer.rippling.com/documentation/rest-api/guides/file-uploads)

### Required Scopes

-   files.read-write
    

### Request

-   application/json

**Body**

**status** string required

Lifecycle status: awaiting\_upload | uploaded | active | infected

**display\_name** string

Human-readable label for the file

**content\_type** string

MIME type supplied by the client at create time

**upload\_url** string

S3 endpoint URL — POST your multipart form here to upload the file. Present only in the create response.

**upload\_fields** object

Required form fields to include in the multipart POST to S3 alongside the file binary

**url\_data** object

URLs for accessing the uploaded file after a successful upload

**s3\_url** string

S3 URL where the file is accessible after upload

**preview\_url** string

CDN URL for previewing the uploaded file after upload completes

## Responses

-   200

Successful response

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**id** string required

Opaque identifier for this file

**status** string required

Lifecycle status: awaiting\_upload | uploaded | active | infected

**display\_name** string

Human-readable label for the file

**content\_type** string

MIME type supplied by the client at create time

**upload\_url** string

S3 endpoint URL — POST your multipart form here to upload the file. Present only in the create response.

**upload\_fields** object

Required form fields to include in the multipart POST to S3 alongside the file binary

**url\_data** object

URLs for accessing the uploaded file after a successful upload

**s3\_url** string

S3 URL where the file is accessible after upload

**preview\_url** string

CDN URL for previewing the uploaded file after upload completes

```json
{
  "id": "string",
  "status": "string",
  "display_name": "string",
  "content_type": "string",
  "upload_url": "string",
  "upload_fields": {},
  "url_data": {
    "s3_url": "string",
    "preview_url": "string"
  }
}
```

Source: https://developer.rippling.com/documentation/rest-api/reference/create-files

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
