Impact Radius User API

API for managing users, including creation, lookup, and blocking.

Operations 12

POST /{tenant_alias}/user Create or Update a User #
GET /{tenant_alias}/user Lookup a user by Referral Code #
GET /{tenant_alias}/account/{accountId}/user/{userId} Lookup a user #
GET /{tenant_alias}/account/{accountId}/user/{userId}/pii Lookup a user PII #
POST /{tenant_alias}/account/{accountId}/user/{userId}/block Block user #
POST /{tenant_alias}/account/{accountId}/user/{userId}/unblock Unblock user #
GET /{tenant_alias}/users List users #
GET /{tenant_alias}/open/account/{accountId}/user/{userId} Lookup a user (Open Endpoint) #
PUT /{tenant_alias}/open/account/{accountId}/user/{userId} User Upsert (Open Endpoint) #
POST /{tenant_alias}/open/account/{accountId}/user/{userId} Create a user and account (Open Endpoint) #
DELETE /{tenant_alias}/open/account/{accountId}/user/{userId} Delete a user (Open Endpoint) #
GET /{tenant_alias}/open/user Get a user by a referral code (Open Endpoint) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/impact-radius-user-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

impact-radius-user-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: impact.com User API
  description: 'Users are the people in your program. In other places a User might also be called a Contact, Lead or Participant. Users are each mapped to one specific account.

    The following information is controlled at the user level: First and last name, Email address, Referral code, Share links, Custom fields.

    '
  version: 2.0.0
servers:
- url: https://app.referralsaasquatch.com/api/v1
  description: Production Server
security:
- basicAuth: []
tags:
- name: User
  description: API for managing users, including creation, lookup, and blocking.
paths:
  /{tenant_alias}/user:
    post:
      summary: Create or Update a User
      operationId: createUser
      tags:
      - User
      description: 'This method creates or updates a User object by performing an atomic upsert operation.

        This method will not create or update the Account linked by `accountId`.

        '
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      requestBody:
        description: Details of the User to be created or updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserStub'
      responses:
        '200':
          description: User Created or Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --request POST \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/user' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Content-Type: application/json' \\\n  --header 'Accept: */*'"
    get:
      summary: Lookup a user by Referral Code
      operationId: findUserByReferralCode
      tags:
      - User
      description: 'Looks up a user based upon their `referralCode` and returns their personal information.

        This method is useful for retrieving the user when only the Referral Code is available.

        '
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - name: referralCode
        in: query
        required: true
        schema:
          type: string
          example: BOBTESTERSON
        description: The `referralCode` of the user you want to retrieve.
      responses:
        '200':
          description: User found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: User NOT found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/user' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/account/{accountId}/user/{userId}:
    get:
      summary: Lookup a user
      operationId: getUser
      tags:
      - User
      description: 'Looks up a user based upon their `id` and returns their personal information.

        This method just returns the details of the user in question, and not all associated properties like Rewards, Balances, or Referrals.

        '
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: User found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: User NOT found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/account/{accountId}/user/{userId}/pii:
    get:
      summary: Lookup a user PII
      operationId: getUserPII
      tags:
      - User
      description: 'Returns details of the personally identifiable information stored in the impact.com system for a specific user.

        > 🚧 **Warning!** This method should only be used in connection with data protection and privacy compliance.

        '
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: User found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPII'
        '404':
          description: User NOT found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/pii' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/account/{accountId}/user/{userId}/block:
    post:
      summary: Block user
      operationId: blockUser
      tags:
      - User
      description: Block a user from making successful referrals based upon their user and account `id`.
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: User blocked successfully
          content:
            application/json:
              schema:
                type: object
        '404':
          description: User account NOT found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --request POST \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/block' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/account/{accountId}/user/{userId}/unblock:
    post:
      summary: Unblock user
      operationId: unblockUser
      tags:
      - User
      description: Unblock a user based upon their user and account `id`.
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: User unblocked successfully
          content:
            application/json:
              schema:
                type: object
        '404':
          description: User account NOT found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --request POST \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/account/{accountId}/user/{userId}/unblock' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/users:
    get:
      summary: List users
      operationId: listUsers
      tags:
      - User
      description: 'List all of the users in your Advocate referral programs.

        This method supports pagination and search queries.

        '
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/query'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Users found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserList'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/users' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/open/account/{accountId}/user/{userId}:
    get:
      summary: Lookup a user (Open Endpoint)
      operationId: openGetUser
      tags:
      - User
      description: 'This method looks up a user based on their `id` and returns their personal information including sharelinks. This endpoint requires authentication via a write token or API credentials.

        '
      security:
      - APIKey: []
      - UserJWT: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/extraFields'
      responses:
        '200':
          description: User found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenUser'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
    put:
      summary: User Upsert (Open Endpoint)
      operationId: openUserUpsert
      tags:
      - User
      description: 'This method updates/creates a user and an account and returns the user object representing that newly created user/account.

        Because this call creates a user, it requires either a write token or an API key.

        '
      security:
      - APIKey: []
      - UserJWT: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/extraFields'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenUserUpsert'
      responses:
        '200':
          description: Information about the upserted user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenUser'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --request PUT \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Content-Type: application/json' \\\n  --header 'Accept: */*'"
    post:
      summary: Create a user and account (Open Endpoint)
      operationId: openCreateUser
      tags:
      - User
      description: 'This method creates a user and an account and returns the user object representing that newly created user/account.

        Because this call creates a user, it requires either a write token or an API key.

        '
      security:
      - APIKey: []
      - UserJWT: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/extraFields'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenUserUpsert'
      responses:
        '201':
          description: Information about the newly created user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenUser'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --request POST \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Content-Type: application/json' \\\n  --header 'Accept: */*'"
    delete:
      summary: Delete a user (Open Endpoint)
      operationId: openDeleteUser
      tags:
      - User
      description: 'Delete a user in your impact.com project. By default this endpoint only deletes a User on an Account (and not the Account itself).

        '
      security:
      - APIKey: []
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/userId'
      - name: doNotTrack
        in: query
        description: Do not track this user (this user cannot be re-registered on the same account).
        schema:
          type: boolean
      - name: preserveEmptyAccount
        in: query
        description: Do not delete accounts when all the users in the account are deleted.
        schema:
          type: boolean
      responses:
        '204':
          description: User successfully deleted
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --request DELETE \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/account/{accountId}/user/{userId}' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
  /{tenant_alias}/open/user:
    get:
      summary: Get a user by a referral code (Open Endpoint)
      operationId: openGetUserByCode
      tags:
      - User
      security: []
      description: 'Looks up a user based upon their `ReferralCode` and returns their personal information. This is an [Open Endpoint](https://integrations.impact.com/impact-brand/reference/api-open-endpoints) and disabled by default.

        '
      parameters:
      - $ref: '#/components/parameters/tenant_alias'
      - name: referralCode
        in: query
        required: true
        schema:
          type: string
        description: The code with which to lookup the user.
      responses:
        '200':
          description: Found user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserByCode'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-codeSamples:
      - lang: cURL
        source: "curl -L \\\n  --url 'https://app.referralsaasquatch.com/api/v1/{tenant_alias}/open/user' \\\n  --user '{AccountSID}:{AuthToken}' \\\n  --header 'Accept: */*'"
