Update User
Update a user by ID.
HTTP Request
PUT /v1/auth/users/{user_id}/update
Returns
A successful response returns a User
object in user
owith linked emails and phone numbers in emails
and phone_numbers
properties.
Path parameters
-
Unique User ID of the user to update.
Body
-
first_name string
First name of the user.
Minimum length is
1
. -
middle_name string
Middle name of the user.
Minimum length is
1
. -
last_name string
Last name of the user.
Minimum length is
1
. -
emails array[object]
List of Emails to attach to the user.
At least
1
element. -
phone_numbers array[object]
List of E.164 formatted mobile phone numbers to attach to the user.
At least
1
element.
PUT /v1/auth/users/{user_id}/update
curl \
-X PUT https://api.streambird.io/v1/auth/users/{user_id}/update \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name":"John","middle_name":"","last_name":"Smith","emails":[{"email":"sandbox@streambird.io"}],"phone_numbers":[{"phone_number":"+14152222222"}]}'
Request example
{
"first_name": "John",
"middle_name": "",
"last_name": "Smith",
"emails": [
{
"email": "sandbox@streambird.io"
}
],
"phone_numbers": [
{
"phone_number": "+14152222222"
}
]
}
Response examples (200)
{
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"phone_numbers": [
{
"id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy",
"verified": false,
"phone_number": "+14152222222",
"updated_at": 1642703333,
"created_at": 1642703333
}
],
"emails": [
{
"id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"verified": false,
"email": "sandbox@streambird.io",
"updated_at": 1642703333,
"created_at": 1642703333
}
],
"user": {
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"first_name": "",
"middle_name": "",
"last_name": "",
"status": "active",
"active": true,
"updated_at": 1646873318,
"created_at": 1646873318,
"emails": [
{
"id": "email_26AjWpEcss2YyqFh1san6Wjjs7o",
"verified": true,
"email": "hello@streambird.io",
"updated_at": 1646957196,
"created_at": 1646873318
},
{
"id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"verified": false,
"email": "sandbox@streambird.io",
"updated_at": 1642703333,
"created_at": 1642703333
}
],
"phone_numbers": [
{
"id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy",
"verified": false,
"phone_number": "+14152222222",
"updated_at": 1642703333,
"created_at": 1642703333
}
],
"idp_providers": [
{
"id": "idpuser_28SRho5nbD045LGq2btZWXhkdjN",
"provider": "google",
"provider_subject": "100157402424066154830",
"idp_type": "oauth",
"method_id": "email_26AjWpEcss2YyqFh1san6Wjjs7o",
"method_type": "email",
"updated_at": 1651208121,
"created_at": 1651208121
}
],
"wallets": [
{
"id": "wallet_26AjWu075gRWMnjfPglcdoD2PAQ",
"public_address": "0x863c381a56a58370f435b0100faba94e6462b6d1",
"wallet_type": "ETH",
"verified": true,
"is_default": true,
"is_read_only": false,
"is_imported": false,
"updated_at": 1646873319,
"created_at": 1646873319
}
],
"totps": [],
"webauthn_credentials": []
}
}