Update an owned personal key with optimistic concurrency. Widening access or extending expiry requires the current password.
curl --request POST \
--url https://api.sendrealm.com/project-operations/personal_keys_update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_grant_version": 2,
"name": "<string>",
"current_password": "<string>",
"scopes": [
"<string>"
],
"grants": [
{
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"expires_at": "2023-11-07T05:31:56Z",
"creator_access": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expected_grant_version: 2,
name: '<string>',
current_password: '<string>',
scopes: ['<string>'],
grants: [
{
team_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
],
expires_at: '2023-11-07T05:31:56Z',
creator_access: true
})
};
fetch('https://api.sendrealm.com/project-operations/personal_keys_update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/project-operations/personal_keys_update"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_grant_version": 2,
"name": "<string>",
"current_password": "<string>",
"scopes": ["<string>"],
"grants": [
{
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
],
"expires_at": "2023-11-07T05:31:56Z",
"creator_access": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"targeting": {
"version": 1,
"base": {
"type": "all_contacts"
},
"excluded_audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
},
"push_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
}
},
"readiness": "<string>"
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Agent account administration
Personal Keys Update
Update an owned personal key with optimistic concurrency. Widening access or extending expiry requires the current password. Requires the explicit operation scope and current actor access.
POST
/
project-operations
/
personal_keys_update
Update an owned personal key with optimistic concurrency. Widening access or extending expiry requires the current password.
curl --request POST \
--url https://api.sendrealm.com/project-operations/personal_keys_update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_grant_version": 2,
"name": "<string>",
"current_password": "<string>",
"scopes": [
"<string>"
],
"grants": [
{
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"expires_at": "2023-11-07T05:31:56Z",
"creator_access": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expected_grant_version: 2,
name: '<string>',
current_password: '<string>',
scopes: ['<string>'],
grants: [
{
team_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
],
expires_at: '2023-11-07T05:31:56Z',
creator_access: true
})
};
fetch('https://api.sendrealm.com/project-operations/personal_keys_update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/project-operations/personal_keys_update"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_grant_version": 2,
"name": "<string>",
"current_password": "<string>",
"scopes": ["<string>"],
"grants": [
{
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
],
"expires_at": "2023-11-07T05:31:56Z",
"creator_access": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"targeting": {
"version": 1,
"base": {
"type": "all_contacts"
},
"excluded_audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
},
"push_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
}
},
"readiness": "<string>"
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Update an owned personal key with optimistic concurrency. Widening access or extending expiry requires the current password.
Requires a scoped personal key, the authenticated account, and personal_keys.manage. Current role and credential grants remain enforced. See Agent messaging and project operations for authorization and recovery.
Authorizations
Body
application/json