API Key

Operations for managing API keys

Get API Key

Retrieve an API key by its ID

GET

https://dev.officex.app/v1/drive/{organization_id}/api_keys/get/{api_key_id}

Run In Postman

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

api_key_id (required)

string (ApiKeyID)

ID of the API key to retrieve

ApiKeyID_abc123

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

Responses

chevron-rightsuccesshashtag
{
    "ok": {
        "data": {
            "id": "ApiKeyID_b9cfb179-f01b-4f23-a9bd-313211815c4c",
            "value": "eyJhdXRoX3R5cGUiOiJBUElfS0VZIiwidmFsdWUiOiJlOWY2M2FhMzc2YWVkMjg2YWJhZWNkZTNhOWFkOTIwZTllN2VmMzhhM2Q4ZGQyNWMwZTcxMTA2NGQ2YjMzYzc3In0=",
            "user_id": "UserID_3hrnt-ylswl-acoxp-fx4qh-irpw4-wyyx5-pdjfq-ih5cl-d2xy3-dfbga-tae",
            "name": "My API Key",
            "created_at": 1756124936665,
            "begins_at": 1756124936665,
            "expires_at": -1,
            "is_revoked": 0,
            "external_id": null,
            "external_payload": null,
            "labels": [],
            "permission_previews": [
                "CREATE",
                "VIEW",
                "EDIT",
                "DELETE",
                "INVITE"
            ]
        }
    }
}

chevron-righterrorhashtag

Typescript Types


List API Keys

List all API keys for a specific user

POST

Run In Postman

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

api_key_id (required)

string (ApiKeyID)

ID of the API key to retrieve

ApiKeyID_abc123

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightRequest Body schemahashtag

user_id

string (UserID) Unique identifier for a user

UserID_abc123

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Create API Key

Create a new API key

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schema:hashtag

name (required)

string <= 256 characters

Name for the API key

Development API Key

user_id

string (UserID) Unique identifier for a user

UserID_abc123

expires_at

integer or null <int64>

Timestamp when the key expires, -1 for never expires

1703980800000

external_id

string or null <= 256 characters External identifier

ext-key-001

external_payload

string or null <= 8192 characters Additional data for external systems (Stringified JSON)

"{"department": "engineering", "purpose": "backend-integration"}"

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Update API Key

Update API key

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

id (required)

string (ApiKeyID) Unique identifier for an API key

ApiKeyID_b9cfb179-f01b-4f23-a9bd-...

name

string <= 256 characters

Name for the API key

Development API Key

begins_at

integer or null Timestamp when the key begins

0

expires_at

integer or null <int64>

Timestamp when the key expires, -1 for never expires

-1

is_revoked

boolean or null

Whether to revoke the API key

false

external_id

string or null <= 256 characters External identifier

ext-key-001

external_payload

string or null <= 8192 characters Additional data for external integrations.

(Stringified JSON)

"{"department": "engineering", "purpose": "backend-integration"}"

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Delete API Key

Delete an existing API key

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

id (required)

string (ApiKeyID) Unique identifier for an API key

ApiKeyID_abc123

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types

Last updated