mutation · Module: Accounts · Requires accounts:write
Arguments
| Argument | Type | Description |
|---|---|---|
id | ID! | The object’s ID. |
input | MembershipInput | The fields for this operation. |
MembershipInput fields
| Field | Type |
|---|---|
account | String |
identity | MembershipInputIdentityInput |
role | String |
status | MembershipInputStatus |
source | MembershipInputSource |
last_sign_in_at | Int |
user_metadata | UserMetadataInput |
Returns
Membership!
| Field | Type |
|---|---|
id | String! |
object | MembershipObject! |
livemode | Boolean! |
created | Int! |
updated | Int |
account | String! |
identity | MembershipIdentity! |
role | String! |
status | MembershipStatus! |
source | MembershipSource |
last_sign_in_at | Int |
user_metadata | UserMetadata |
carrier_metadata | CarrierMetadata |
system_metadata | SystemMetadata |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
mutation UpdateMembership($id: ID!, $input: MembershipInput!) {
updateMembership(id: $id, input: $input) {
id
object
status
livemode
created
updated
account
identity {
name
issuer
subject
email
}
role
source
last_sign_in_at
}
}
{
"id": "mbr_1a2B3c",
"input": {
"account": "acct_ada",
"identity": {
"issuer": "https://ada.okta.com/oauth2/default",
"subject": "example",
"email": "ops@example.com",
"name": "Example"
},
"role": "example",
"status": "invited",
"source": "invitation",
"last_sign_in_at": 1791302400
}
}
{
"data": {
"updateMembership": {
"id": "mbr_1a2B3c",
"object": "membership",
"status": "invited",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"account": "acct_ada",
"identity": {
"name": "Example",
"issuer": "https://ada.okta.com/oauth2/default",
"subject": "example",
"email": "ops@example.com"
},
"role": "example",
"source": "invitation",
"last_sign_in_at": 1791302400
}
}
}