# Refresh metrics for a participation's submitted content Refreshes metrics (impressions, reach, likes, comments, saves, shares) for a participation's submitted content. Fetches the latest metrics from the social media platform API and creates a snapshot. Requires the participation to have submitted content and the user to have a connected social account with valid OAuth tokens. Returns 200 OK with the created metrics snapshot on success. Endpoint: POST /metrics/participations/{participationId}/refresh Version: 0.1.0 Security: bearerAuth ## Path parameters: - `participationId` (string, required) Unique identifier for the participation Example: "participation_xyz789" ## Response 200 fields (application/json): - `snapshot` (object, required) - `snapshot.snapshotId` (string, required) Unique identifier for the metrics snapshot Example: "snapshot_abc123" - `snapshot.participationId` (string, required) Unique identifier for the participation Example: "participation_xyz789" - `snapshot.externalMediaId` (string, required) External media ID from the social platform (e.g., Instagram post ID) Example: "ABC123" - `snapshot.impressions` (integer, required) Number of impressions Example: 1000 - `snapshot.reach` (integer, required) Number of unique users reached Example: 850 - `snapshot.likes` (integer, required) Number of likes Example: 100 - `snapshot.comments` (integer, required) Number of comments Example: 20 - `snapshot.saves` (integer, required) Number of saves Example: 50 - `snapshot.shares` (integer, required) Number of shares Example: 10 - `snapshot.fetchedAtTimestamp` (string, required) When the metrics were fetched from the platform API Example: "2024-01-01T12:00:00Z" - `snapshot.createdAtTimestamp` (string, required) When the snapshot was created Example: "2024-01-01T12:00:00Z" - `snapshot.lastUpdatedAtTimestamp` (string, required) When the snapshot was last updated Example: "2024-01-01T12:00:00Z" ## Response 400 fields (application/json): - `error` (string, required) Error code Example: "VALIDATION_ERROR" - `message` (string, required) Human-readable error message Example: "Invalid email address or password format" - `details` (object) Additional error details (optional) - `requestId` (string) Unique request identifier for tracing (included in X-Request-ID header) Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z" ## Response 401 fields (application/json): - `error` (string, required) Error code Example: "VALIDATION_ERROR" - `message` (string, required) Human-readable error message Example: "Invalid email address or password format" - `details` (object) Additional error details (optional) - `requestId` (string) Unique request identifier for tracing (included in X-Request-ID header) Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z" ## Response 404 fields (application/json): - `error` (string, required) Error code Example: "VALIDATION_ERROR" - `message` (string, required) Human-readable error message Example: "Invalid email address or password format" - `details` (object) Additional error details (optional) - `requestId` (string) Unique request identifier for tracing (included in X-Request-ID header) Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z" ## Response 503 fields (application/json): - `error` (string, required) Error code Example: "VALIDATION_ERROR" - `message` (string, required) Human-readable error message Example: "Invalid email address or password format" - `details` (object) Additional error details (optional) - `requestId` (string) Unique request identifier for tracing (included in X-Request-ID header) Example: "550e8400-e29b-41d4-a716-446655440000" - `timestamp` (string, required) ISO 8601 timestamp when the error occurred Example: "2024-01-01T00:00:00Z"