Users API
Users in the Siar social media API: 15 operations with parameters, request body fields, responses and curl examples, generated from the OpenAPI file.
Updated
Operations
| Operation | Method and path |
|---|---|
| Get my profile | GET /api/v1/user/me |
| Update my profile | PATCH /api/v1/user/me |
| Finish the first-login welcome | POST /api/v1/user/me/onboarding |
| Change my password | POST /api/v1/user/me/password |
| How I sign in | GET /api/v1/user/me/sign-in-methods |
| Disconnect Google sign-in | DELETE /api/v1/user/me/google |
| Start connecting Google sign-in | POST /api/v1/user/me/google/connect |
| Email me a link to set a password | POST /api/v1/user/me/password/setup |
| List organization members | GET /api/v1/user/members |
| Change a member role | PATCH /api/v1/user/members/{id} |
| Remove a member | DELETE /api/v1/user/members/{id} |
| List pending invitations | GET /api/v1/user/invitations |
| Invite someone to the organization | POST /api/v1/user/invitations |
| Revoke an invitation | DELETE /api/v1/user/invitations/{id} |
| Accept an invitation | POST /api/v1/user/invitations/accept |
/api/v1/user/me Get my profile
user.me · requires x-api-key
Example
curl -X GET "https://api.siaran.my/api/v1/user/me" \
-H "x-api-key: $SIAR_API_KEY" Response 200
9 top-level fields
-
idstring required -
emailstring required -
firstNamestring nullable -
lastNamestring nullable -
avatarUrlstring nullable -
timezonestring nullable -
emailVerifiedAtstring nullable date-time -
onboardedAtstring nullable date-time -
createdAtstring date-time
/api/v1/user/me Update my profile
user.updateMe · requires x-api-key
Request body application/json
-
firstNamestring -
lastNamestring nullable -
timezonestring -
avatarUrlstring nullable
Example
curl -X PATCH "https://api.siaran.my/api/v1/user/me" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"firstName": "Example",
"lastName": "Example",
"timezone": "string"
}' Response 200
Same fields as the response of Get my profile.
/api/v1/user/me/onboarding Finish the first-login welcome
user.completeOnboarding · requires x-api-key
Example
curl -X POST "https://api.siaran.my/api/v1/user/me/onboarding" \
-H "x-api-key: $SIAR_API_KEY" Response 200
3 top-level fields
-
userobject required9 fields
-
idstring required -
emailstring required -
firstNamestring nullable -
lastNamestring nullable -
avatarUrlstring nullable -
timezonestring nullable -
emailVerifiedAtstring nullable date-time -
onboardedAtstring nullable date-time -
createdAtstring date-time
-
-
membershipsobject[] required4 fields
-
idstring required -
organizationIdstring required -
organizationNamestring -
rolestring requiredOne of:OWNERADMINMEMBER
-
-
currentOrganizationIdstring nullable
/api/v1/user/me/password Change my password
user.changePassword · requires x-api-key
Request body application/json
-
currentPasswordstring required -
newPasswordstring required min length 10
Example
curl -X POST "https://api.siaran.my/api/v1/user/me/password" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"currentPassword": "string",
"newPassword": "string"
}' Response 200
1 top-level fields
-
successboolean required
/api/v1/user/me/sign-in-methods How I sign in
user.signInMethods · requires x-api-key
Example
curl -X GET "https://api.siaran.my/api/v1/user/me/sign-in-methods" \
-H "x-api-key: $SIAR_API_KEY" Response 200
2 top-level fields
-
passwordboolean required -
googleobject required nullable2 fields
-
emailstring required nullable -
linkedAtstring nullable date-time
-
/api/v1/user/me/google Disconnect Google sign-in
user.unlinkGoogle · requires x-api-key
Request body application/json
-
currentPasswordstring required
Example
curl -X DELETE "https://api.siaran.my/api/v1/user/me/google" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"currentPassword": "string"
}' Response 200
Same fields as the response of How I sign in.
/api/v1/user/me/google/connect Start connecting Google sign-in
user.startGoogleLink · requires x-api-key
Request body application/json
-
currentPasswordstring required
Example
curl -X POST "https://api.siaran.my/api/v1/user/me/google/connect" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"currentPassword": "string"
}' Response 200
1 top-level fields
-
urlstring required
/api/v1/user/me/password/setup Email me a link to set a password
user.sendPasswordSetup · requires x-api-key
Example
curl -X POST "https://api.siaran.my/api/v1/user/me/password/setup" \
-H "x-api-key: $SIAR_API_KEY" Response 200
Same fields as the response of Change my password.
/api/v1/user/members List organization members
user.members · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
offset | query | integer | |
limit | query | integer |
Example
curl -X GET "https://api.siaran.my/api/v1/user/members" \
-H "x-api-key: $SIAR_API_KEY" Response 200
2 top-level fields
-
itemsobject[] required7 fields
-
idstring required -
userIdstring required -
emailstring required -
firstNamestring nullable -
lastNamestring nullable -
rolestring requiredOne of:OWNERADMINMEMBER -
createdAtstring date-time
-
-
totalinteger required
/api/v1/user/members/{id} Change a member role
user.updateMember · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Request body application/json
-
rolestring requiredOne of:OWNERADMINMEMBER
Example
curl -X PATCH "https://api.siaran.my/api/v1/user/members/ID" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"role": "OWNER"
}' Response 200
7 top-level fields
-
idstring required -
userIdstring required -
emailstring required -
firstNamestring nullable -
lastNamestring nullable -
rolestring requiredOne of:OWNERADMINMEMBER -
createdAtstring date-time
/api/v1/user/members/{id} Remove a member
user.removeMember · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Example
curl -X DELETE "https://api.siaran.my/api/v1/user/members/ID" \
-H "x-api-key: $SIAR_API_KEY" Response 200
Same fields as the response of Change my password.
/api/v1/user/invitations List pending invitations
user.invitations · requires x-api-key
Example
curl -X GET "https://api.siaran.my/api/v1/user/invitations" \
-H "x-api-key: $SIAR_API_KEY" Response 200
2 top-level fields
-
itemsobject[] required5 fields
-
idstring required -
emailstring required -
rolestring requiredOne of:OWNERADMINMEMBER -
expiresAtstring date-time -
createdAtstring date-time
-
-
totalinteger required
/api/v1/user/invitations Invite someone to the organization
user.invite · requires x-api-key
Request body application/json
-
emailstring required email -
rolestring requiredOne of:OWNERADMINMEMBER
Example
curl -X POST "https://api.siaran.my/api/v1/user/invitations" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"email": "you@example.com",
"role": "OWNER"
}' Response 201
5 top-level fields
-
idstring required -
emailstring required -
rolestring requiredOne of:OWNERADMINMEMBER -
expiresAtstring date-time -
createdAtstring date-time
/api/v1/user/invitations/{id} Revoke an invitation
user.revokeInvitation · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Example
curl -X DELETE "https://api.siaran.my/api/v1/user/invitations/ID" \
-H "x-api-key: $SIAR_API_KEY" Response 200
Same fields as the response of Change my password.
/api/v1/user/invitations/accept Accept an invitation
user.acceptInvitation · no API key needed
Request body application/json
-
tokenstring required -
passwordstring nullable -
firstNamestring nullable
Example
curl -X POST "https://api.siaran.my/api/v1/user/invitations/accept" \
-H "content-type: application/json" \
-d '{
"token": "string"
}' Response 200
Same fields as the response of Finish the first-login welcome.