API Requests

Learn how to authenticate and make requests to the RiskOS™ API with comprehensive examples and best practices.

Quick reference

Sandbox Base URL
https://riskos.sandbox.socure.com/api/evaluation
Production Base URL
https://riskos.socure.com/api/evaluation
Authentication
Authorization: Bearer YOUR_API_KEY
Content Type
Content-Type: application/json

Environment setup

Base URLs

Choose the appropriate environment for your integration:

  https://riskos.socure.com/api/evaluation

Use for live applications with real customer data.

📘

Important for Sandbox Testing

The Sandbox environment requires specific field values to return properly formatted responses. Modifying input data outside of documented test values may result in HTTP errors.


Authentication

All API requests require authentication using Bearer tokens:

  1. Get your API key from the Developer Workbench > API Keys section in the RiskOS™ Dashboard.
  2. Include in requests using the Authorization header.
  3. Keep it secure- never expose API keys in client-side code.
Authorization: Bearer YOUR_API_KEY

HTTP methods and usage

The RiskOS™ API follows REST conventions with standard HTTP methods:

MethodPurposeCommon Use Cases
POSTCreate resourcesStart new evaluation
GETRetrieve dataFetch evaluation results
PUTReplace resourcesUpdate evaluation state
PATCHPartial updatesAdd additional data points

Required headers

Include your API key in the Authorization header as a Bearer token, along with standard JSON headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json      # For POST/PUT/PATCH requests

Optional headers

HeaderPurposeExample
X-API-VersionPins a specific API version to ensure backward compatibility with evolving RiskOS™ endpoints.2025-01-01.orion
AcceptIndicates the preferred response format. Optional since all responses are JSON by default.application/json

Complete request examples

Start an evaluation

Create a new evaluation with customer data:

curl --request POST \
--url "https://riskos.sandbox.socure.com/api/evaluation" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data '{
  "id": "customer-onb-12345",
  "timestamp": "2024-12-01T08:15:30.456Z",
  "workflow": "consumer_onboarding",
  "data": {
    "individual": {
      "given_name": "Jane",
      "family_name": "Doe",
      "email": "[email protected]",
      "phone_number": "+1-555-123-4567",
      "address": {
        "line_1": "123 Main St",
        "locality": "San Francisco",
        "major_admin_division": "CA",
        "postal_code": "94105",
        "country": "US"
      }
    }
  }
}'

Retrieve the evaluation results

Get the current state and results of an evaluation:

  curl --request GET \
  --url "https://riskos.sandbox.socure.com/api/evaluation/eval_abc123" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json"

Update evaluation state

Change the status of an evaluation after manual review:

curl --request PUT \
  --url https://riskos.socure.com/api/evaluation/eval_id/state \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "accept: application/json" \
  --header "content-type: application/json" \
  --data '{
    "workflow": "consumer_onboarding",
    "decision": "REVIEW",
    "status": "OPEN",
    "sub_status": "In Review",
    "notes": "Verification documents pending re-check",
    "attachments": [
      {
        "file_name": "case.jpeg",
        "file_data": "JVBERi0xLjUKJeLjz9MKMyAwIG9iago8PC9..."
      }
    ]
  }'

Add additional data

Partially update an evaluation with new information:

curl --request PATCH \
  --url https://riskos.socure.com/api/evaluation/{eval_id} \
  --header "accept: application/json" \
  --header "content-type: application/json" \
  --data '{
    "id": "onb-12345",
    "timestamp": "2023-12-01T08:15:30.456Z",
    "workflow": "consumer_onboarding",
    "data": {
      "device": {
        "id": "DEVICE-123456",
        "ip_address": "192.168.1.10",
        "session": "UPDATED-SESSION-1234"
      }
    }
  }'

Parameter types

Path parameters

Required in URLs to specify the resource:

/api/evaluation/{eval_id}          # eval_id is a path parameter
/api/evaluation/{eval_id}/state    # eval_id is required

Body parameters

Sent in the request body as JSON:

{
  "id": "string",           // Required: Your unique identifier
  "workflow": "string",     // Required: Workflow type
  "data": { ... },          // Required: Customer data
  "timestamp": "string"     // Optional: ISO 8601 timestamp
}

Best practices

Security
  • Never hardcode API keys in source code
    • Use environment variables for sensitive configuration
    • Implement proper key rotation procedures
    • Use HTTPS only for all API requests
    • Validate SSL certificates in production
Performance
  • Implement request timeouts (recommended: 30 seconds)
    • Use connection pooling for high-volume applications
    • Cache evaluation results when appropriate
    • Implement exponential backoff for retries
    • Monitor rate limits and adjust request frequency
Reliability
  • Always check response status codes
    • Implement proper error handling
    • Log request/response data for debugging
    • Use unique request IDs for tracing
    • Implement circuit breaker patterns for high availability
Development
  • Start with Sandbox environment for all testing
    • Use realistic test data to verify integration
    • Implement comprehensive logging
    • Test error scenarios thoroughly
    • Document your integration for team members

Rate limits

The RiskOS™ API implements rate limiting to ensure service stability:

  • Sandbox: 100 requests per minute
  • Production: Contact support for limits based on your plan

When rate limited, you'll receive a 429 status code with retry information in headers. See Rate Limits for more information.