For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Get supportSee a Demo
HomeAPI Reference
HomeAPI Reference
    • Authentication
  • API Reference
      • POSTCreate User
      • POSTCreate User Card
      • PUTUpdate User
      • DELDelete User
Get supportSee a Demo
API ReferenceUsers

Update User

PUT
/users/users/:id
PUT
/users/users/:id
$curl -X PUT https://rewards-api.getkard.com/users/users/%7Bid%7D \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "referringPartnerUserId": "123abc345efg",
> "email": "someone@email.com",
> "hashedEmail": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456",
> "phoneNumber": "+12345678901",
> "birthYear": "1990",
> "userName": "some_user_name",
> "firstName": "John",
> "lastName": "Doe",
> "zipCode": "10028",
> "externalPartnerUserId": "1234567890",
> "enrolledRewards": [
> "CARDLINKED"
> ]
>}'
1{
2 "referringPartnerUserId": "1234567890",
3 "enrolledRewards": [
4 "CARDLINKED"
5 ],
6 "email": "someone@email.com",
7 "hashedEmail": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456",
8 "phoneNumber": "+12345678901",
9 "birthYear": "1990",
10 "firstName": "John",
11 "lastName": "Doe",
12 "zipCode": "10028",
13 "cards": [
14 {
15 "_id": "some_id",
16 "last4": "1234",
17 "bin": "567890",
18 "issuer": "Name_Of_Issuer",
19 "network": "VISA",
20 "status": "ENABLED"
21 }
22 ],
23 "userName": "some_user_name"
24}

Call this endpoint to update the details on a specified user. If you would like to add a card to a specified user, please refer to the Create User Card endpoint.
Required scopes: user:update

Was this page helpful?
Previous

Delete User

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired
Referring partner user ID from issuer that specifies user

Request

This endpoint expects an object.
referringPartnerUserIdstringRequired
Referring partner user ID of user from issuer. Must be a unique identifier across users
emailstringOptional
Email of user
hashedEmailstringOptional

Hashed email address of user (using SHA-256)

phoneNumberstringOptional
Phone number of user in E.164 format
birthYearstringOptional
Birth year of user
userNamestringOptional
Username of user from issuer
firstNamestringOptional
First name of user
lastNamestringOptional
Last name of user
zipCodestringOptional
Zipcode of user
externalPartnerUserIdstringOptional
Partner unique user id, might be equal to referringPartnerUserId
enrolledRewardslist of enumsOptional

An empty array will unenroll user from all programs. Note, please do not send AFFILIATE as this field has been deprecated.

Allowed values:

Response

This endpoint returns an object.
referringPartnerUserIdstring
Referring partner user ID of user from issuer. Must be a unique identifier across users
enrolledRewardslist of enums
List of enrolled rewards
Allowed values:
emailstring
Email of user if available
hashedEmailstring

Hashed email address of user (using SHA-256)

phoneNumberstring
Phone number of user in E.164 format
birthYearstring
Birth year of user
firstNamestring
First name of user if available
lastNamestring
Last name of user if available
zipCodestring
Zipcode of user if available
cardslist of objects
List of User Cards Information
userNamestring
Username of user from issuer if available

Errors

400
Invalid Request
401
Unauthorized Error
404
Does Not Exist Error
500
Internal Server Error