{
  "info": {
    "name": "Sticky Calls API",
    "_postman_id": "sticky-calls-api-collection",
    "description": "Call Memory API for contact centers - remember caller context across interactions.\n\n**Getting Started:**\n1. Set your API key in the collection variables\n2. Run `/calls/start` to retrieve caller context\n3. Run `/calls/end` to save conversation data\n\n**Documentation:** https://docs.stickycalls.com",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.stickycalls.com",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "YOUR_API_KEY",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Calls",
      "item": [
        {
          "name": "Start Call - Basic",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call_{{$randomUUID}}\",\n  \"identity_hints\": {\n    \"ani\": \"+14155551234\"\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/calls/start",
              "host": ["{{base_url}}"],
              "path": ["v1", "calls", "start"]
            },
            "description": "Retrieve caller context at the start of a call using phone number (ANI) only.\n\n**Returns:** customer_ref, identity (confidence, level, sources, recommendation), open_intents, and variables from previous interactions."
          },
          "response": []
        },
        {
          "name": "Start Call - With External IDs",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call_{{$randomUUID}}\",\n  \"identity_hints\": {\n    \"ani\": \"+14155551234\",\n    \"dnis\": \"+18005551000\",\n    \"external_ids\": {\n      \"crm_id\": \"crm_12345\",\n      \"account_number\": \"ACC-789\"\n    }\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/calls/start",
              "host": ["{{base_url}}"],
              "path": ["v1", "calls", "start"]
            },
            "description": "Retrieve caller context with external IDs for stronger matching.\n\n**Best Practice:** Include CRM ID, account number, or other unique identifiers for highest confidence matching."
          },
          "response": []
        },
        {
          "name": "Start Call - With Telco Data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call_{{$randomUUID}}\",\n  \"identity_hints\": {\n    \"ani\": \"+14155551234\"\n  },\n  \"telco\": {\n    \"line_type\": \"mobile\"\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/calls/start",
              "host": ["{{base_url}}"],
              "path": ["v1", "calls", "start"]
            },
            "description": "Retrieve caller context with telco enrichment data from providers like Twilio Lookup or numverify.\n\n**Confidence Boost:** Mobile numbers get higher confidence than landlines or VoIP."
          },
          "response": []
        },
        {
          "name": "End Call - Save Context",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}",
                "description": "Prevents duplicate saves if request is retried"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call_123\",\n  \"customer_ref\": \"cust_abc123\",\n  \"intent\": \"refund_request\",\n  \"intent_status\": \"open\",\n  \"variables\": {\n    \"name\": \"John Doe\",\n    \"account_balance\": \"$1,234.56\",\n    \"order_id\": \"12345\",\n    \"preferred_language\": \"English\",\n    \"summary\": \"Customer called about refund for order 12345. Promised callback within 24 hours.\",\n    \"crm_id\": \"crm_12345\",\n    \"salesforce_id\": \"sf_67890\"\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/calls/end",
              "host": ["{{base_url}}"],
              "path": ["v1", "calls", "end"]
            },
            "description": "Save conversation data at the end of a call.\n\n**customer_ref:** Customer reference from /calls/start response\n**intent:** Primary intent of this call (e.g., refund_request, billing_inquiry)\n**intent_status:** 'open' for unresolved issues, 'resolved' for completed\n**variables:** Key facts collected (name, balance, preferences, summary, IDs)"
          },
          "response": []
        },
        {
          "name": "End Call - Resolve Intent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$randomUUID}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"call_id\": \"call_456\",\n  \"customer_ref\": \"cust_abc123\",\n  \"intent\": \"refund_request\",\n  \"intent_status\": \"resolved\",\n  \"variables\": {\n    \"resolution\": \"Issue resolved - refund processed successfully\",\n    \"refund_amount\": \"$50.00\"\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/calls/end",
              "host": ["{{base_url}}"],
              "path": ["v1", "calls", "end"]
            },
            "description": "Mark previously open intent as resolved.\n\n**Use Case:** Customer called back, issue was resolved during this call.\n\n**intent_status:** Use 'resolved' to close the intent, 'open' to keep it active"
          },
          "response": []
        }
      ],
      "description": "Call session management and context retrieval"
    },
    {
      "name": "Health",
      "item": [
        {
          "name": "Health Check",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/health",
              "host": ["{{base_url}}"],
              "path": ["v1", "health"]
            },
            "description": "Check API service health and database connectivity.\n\n**No authentication required.**"
          },
          "response": []
        }
      ],
      "description": "Service health monitoring"
    }
  ]
}
