{
  "opencollection": "1.0.0",
  "info": {
    "name": "Wefunder API v2 Activity Attribution Partners API",
    "version": "2.0"
  },
  "items": [
    {
      "info": {
        "name": "Attribution Partners",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get current user's attribution profile",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{environment}.wefunder.com/api/v2/attribution/me",
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://wefunder.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns the authenticated user's marketing partner profile and connected campaigns.\nIf the user is not registered as a marketing partner, returns partner info as null.\n"
        },
        {
          "info": {
            "name": "List campaigns accessible to the current user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{environment}.wefunder.com/api/v2/attribution/campaigns",
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://wefunder.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns all campaigns the authenticated user can access for attribution data.\nFor founders, this includes their own campaigns.\nFor marketing partners, this includes campaigns they've been granted access to.\n"
        },
        {
          "info": {
            "name": "Register as a marketing partner",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{environment}.wefunder.com/api/v2/attribution/partners/register",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://wefunder.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Registers the authenticated user as a marketing partner.\nAfter registration, the partner can create invites to request access to campaigns.\n"
        },
        {
          "info": {
            "name": "List partner invites",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{environment}.wefunder.com/api/v2/attribution/invites",
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://wefunder.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Returns all invites created by or sent to the authenticated user.\nIncludes both pending and accepted invites.\n"
        },
        {
          "info": {
            "name": "Create a partner invite",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{environment}.wefunder.com/api/v2/attribution/invites",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://wefunder.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Creates an invite to establish a partner-company connection.\n\n**Directions**:\n- `partner_to_founder`: Marketing partner invites a founder to grant access\n- `founder_to_partner`: Founder invites a marketing partner to access their campaign\n\nFor `partner_to_founder`: Creates a shareable invite link.\nFor `founder_to_partner`: Sends an email to the partner.\n"
        },
        {
          "info": {
            "name": "Revoke a partner invite",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{environment}.wefunder.com/api/v2/attribution/invites/:token",
            "params": [
              {
                "name": "token",
                "value": "",
                "type": "path",
                "description": "The invite token"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://wefunder.com/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Revokes a pending invite. Only the creator can revoke an invite.\nAccepted invites cannot be revoked (delete the connection instead).\n"
        }
      ]
    }
  ],
  "bundled": true
}