Create User

GraphQL endpoint to add a new user to the CRM

  • Mutation:

    mutation CreateCustomUser($identities: [CustomUserIdentityInput]!, $activityTrackerId: Int) {
      createCustomUser(identities: $identities, activityTrackerId: $activityTrackerId) {
        status
        externalId
        primaryWalletAddress
        errors {
          message
          code
        }
      }
    }
  • Variables:

    • **identities**: should be walletAddress, discord id, twitter id, etc (required) (at max 1 entry for any idType)

      • idType is enum: WALLET, TWITTER_ID, DISCORD_ID, EMAIL, TWITTER_USERNAME, DISCORD_USERNAME

    • **activityTrackerId**: Blaze activity tracker id (Optional)

  • Example json payload:

    {
    	"identities": [
    		{"id": "0x...", "idType": "WALLET"},
    		{"id": "@blaze_ai", "idType": "TWITTER_USERNAME"}
    	],
    	"activityTrackerId": 1
    }
  • Errors:

    • Code: 400 (No valid identity provided)

      When none of mentioned idType is provided

    • Code: 409 (User already exists)

      When a user with same wallet address already exists

Last updated