{
  "info": {
    "name": "Copply: Age Verification API",
    "description": "Age verification API and parental consent API for apps handling COPPA, state online-safety rules, privacy deletion logs, and audit-ready consent workflows.\n\n## Important: You Need a Copply API Key\n\nCreate a Copply account and generate a Copply API key at https://copply.basemapped.com/keys, then set the `copply_api_key` collection variable.\n\nSend the key on every API request as:\n\n`Authorization: Bearer cp_live_your_key_here`\n\nFor public examples, use `cp_test_your_key_here`. RapidAPI marketplace keys or `X-RapidAPI-Key` headers do not authenticate Copply requests yet.\n\nFull docs: https://copply.basemapped.com/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://copply.basemapped.com/api/copply",
      "type": "string"
    },
    {
      "key": "copply_api_key",
      "value": "cp_test_your_key_here",
      "type": "string",
      "description": "Create a Copply dashboard key at https://copply.basemapped.com/keys. Use Authorization: Bearer cp_live_... in production."
    },
    {
      "key": "user_id",
      "value": "postman-user-1",
      "type": "string"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{copply_api_key}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Verification",
      "item": [
        {
          "name": "Verify Age - Texas Minor",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\",\n  \"declaredAge\": 17,\n  \"stateHint\": \"TX\",\n  \"devicePlatform\": \"web\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/verify-age",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "verify-age"
              ]
            },
            "description": "Returns allowed, blocked, or requiresConsent for a user based on configured state rules."
          }
        },
        {
          "name": "Verify Age - Federal No Age",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\",\n  \"stateHint\": \"Federal\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/verify-age",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "verify-age"
              ]
            },
            "description": "Shows how Copply behaves when age is not declared."
          }
        }
      ]
    },
    {
      "name": "Consent",
      "item": [
        {
          "name": "Check Consent Status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\",\n  \"consentMethod\": \"check\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/parental-consent",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "parental-consent"
              ]
            },
            "description": "Reads the latest consent record for a user."
          }
        },
        {
          "name": "Request Email Consent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\",\n  \"consentMethod\": \"email\",\n  \"parentEmail\": \"parent@example.com\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/parental-consent",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "parental-consent"
              ]
            },
            "description": "Sends a parent verification email through the configured Resend sender."
          }
        },
        {
          "name": "Request Credit Card Consent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\",\n  \"consentMethod\": \"creditcard\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/parental-consent",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "parental-consent"
              ]
            },
            "description": "Creates a Stripe PaymentIntent for credit-card consent verification."
          }
        },
        {
          "name": "Request ID Upload Consent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\",\n  \"consentMethod\": \"idupload\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/parental-consent",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "parental-consent"
              ]
            },
            "description": "Creates a Persona inquiry for ID verification."
          }
        },
        {
          "name": "Create Signed Upload URL",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"filename\": \"parent-id.jpg\",\n  \"contentType\": \"image/jpeg\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/get-upload-url",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "get-upload-url"
              ]
            },
            "description": "Creates a Supabase signed upload URL for ID evidence."
          }
        }
      ]
    },
    {
      "name": "Privacy",
      "item": [
        {
          "name": "Delete Verification Data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": \"{{user_id}}\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/delete-verification-data",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "delete-verification-data"
              ]
            },
            "description": "Deletes a user's verification and consent data and returns a deletion audit hash."
          }
        }
      ]
    }
  ]
}
