1. SDK
PRAEMUNIO API
  • Praemunio API - v1
  • Praemunio SDK
  • AUTHENTICATION
    • API KEY Authentification
      POST
    • Refresh API
      POST
  • CORE
    • Teams
      • Members
        • Get Team Members
        • Add Team Member
        • Add Team Member Copy
      • Get Account Teams
      • Create Team
      • Get Team Details
      • Update Team Data
      • Delete Team
      • Get Team Data
      • Get Team workspaces
      • Get Team logs
    • Workspaces
      • Get Account Drive
      • Get Workspaces By Team
      • Create New Workspace
      • Get Workspace Details
      • Get Team Workspaces
      • Update workspace
      • Delete workspace
    • Folders
      • Get Folders
      • Create Folder
      • Get Folder Details
      • Get Folder Content
      • Update Folder
      • Delete Folder
      • Move Folder
    • Documents
      • Get Document Info
      • Get Document By Workspace
      • Update Document
      • Delete Document
      • Archive Document
      • Restore Document
      • Move Document
      • Stream Document
      • Stream Document Copy
      • Upload Document
  • SDK
    • Typescript
    • Rust
    • Python
    • PHP
    • GO
  1. SDK

PHP

Praemunio PHP SDK#

Official PHP client for the Praemunio API.

Installation#

Or add to your composer.json:
{
    "require": {
        "praemunio/sdk": "^1.0"
    }
}
Then run:

Quick Start#

1. Get Your API Keys#

Retrieve your keys from the Praemunio Dashboard:
Public Key: pk_test_... (sandbox) or pk_live_... (production)
Secret Key: sk_test_... (sandbox) or sk_live_... (production)

2. Initialize the Client#

3. Authenticate#

4. First API Call#

5. Complete Example#

API Reference#

Workspaces API#

Access via $client->workspaces()

list(?string $team_id = null)#

List all workspaces, optionally filtered by team.
ParameterTypeRequiredDescription
team_id?stringNoFilter by team ID

drive()#

Get the drive (root folders) for the authenticated user.

teams(?string $team_id = null)#

Get teams associated with workspaces.

details(?string $workspace_id = null)#

Get workspace details.

create($request)#

Create a new workspace.
ParameterTypeRequiredDescription
namestringYesWorkspace name
descriptionstringYesWorkspace description
team_idstringYesTeam ID to associate

update($request)#

Update a workspace.

delete($request)#

Delete a workspace.

Teams API#

Access via $client->teams()

list()#

List all teams.

dashboard()#

Get teams dashboard data.

info($body = null, ?array $team_id = null)#

Get team information.

workspaces(?string $team_id = null)#

Get workspaces associated with teams.

logs(?array $team_id = null, ?string $page = null, ?string $limit = null)#

Get team logs.

create($request)#

Create a new team.
ParameterTypeRequiredDescription
namestringYesTeam name
description?stringNoTeam description
typestringYesindividual or legal_entity

update($request)#

Update a team.

delete($request)#

Delete a team.

Teams Members API#

Access via $client->teamsMembers()

list(?string $team_id = null, ?float $page = null, ?float $limit = null)#

List team members with pagination.
ParameterTypeRequiredDescription
team_id?stringNoTeam ID
page?floatNoPage number (default: 1)
limit?floatNoItems per page (default: 10)

add($request)#

Add a member to a team.
ParameterTypeRequiredDescription
team_idstringYesTeam ID
emailstringYesMember email

Folders API#

Access via $client->folders()

list(string $workspace_id)#

List folders in a workspace.
ParameterTypeRequiredDescription
workspace_idstringYesWorkspace ID

content(?array $folder_id = null)#

Get folder content.

details(?string $folder_id = null)#

Get folder details.

create($request)#

Create a new folder.
ParameterTypeRequiredDescription
workspace_idstringYesWorkspace ID
namestringYesFolder name
description?stringNoFolder description
parent_folder_id?stringNoParent folder ID

update($request)#

Update a folder.

move($request)#

Move a folder.

delete($request)#

Delete a folder.

Documents API#

Access via $client->documents()

list(?string $workspace_id = null)#

List documents in a workspace.

details(?string $document_id = null)#

Get document details.

upload(?string $workspace_id = null, ?string $folder_id = null, $file1 = null, $file2 = null)#

Upload a document.
ParameterTypeRequiredDescription
workspace_id?stringNoWorkspace ID
folder_id?stringNoFolder ID
file1mixedNoFile (primary)
file2mixedNoFile (secondary)

stream($body = null, ?string $document_id = null)#

Stream a document.

archive($request)#

Archive a document.
ParameterTypeRequiredDescription
document_idstringYesDocument ID
reason?stringNoArchive reason

restore($request)#

Restore an archived document.

move($request)#

Move a document.

update($request)#

Update a document.

delete($request)#

Delete a document.

Authentication#

Initial Authentication#

Automatic Token Refresh#

The SDK automatically handles token refresh. You can also force it manually:

Manual Token Management#

Environments#

EnvironmentURLUsage
Sandboxhttps://sandbox-api.praemunio.org/api/v1Testing and development
Livehttps://api.praemunio.org/api/v1Production

Error Handling#

PHP 8.1+#

The SDK supports PHP 8.1 and later versions.

Documentation#

Official Documentation
API Reference
Authentication Guide

Support#

🐛 Report a Bug
💬 Discord
📧 Email
Modified at 2026-11-24 13:53:27
Previous
Python
Next
GO
Built with