Skip to content

Rename a public key

POST
/v1/Accounts/{auth_id}/Credentials/PublicKeys/{key_sid}
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Credentials/PublicKeys/CR0123456789abcdef0123456789abcdef \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data FriendlyName=example

Changes a public key’s FriendlyName; sending FriendlyName empty clears it. The key material itself cannot change: sending PublicKey answers 400, register a new key instead. Audited as public_key.updated. Only the account owner (Basic auth with the account’s Auth ID and Auth Secret) or a platform admin may call it; other logins get 403.

auth_id
required
string

Account Auth ID (AC followed by the account id) the request acts on

Example

AC000000000000000000
key_sid
required
string

Public key SID, CR followed by 32 hex digits

Example

CR0123456789abcdef0123456789abcdef
Media type application/x-www-form-urlencoded
object
FriendlyName

New name, up to 64 characters

string

Example generated

FriendlyName=example

OK

Media type application/json
object
account_sid

Account the key belongs to.

string
date_created

When the key was registered, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”.

string
date_updated

When the key was last renamed, RFC 2822 date, e.g. “Thu, 26 Nov 2026 10:15:30 +0000”.

string
fingerprint

SHA-256 fingerprint of the key.

string
friendly_name

Name given to the key, up to 64 characters.

string
public_key

The RSA public key, PEM “PUBLIC KEY”.

string
sid

Public key SID: CR followed by 32 hex digits.

string
url

Absolute URL of this key.

string

Example

{
"account_sid": "AC000000000000000000",
"date_created": "Thu, 26 Nov 2026 10:15:30 +0000",
"date_updated": "Thu, 26 Nov 2026 10:15:30 +0000",
"friendly_name": "Legal archive key 2026",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBg...\n-----END PUBLIC KEY-----\n",
"sid": "CR0123456789abcdef0123456789abcdef",
"url": "https://api.siprtc.io/v1/Accounts/AC000000000000000000/Credentials/PublicKeys/CR0123456789abcdef0123456789abcdef"
}

PublicKey sent, or FriendlyName too long (code 20001)

Media type application/json
object
code

Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.

integer
message

Human readable explanation.

string
more_info

Link to more information; currently always empty.

string
status

HTTP status code of the response.

integer

Example

{
"code": 20404,
"message": "the requested resource was not found",
"more_info": "",
"status": 404
}

Authentication failed: missing or invalid credentials (JSON string from the API gateway)

Media type application/json
string

Example generated

example

Only the account owner or an admin may do this, or the login does not belong to this account (code 20403)

Media type application/json
object
code

Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.

integer
message

Human readable explanation.

string
more_info

Link to more information; currently always empty.

string
status

HTTP status code of the response.

integer

Example

{
"code": 20404,
"message": "the requested resource was not found",
"more_info": "",
"status": 404
}

No such key in this account (code 20404)

Media type application/json
object
code

Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.

integer
message

Human readable explanation.

string
more_info

Link to more information; currently always empty.

string
status

HTTP status code of the response.

integer

Example

{
"code": 20404,
"message": "the requested resource was not found",
"more_info": "",
"status": 404
}

Storage or account lookup unavailable (code 20503)

Media type application/json
object
code

Error code: 20001 invalid parameter, 20403 forbidden, 20404 not found, 20409 conflict, 20503 unavailable, 64030 under legal hold, 64031 active encryption key.

integer
message

Human readable explanation.

string
more_info

Link to more information; currently always empty.

string
status

HTTP status code of the response.

integer

Example

{
"code": 20404,
"message": "the requested resource was not found",
"more_info": "",
"status": 404
}