Skip to content

Set or revoke a SIP peer password

PUT
/v1/peer/{peer}/setpass
curl --request PUT \
--url https://example.com/v1/peer/example/setpass \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "password": "example" }'

Computes HA1 from the supplied plaintext password and stores it; returns 204. With ?clear=true (or X-Clear: true) instead revokes the credential — the stored HA1 is reset to empty, so the device can no longer authenticate (checkauth fails closed on an empty HA1) until a new password is set. In clear mode no request body is read. Both modes require the peer:setpass action, held by a grant covering the peer’s owning namespace (namespace, partition, or system scope).

peer
required
string

SIP peer key: username@realm (URL-encoded)

clear
boolean

When true, revoke the credential (reset the stored HA1 to empty) instead of setting a password. No request body is read.

Media typeapplication/json
object
password
required
string
Examplegenerated
{
"password": "example"
}

Password set or credential revoked

Error response

Media typeapplication/problem+json

RFC 7807 Problem Details

object
type

Problem type slug URI

string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}