EstateHub

Administrator Storage Integration API

Base URL: http://localhost:8000/api/v1
Prefix: /admins/platform-settings/integrations
Auth: Administrator JWT required
Headers: Content-Type: application/json

1. Get Storage Configuration

Retrieve the saved integration state and sanitized configuration.

GET/admins/platform-settings/integrations/storage/

Auth: Required

Headers

HTTP
Authorization: Bearer {{admin_access_token}}
Content-Type: application/json

Success Example

JSON
{
  "success": true,
  "message": "Integration retrieved successfully.",
  "data": {
    "integration": {
      "type": "storage",
      "is_enabled": true,
      "configured": true,
      "config": {
        "provider": "gcs",
        "bucket_name": "example-bucket",
        "project_id": "example-project",
        "has_service_account_json": true,
        "has_access_key_id": false,
        "has_secret_access_key": false,
        "has_api_key": false,
        "has_api_secret": false,
        "has_connection_string": false
      },
      "updated_at": "2026-11-24T10:00:00Z"
    }
  }
}

Notes

Sensitive values are returned as has_* flags. configured means encrypted configuration exists; it does not verify provider credentials. A missing integration record is created disabled.

Applicable errors: 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format.

Unauthorized - HTTP 401

JSON
{
  "success": false,
  "message": "Authentication credentials were not provided.",
  "errors": {}
}

Forbidden - HTTP 403

JSON
{
  "success": false,
  "message": "You do not have permission to perform this action.",
  "errors": {}
}

2. Update Storage Configuration

Save provider configuration and optionally enable or disable the integration.

PATCH/admins/platform-settings/integrations/storage/

Auth: Required

Headers

HTTP
Authorization: Bearer {{admin_access_token}}
Content-Type: application/json

Request Body

FieldTypeRequirement
is_enabledbooleanOptional; preserves the saved state when omitted.
configobjectOptional; merges the submitted fields with saved configuration.

GCS

JSON
{
  "is_enabled": true,
  "config": {
    "provider": "gcs",
    "bucket_name": "example-bucket",
    "project_id": "example-project",
    "service_account_json": {
      "type": "service_account",
      "project_id": "example-project",
      "client_email": "service@example-project.iam.gserviceaccount.com",
      "private_key": "-----BEGIN PRIVATE KEY-----\nreplace-with-private-key\n-----END PRIVATE KEY-----"
    }
  }
}

S3

JSON
{
  "is_enabled": true,
  "config": {
    "provider": "s3",
    "bucket_name": "example-bucket",
    "region": "us-east-1",
    "access_key_id": "replace-with-access-key",
    "secret_access_key": "replace-with-secret-key"
  }
}

Cloudinary

JSON
{
  "is_enabled": true,
  "config": {
    "provider": "cloudinary",
    "cloud_name": "replace-with-cloud-name",
    "api_key": "replace-with-api-key",
    "api_secret": "replace-with-api-secret",
    "secure": true
  }
}

Azure

JSON
{
  "is_enabled": true,
  "config": {
    "provider": "azure",
    "account_name": "replace-with-account-name",
    "container_name": "example-container",
    "connection_string": "replace-with-connection-string"
  }
}

Success Example

JSON
{
  "success": true,
  "message": "Integration updated successfully.",
  "data": {
    "integration": {
      "type": "storage",
      "is_enabled": true,
      "configured": true,
      "config": {
        "provider": "gcs",
        "bucket_name": "example-bucket",
        "project_id": "example-project",
        "has_service_account_json": true,
        "has_access_key_id": false,
        "has_secret_access_key": false,
        "has_api_key": false,
        "has_api_secret": false,
        "has_connection_string": false
      },
      "updated_at": "2026-11-24T10:00:00Z"
    }
  }
}

Notes

Both is_enabled and config are optional. PATCH merges with saved configuration; omit unchanged secrets to retain them. Required values must exist in the merged configuration when enabled. Saving does not verify provider connectivity. Disable with { "is_enabled": false }; re-enable with { "is_enabled": true } when configuration is complete.

Providers: gcs, s3, cloudinary, azure. Changing provider clears the previous provider's fields and retains shared settings. Shared options: make_files_private (boolean), allowed_file_types (string array). service_account_json must be a JSON object. Send only selected provider fields and shared settings.

Required fields when enabled

ProviderRequired fields
gcsbucket_name, project_id, service_account_json
s3bucket_name, region, access_key_id, secret_access_key
cloudinarycloud_name, api_key, api_secret
azureaccount_name, container_name, connection_string

The selected provider is also required.

Configuration fields

FieldTypeDetails
providerenumOptional in a partial update
bucket_namestringMaximum length: 255; blank allowed
project_idstringMaximum length: 255; blank allowed
regionstringMaximum length: 100; blank allowed
service_account_jsonobjectwrite-only
access_key_idstringMaximum length: 255; blank allowed; write-only
secret_access_keystringMaximum length: 255; blank allowed; write-only
endpoint_urlURL stringblank allowed
cloud_namestringMaximum length: 255; blank allowed
api_keystringMaximum length: 255; blank allowed; write-only
api_secretstringMaximum length: 255; blank allowed; write-only
securebooleanOptional in a partial update
account_namestringMaximum length: 255; blank allowed
container_namestringMaximum length: 255; blank allowed
connection_stringstringblank allowed; write-only
make_files_privatebooleanOptional in a partial update
allowed_file_typesstring arrayOptional in a partial update

Disable without deleting configuration

JSON
{
  "is_enabled": false
}

Re-enable with complete saved configuration

JSON
{
  "is_enabled": true
}

When enabling S3 without saved credentials - HTTP 400

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "config": {
      "bucket_name": "This field is required when enabling the integration.",
      "region": "This field is required when enabling the integration.",
      "access_key_id": "This field is required when enabling the integration.",
      "secret_access_key": "This field is required when enabling the integration."
    }
  }
}

Applicable errors: 400 invalid/missing configuration or malformed JSON; 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format; 415 unsupported content type.

Unauthorized - HTTP 401

JSON
{
  "success": false,
  "message": "Authentication credentials were not provided.",
  "errors": {}
}

Forbidden - HTTP 403

JSON
{
  "success": false,
  "message": "You do not have permission to perform this action.",
  "errors": {}
}

Integrations Overview | Product Integration Guide