Data Contract
Protocol Specification

Protocol Specification

All Data Contract endpoints accept POST requests with a JSON body and return JSON responses. Requests are authenticated via HMAC signatures.

Common Request Headers

HeaderDescription
Content-Typeapplication/json
X-SignatureHMAC-SHA256 signature
X-TimestampUnix timestamp (ms) of the request
X-Request-IdUnique request identifier

Common Request Body

All endpoints receive:

{
  "userId": "usr_abc123",
  "action": "describe" | "export" | "delete"
}

describe

Returns a description of what data the app stores for a given user.

Request:

{
  "userId": "usr_abc123",
  "action": "describe"
}

Response (200):

{
  "status": "ok",
  "data": {
    "fields": [
      {
        "name": "profile",
        "description": "User profile information",
        "fields": [
          { "name": "displayName", "type": "string", "description": "Display name" },
          { "name": "email", "type": "string", "description": "Email address" },
          { "name": "avatarUrl", "type": "string", "description": "Profile picture URL" }
        ]
      },
      {
        "name": "preferences",
        "description": "App preferences and settings",
        "fields": [
          { "name": "theme", "type": "string", "description": "UI theme preference" },
          { "name": "notifications", "type": "boolean", "description": "Notification opt-in" }
        ]
      }
    ]
  }
}

export

Returns all data stored for the user.

Request:

{
  "userId": "usr_abc123",
  "action": "export"
}

Response (200):

{
  "status": "ok",
  "data": {
    "profile": {
      "displayName": "Alice",
      "email": "alice@example.com",
      "avatarUrl": "https://cdn.example.com/alice.jpg"
    },
    "preferences": {
      "theme": "dark",
      "notifications": true
    },
    "activity": [
      { "type": "login", "timestamp": "2025-01-15T10:30:00Z" }
    ]
  }
}

delete

Deletes all data for the user. Supports both synchronous and asynchronous deletion.

Request:

{
  "userId": "usr_abc123",
  "action": "delete"
}

Synchronous Response (200):

{
  "status": "completed"
}

Asynchronous Response (202):

{
  "status": "pending",
  "trackingId": "del_xyz789",
  "estimatedCompletionMs": 30000
}

Polling Async Deletions

When a deletion returns status: "pending", the platform polls the same endpoint with the tracking ID:

{
  "userId": "usr_abc123",
  "action": "delete",
  "trackingId": "del_xyz789"
}

Poll Response — Still Processing (202):

{
  "status": "pending",
  "trackingId": "del_xyz789"
}

Poll Response — Complete (200):

{
  "status": "completed",
  "trackingId": "del_xyz789"
}

Status Codes

CodeMeaning
200Success — operation completed
202Accepted — async deletion in progress
400Bad request — invalid payload
401Unauthorized — invalid or missing signature
404User not found
429Rate limited
500Internal server error

Error Response

{
  "status": "error",
  "error": {
    "code": "USER_NOT_FOUND",
    "message": "No data found for the specified user"
  }
}

Error codes: INVALID_ACTION, USER_NOT_FOUND, INVALID_SIGNATURE, RATE_LIMITED, INTERNAL_ERROR.


© 2026 Shell Technology. All rights reserved.