{
  "info": {
    "_postman_id": "a7a8b9c0-d1e2-f3g4-h5i6-j7k8l9m0n1o2",
    "name": "Deywuro Sender ID API",
    "description": "API collection for managing Sender IDs in the Deywuro platform",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Authentication",
      "description": "Endpoints for API authentication",
      "item": [
        {
          "name": "Verify API Key",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/auth/verify",
              "host": ["{{base_url}}"],
              "path": ["auth", "verify"]
            },
            "description": "Verify that the API key is valid and retrieve client information"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Sender IDs",
      "description": "Endpoints for managing sender IDs",
      "item": [
        {
          "name": "Create Sender ID",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"sender_id\": \"TESTAPI\",\n    \"user_name\": \"{{username}}\",\n    \"password\": \"{{password}}\",\n    \"IP\": \"{{ip_address}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/sender-id",
              "host": ["{{base_url}}"],
              "path": ["sender-id"]
            },
            "description": "Create a new sender ID request"
          },
          "response": []
        },
        {
          "name": "Get All Sender IDs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/sender-id?page=1&limit=10",
              "host": ["{{base_url}}"],
              "path": ["sender-id"],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "10"
                }
              ]
            },
            "description": "Get all sender IDs for the authenticated client"
          },
          "response": []
        },
        {
          "name": "Get Pending Sender IDs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/sender-id?page=1&limit=10&status=PENDING",
              "host": ["{{base_url}}"],
              "path": ["sender-id"],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "10"
                },
                {
                  "key": "status",
                  "value": "PENDING"
                }
              ]
            },
            "description": "Get all pending sender ID requests"
          },
          "response": []
        },
        {
          "name": "Get Approved Sender IDs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/sender-id?page=1&limit=10&status=APPROVED",
              "host": ["{{base_url}}"],
              "path": ["sender-id"],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "10"
                },
                {
                  "key": "status",
                  "value": "APPROVED"
                }
              ]
            },
            "description": "Get all approved sender ID requests"
          },
          "response": []
        },
        {
          "name": "Get Rejected Sender IDs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/sender-id?page=1&limit=10&status=REJECTED",
              "host": ["{{base_url}}"],
              "path": ["sender-id"],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "10"
                },
                {
                  "key": "status",
                  "value": "REJECTED"
                }
              ]
            },
            "description": "Get all rejected sender ID requests"
          },
          "response": []
        },
        {
          "name": "Get Specific Sender ID",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/sender-id/{{sender_id}}",
              "host": ["{{base_url}}"],
              "path": ["sender-id", "{{sender_id}}"]
            },
            "description": "Get details for a specific sender ID"
          },
          "response": []
        },
        {
          "name": "Get Request by ID",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/sender-id/request/{{request_id}}",
              "host": ["{{base_url}}"],
              "path": ["sender-id", "request", "{{request_id}}"]
            },
            "description": "Get details for a specific request ID"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Whitelist Management",
      "description": "Endpoints for managing IP whitelisting",
      "item": [
        {
          "name": "Get Whitelisted IPs",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/whitelist",
              "host": ["{{base_url}}"],
              "path": ["whitelist"]
            },
            "description": "Get all whitelisted IP addresses for the API client"
          },
          "response": []
        },
        {
          "name": "Add IP to Whitelist",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"ip_address\": \"{{ip_to_whitelist}}\",\n    \"description\": \"Office IP Address\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/whitelist/add",
              "host": ["{{base_url}}"],
              "path": ["whitelist", "add"]
            },
            "description": "Add an IP address to the whitelist"
          },
          "response": []
        },
        {
          "name": "Remove IP from Whitelist",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"ip_address\": \"{{ip_to_remove}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/whitelist/remove",
              "host": ["{{base_url}}"],
              "path": ["whitelist", "remove"]
            },
            "description": "Remove an IP address from the whitelist"
          },
          "response": []
        }
      ]
    },
    {
      "name": "API Key Management",
      "description": "Endpoints for managing API keys (Admin only)",
      "item": [
        {
          "name": "Generate API Key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{admin_api_key}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"client_id\": \"{{client_id}}\",\n    \"expiry_date\": \"2026-12-31\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/keys/generate",
              "host": ["{{base_url}}"],
              "path": ["keys", "generate"]
            },
            "description": "Generate a new API key for a client (Admin only)"
          },
          "response": []
        },
        {
          "name": "Revoke API Key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Authorization",
                "value": "Bearer {{admin_api_key}}",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"api_key\": \"{{key_to_revoke}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/keys/revoke",
              "host": ["{{base_url}}"],
              "path": ["keys", "revoke"]
            },
            "description": "Revoke an API key (Admin only)"
          },
          "response": []
        },
        {
          "name": "List API Keys",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{admin_api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/keys/list?client_id={{client_id}}",
              "host": ["{{base_url}}"],
              "path": ["keys", "list"],
              "query": [
                {
                  "key": "client_id",
                  "value": "{{client_id}}"
                }
              ]
            },
            "description": "List all API keys for a client (Admin only)"
          },
          "response": []
        }
      ]
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "http://localhost:8001",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "test_api_key_12345",
      "type": "string"
    },
    {
      "key": "admin_api_key",
      "value": "admin_api_key_12345",
      "type": "string"
    },
    {
      "key": "username",
      "value": "npontutest",
      "type": "string"
    },
    {
      "key": "password",
      "value": "npontutest",
      "type": "string"
    },
    {
      "key": "ip_address",
      "value": "127.0.0.1",
      "type": "string"
    },
    {
      "key": "ip_to_whitelist",
      "value": "192.168.1.100",
      "type": "string"
    },
    {
      "key": "ip_to_remove",
      "value": "192.168.1.100",
      "type": "string"
    },
    {
      "key": "sender_id",
      "value": "TESTAPI",
      "type": "string"
    },
    {
      "key": "request_id",
      "value": "REQ_123456",
      "type": "string"
    },
    {
      "key": "client_id",
      "value": "test_client",
      "type": "string"
    }
  ]
} 