v4

latestSwagger 2.02026-08-0343714211.7 MB
api_keys
API Keys

Update API Key

Update API Key

patch/api_keys/{id}

Path parameters

idinteger required

Api Key ID.

Response

The ApiKeys object.

idinteger

API Key ID

descriptive_labelstring

Unique label that describes this API key. Useful for external systems where you may have API keys from multiple accounts and want a human-readable label for each key.

descriptionstring

User-supplied description of API key.

created_atstring date-time

Time which API Key was created

expires_atstring date-time

API Key expiration date

keystring

API Key actual key string

aws_style_credentialsboolean

If true, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.

aws_access_key_idstring

AWS Access Key ID to use with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.

aws_secret_keystring

AWS Secret Key to use with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.

last_use_atstring date-time

API Key last used - note this value is only updated once per 3 hour period, so the 'actual' time of last use may be up to 3 hours later than this timestamp.

namestring

Internal name for the API Key. For your use.

permission_set'none' | 'full' | 'desktop_app' | 'sync_app' | 'office_integration' | 'mobile_app' | 'files_only'

Permissions for this API Key. Keys with the desktop_app permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the office_integration permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the files_only permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.

platformstring

If this API key represents a Desktop app, what platform was it created on?

site_idinteger

Site ID

site_namestring

Site Name

urlstring

URL for API host.

user_idinteger

User ID for the owner of this API Key. May be blank for Site-wide API Keys.

workspace_idinteger

Workspace ID for this API Key. 0 means the default workspace.

Example response

{
  "id": 1,
  "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
  "description": "example",
  "created_at": "2000-01-01T01:00:00Z",
  "expires_at": "2000-01-01T01:00:00Z",
  "key": "[key]",
  "aws_style_credentials": true,
  "aws_access_key_id": "[aws_access_key_id]",
  "aws_secret_key": "[aws_secret_key]",
  "last_use_at": "2000-01-01T01:00:00Z",
  "name": "My Main API Key",
  "permission_set": "full",
  "platform": "win32",
  "site_id": 1,
  "site_name": "example",
  "url": "example",
  "user_id": 1,
  "workspace_id": 1
}