---
title: "Archive a file"
method: PUT
path: "/files/default/{fileKey}"
---

# Archive a file

`PUT /files/default/{fileKey}`

## Request

- Base URL: `https://eventfeed.api.globalrelay.com/v2`
- URL: `https://eventfeed.api.globalrelay.com/v2/files/default/{fileKey}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://iam-oauth2.globalrelay.com/oauth2/token` scopes: `file`, `write`, `openid`
- TypeScript: <https://skmtc.dev/globalrelay/apis/event-archiving-api/docs/files/default/:fileKey/put.ts> (a function with typed inputs; its response is checked against the schema)

Store a file in your Global Relay Archive.

The service won't store partial objects; if no error is returned the entire object was stored.

## Path parameters

- `fileKey` string, required

## Headers

- `Host` string, required
- `Content-Length` string, required
- `Content-Type` string, required
- `Content-Encoding` string
- `Content-Language` string

## Request body `application/octet-stream`

- string, binary

## Response `200`

The action was successful.

## Other responses

- `400`: Bad Request - often due to a missing/invalid request parameter or header.
- `401`: Unauthorized.
- `403`: Forbidden.
- `411`: You must provide the Content-Length HTTP header.
- `429`: Rate Limit for this endpoint has been exceeded. Check headers for more information.
- `500`: We encountered an internal error. Please try again.
- `503`: Service temporarily unavailable / rate limit reached.

---

[API](https://skmtc.dev/globalrelay/apis/event-archiving-api.md) - [All operations](https://skmtc.dev/globalrelay/apis/event-archiving-api/llms.txt) - [OpenAPI document](https://skmtc.dev/globalrelay/apis/event-archiving-api/revisions/0678c3625505?raw)
