Skip to content

Add a contact method (email, sms, slack DM, etc.) for a user.

POST
/user/{user_id}/contact_method
curl --request POST \
--url https://api.siteqwality.com/user/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contact_method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "email", "details": "example" }'
user_id
required
string format: uuid

User identifier

Media type application/json
object
type
required

method_type is the field the dashboard used to send. Accept both so a stale client still creates a row the engine can page.

string
Allowed values: email sms phone_call slack_dm mobile_push
details
required

Email {email}, Slack DM {slack_token, channel}, SMS {phone_number, country} (ISO 3166-1 alpha-2), {phone_number, country_code}, {e164} or a + number.

Contact method created. The user’s sign-in email is created verified; anything else starts unverified. Default high and low rules are added for urgencies the user has none for when the method can be used in a rule.

Media type application/json
object
id
required
string format: uuid
user_id
required
string format: uuid
type
required
string
Allowed values: email sms phone_call slack_dm mobile_push
details
required

Stored details with a Slack DM token masked.

verified
required
boolean
created_at
required
string format: date-time
integration_id

A Slack DM linked from /oncall sends through this Slack integration; no token is stored.

string | null format: uuid
linked_via

The linked Slack integration’s name, while it is connected.

string | null
Example
{
"type": "email"
}

Invalid request body, or a phone number without a country or invalid for its country

Missing or invalid authentication

Only the user or an admin may change a user’s contact methods

User not found

The user already has 20 contact methods (contact_method_limit_reached)

Internal server error