components:
  schemas:
    UserPII:
      description: Full personally identifiable information for a user, including rewards, referrals, and share links. Only use in connection with data protection and privacy compliance.
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the user.
          example: abc123
        accountId:
          type: string
          description: The unique identifier of the account the user belongs to.
          example: abc123
        firstName:
          type: string
          description: The user's first name.
          example: Bob
        lastName:
          type: string
          description: The user's last name.
          example: Testerson
        lastInitial:
          type: string
          description: The first initial of the user's last name.
          example: T
        email:
          type: string
          format: email
          description: The user's email address.
          example: bob.testerson@example.com
        emailHash:
          type: string
          description: An MD5 hash of the user's email address.
          example: 714ed06b2d5c95b93d499a3be731c19f
        imageUrl:
          type: string
          description: URL of the user's profile image.
          example: ''
        cookieId:
          type: string
          nullable: true
          description: The cookie ID associated with this user.
          example: abc123cookie
        paymentProviderId:
          type: string
          nullable: true
          description: The ID of the user in the payment provider system.
          example: pay_abc123
        locale:
          type: string
          nullable: true
          description: The user's locale (e.g. `en_US`).
          example: en_US
        countryCode:
          type: string
          nullable: true
          description: The user's ISO 3166-1 Alpha-2 country code (e.g. `US`).
          example: US
        referable:
          type: boolean
          description: Whether this user can be referred by another user.
          example: true
        referralSource:
          type: string
          nullable: true
          description: The source of the user's referral.
          example: UNKNOWN
        referralCodes:
          type: object
          additionalProperties:
            type: string
          description: A map of program IDs to the user's referral code for that program.
          example:
            '47255': BOBTESTERSON
        firstSeenIP:
          type: string
          nullable: true
          description: The IP address the user was first seen from.
          example: 203.0.113.42
        lastSeenIP:
          type: string
          nullable: true
          description: The IP address the user was last seen from.
          example: 203.0.113.42
        firstSeenIPLocation:
          type: string
          nullable: true
          description: The geographic location derived from `firstSeenIP`.
          example: San Francisco, CA, US
        lastSeenIPLocation:
          type: string
          nullable: true
          description: The geographic location derived from `lastSeenIP`.
          example: San Francisco, CA, US
        firstSeenUserAgent:
          type: string
          nullable: true
          description: The browser user agent string from the user's first session.
          example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
        lastSeenUserAgent:
          type: string
          nullable: true
          description: The browser user agent string from the user's most recent session.
          example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
        dateCreated:
          type: integer
          format: int64
          description: Unix timestamp (milliseconds) when the user was created.
          example: 1774386824964
        customFields:
          type: object
          additionalProperties: true
          description: Custom fields for this user.
        programShareLinks:
          $ref: '#/components/schemas/ProgramShareLink'
        referredByCodes:
          type: array
          items:
            type: string
          description: Referral codes used to refer this user.
          example:
          - NCC8IQ4ADTVDQAOA
        referredByReferrals:
          type: array
          description: Referral records where this user was the referred party.
          items:
            type: object
            properties:
              id:
                type: string
                description: The unique identifier for the referral.
                example: ref_abc123
              moderationStatus:
                type: string
                description: The moderation status of the referral.
                example: ACTIONED
              dateReferralStarted:
                type: integer
                format: int64
                description: Unix timestamp (milliseconds) when the referral started.
                example: 1774386824964
              dateReferralPaid:
                type: integer
                format: int64
                nullable: true
                description: Unix timestamp (milliseconds) when the referral was paid.
              dateReferralEnded:
                type: integer
                format: int64
                nullable: true
                description: Unix timestamp (milliseconds) when the referral ended.
              dateModerated:
                type: integer
                format: int64
                nullable: true
                description: Unix timestamp (milliseconds) when the referral was moderated.
              referredModerationStatus:
                type: string
                description: The moderation status of the referred user.
                example: APPROVED
              referrerModerationStatus:
                type: string
                description: The moderation status of the referrer.
                example: APPROVED
              programId:
                type: string
                nullable: true
                description: The program ID associated with this referral.
                example: '47255'
              referredReward:
                type: object
                nullable: true
                description: The reward earned by the referred user.
              referrerReward:
                type: object
                nullable: true
                description: The reward earned by the referrer.
              publicMeta:
                type: object
                nullable: true
                description: Public metadata associated with the referral.
              privateMeta:
                type: object
                nullable: true
                description: Private metadata associated with the referral.
              fraudSignals:
                type: object
                nullable: true
                description: Fraud signals detected for this referral.
        rewards:
          type: object
          description: A paginated list of rewards earned by this user.
          properties:
            totalCount:
              type: integer
              description: Total number of rewards.
              example: 1
            data:
              type: array
              items:
                type: object
        rewardBalances:
          type: array
          description: Aggregated reward balance summaries for this user.
          items:
            type: object
            properties:
              type:
                type: string
                description: The reward type.
                example: CREDIT
              unit:
                type: string
                description: The unit of the reward.
                example: CENTS
              count:
                type: integer
                description: Number of rewards of this type.
                example: 1
              totalAssignedCredit:
                type: integer
                description: Total credit assigned.
                example: 100
              totalRedeemedCredit:
                type: integer
                description: Total credit redeemed.
                example: 0
              totalPendingCredit:
                type: integer
                description: Total credit pending.
                example: 0
              totalExpiredCredit:
                type: integer
                description: Total credit expired.
                example: 0
              totalCancelledCredit:
                type: integer
                description: Total credit cancelled.
                example: 0
              prettyAssignedCredit:
                type: string
                description: Human-readable total assigned credit.
                example: $1.00
              prettyRedeemedCredit:
                type: string
                description: Human-readable total redeemed credit.
                example: $0.00
              prettyPendingCredit:
                type: string
                description: Human-readable total pending credit.
                example: $0.00
              value:
                type: integer
                description: The available (unredeemed) credit balance.
                example: 100
              prettyValue:
                type: string
                description: Human-readable available balance.
                example: $1.00
        referrals:
          type: object
          description: A paginated list of referrals made by this user.
          properties:
            totalCount:
              type: integer
              description: Total number of referrals.
              example: 0
            data:
              type: array
              items:
                type: object
        segments:
          type: array
          items:
            type: string
          description: The segments this user belongs to.
    UserByCode:
      description: Minimal user information returned when looking up a user by referral code from the open endpoint.
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the user.
          example: abc123
        accountId:
          type: string
          description: The unique identifier of the account the user belongs to.
          example: abc123
        firstName:
          type: string
          description: The user's first name.
          example: Bob
        lastInitial:
          type: string
          description: The first initial of the user's last name.
          example: T
        referralCode:
          type: string
          description: The user's primary referral code.
          example: CFMVQHNUEU2AWWDO
        imageUrl:
          type: string
          description: URL of the user's profile image.
          example: ''
    Error:
      properties:
        statusCode:
          description: The HTTP status code of the error.
          type: integer
          format: int32
          example: 404
        message:
          description: The human-readable description of what went wrong. Use this to help you debug.
          type: string
        apiErrorCode:
          description: A machine-readable error code.
          type: string
        rsCode:
          description: A secondary machine-readable error code.
          type: string
          example: RS042
    SharelinkEngagementMedium:
      description: Share links for a single engagement medium in the legacy flat format.
      type: object
      properties:
        shareLink:
          type: string
          format: uri
          description: The primary share link for this engagement medium.
          example: https://share.impact.squatchtesting.com/mvbnEye
        facebookShareLink:
          type: string
          format: uri
          description: The Facebook share link for this engagement medium.
          example: https://share.impact.squatchtesting.com/mmbnEye
        twitterShareLink:
          type: string
          format: uri
          description: The Twitter share link for this engagement medium.
          example: https://share.impact.squatchtesting.com/mRbnEye
        emailShareLink:
          type: string
          format: uri
          description: The Email share link for this engagement medium.
          example: https://share.impact.squatchtesting.com/mLbnEye
        linkedinShareLink:
          type: string
          format: uri
          description: The LinkedIn share link for this engagement medium.
          example: https://share.impact.squatchtesting.com/m6bnEye
    OpenUser:
      description: A user object returned by open endpoints. Includes program share links and custom fields.
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the user.
          example: abc123
        accountId:
          type: string
          description: The unique identifier of the account the user belongs to.
          example: abc123
        firstName:
          type: string
          description: The user's first name.
          example: Bob
        lastName:
          type: string
          description: The user's last name.
          example: Testerson
        email:
          type: string
          format: email
          description: The user's email address.
          example: bob.testerson@example.com
        imageUrl:
          type: string
          description: URL of the user's profile image.
          example: ''
        cookieId:
          type: string
          nullable: true
          description: The cookie ID associated with this user.
          example: abc123cookie
        locale:
          type: string
          nullable: true
          description: The user's locale (e.g. `en_US`).
          example: en_US
        countryCode:
          type: string
          nullable: true
          description: The user's ISO 3166-1 Alpha-2 country code (e.g. `US`).
          example: US
        referable:
          type: boolean
          description: Whether this user can be referred by another user.
          example: true
        firstSeenIP:
          type: string
          nullable: true
          description: The IP address the user was first seen from.
          example: 203.0.113.42
        lastSeenIP:
          type: string
          nullable: true
          description: The IP address the user was last seen from.
          example: 203.0.113.42
        dateCreated:
          type: integer
          format: int64
          description: Unix timestamp (milliseconds) when the user was created.
          example: 1774386824964
        referralCodes:
          type: object
          additionalProperties:
            type: string
          description: A map of program IDs to the user's referral code for that program.
          example:
            '47255': BOBTESTERSON
        programShareLinks:
          $ref: '#/components/schemas/ProgramShareLink'
        customFields:
          type: object
          additionalProperties: true
          description: Custom fields for this user.
        segments:
          type: array
          items:
            type: string
          description: The segments this user belongs to.
        referredByCodes:
          type: array
          items:
            type: string
          description: Referral codes used to refer this user.
          example:
          - NCC8IQ4ADTVDQAOA
    UserStub:
      description: Request body for creating or updating a user.
      required:
      - id
      - accountId
      properties:
        id:
          type: string
          description: The unique identifier for the user.
          example: abc123
        accountId:
          type: string
          description: The unique identifier of the account the user belongs to.
          example: abc123
        firstName:
          type: string
          description: The user's first name.
          example: Bob
        lastName:
          type: string
          description: The user's last name.
          example: Testerson
        email:
          type: string
          format: email
          description: The user's email address.
          example: bob.testerson@example.com
        locale:
          type: string
          description: The user's locale (e.g. `en_US`).
          example: en_US
        countryCode:
          type: string
          description: The user's ISO 3166-1 Alpha-2 country code (e.g. `US`).
          example: US
        referralCode:
          type: string
          description: A custom referral code to assign to the user.
          example: BOBTESTERSON
        customFields:
          type: object
          additionalProperties: true
          description: Custom fields for this user.
    ProgramShareLink:
      description: A map of program IDs to share link sets for that program.
      type: object
      additionalProperties:
        type: object
        properties:
          cleanShareLink:
            type: string
            format: uri
            description: The clean (unencoded) primary share link for this program.
            example: https://share.impact.squatchtesting.com/mzbnEyE
          UNKNOWN:
            type: object
            additionalProperties:
              type: string
              format: uri
          EMAIL:
            type: object
            additionalProperties:
              type: string
              format: uri
          MOBILE:
      

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/impact-radius/refs/heads/main/openapi/impact-radius-user-api-openapi.yml