Box Developer Documentation
Latest version

Create archive

post
https://api.box.com/2.0
/archives

Creates an archive.

To learn more about the archive APIs, see the Archive API Guide.

Request

bearer [ACCESS_TOKEN]
application/json

Request Headers

stringin headerrequired

Version header.

Value is always 2025.0

Request Body

stringin bodyoptional
"This is an archive for important documents."

The description of the archive.

stringin bodyrequired
"Some Archive"

The name of the archive.

stringin bodyoptional
"100001"

The ID of the storage policy that the archive is assigned to.

Response

application/jsonArchive

Returns a new archive object.

application/jsonClient error

Returned when some of the parameters are missing or not valid.

application/jsonClient error

Returned when the access token provided in the Authorization header is not recognized or not provided.

application/jsonClient error

Returned when the authenticated user does not have the right permissions to create an archive.

application/jsonClient error

Returned when an archive with the given name already exists.

application/jsonClient error

Returned when an unexpected server error occurs.

application/jsonClient error

Returned when an unexpected client error occurs.

post
Create archive
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versioning strategy.


cURL
curl -i -X POST "https://api.box.com/2.0/archives" \
     -H "box-version: 2025.0" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "name": "Some Archive Name",
       "description": "Some Archive Description"
     }'
Node/TypeScript v10
await client.archives.createArchiveV2025R0({
  name: archiveName,
  description: archiveDescription,
} satisfies CreateArchiveV2025R0RequestBody);
Python v10
client.archives.create_archive_v2025_r0(archive_name)
.NET v10
await client.Archives.CreateArchiveV2025R0Async(requestBody: new CreateArchiveV2025R0RequestBody(name: archiveName));
Swift v10
try await client.archives.createArchiveV2025R0(requestBody: CreateArchiveV2025R0RequestBody(name: archiveName))
Java v10
client.getArchives().createArchiveV2025R0(new CreateArchiveV2025R0RequestBody(archiveName))

Response Example

{
  "id": "12345",
  "type": "archive",
  "description": "This is an archive for important documents.",
  "name": "Archive",
  "owned_by": {
    "id": "12345",
    "type": "user"
  },
  "size": 123456789
}