Users
Update user channel settings
Update a user's settings for a specific channel. Creates the settings if they don't exist.
Provider-specific settings:
Mobile Push (APNS/FCM):
{
"settings": {
"device_tokens": ["token1", "token2"]
}
}Slack:
{
"settings": {
"slack_channel_id": "C0123456789",
"slack_user_id": "U0123456789"
}
}At least one of slack_channel_id or slack_user_id must be provided.
Authorization
ApiKeyAuth SecretKeyAuth x-notiflows-api-key<token>
Your project's public API key. Found in Project Settings. Starts with pk_.
In: header
x-notiflows-secret-key<token>
Your project's secret key. Found in Project Settings. Starts with sk_. Keep this secret!
In: header
Path Parameters
user_id*string
User external ID
channel_id*string
Channel ID (UUID)
Request Body
application/json
Channel settings
settings*|
Provider-specific settings. Structure depends on channel provider.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.notiflows.com/admin/users/user_12345/channel-settings/01HQXYZ123456789ABCDEFGHIJ" \ -H "Content-Type: application/json" \ -d '{ "settings": { "device_tokens": [ "ExampleTokenABCDEF123456789..." ] } }'{
"channel_id": "bbe8aa76-a4bb-46f6-a785-df8e831cc459",
"created_at": "2019-08-24T14:15:22Z",
"provider": "apns",
"settings": {
"device_tokens": [
"ExampleTokenABCDEF123456789...",
"AnotherTokenXYZ987654321..."
]
},
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}{
"error": {
"code": "not_found",
"details": {
"allowed_statuses": [
"string"
],
"allowed_transitions": [
"string"
],
"auth": "api_key",
"current_status": "string",
"fields": [
{
"field": "email",
"message": "can't be blank",
"reason": "required"
}
],
"id": "string",
"idempotency_key": "string",
"limit": 0,
"param": "string",
"reason": "string",
"required_scope": "string",
"resource": "string",
"retry_after": 0,
"window": "string"
},
"message": "User not found",
"request_id": "req_abc123",
"status": 404,
"type": "https://docs.notiflows.com/errors/not_found"
}
}{
"error": {
"code": "not_found",
"details": {
"allowed_statuses": [
"string"
],
"allowed_transitions": [
"string"
],
"auth": "api_key",
"current_status": "string",
"fields": [
{
"field": "email",
"message": "can't be blank",
"reason": "required"
}
],
"id": "string",
"idempotency_key": "string",
"limit": 0,
"param": "string",
"reason": "string",
"required_scope": "string",
"resource": "string",
"retry_after": 0,
"window": "string"
},
"message": "User not found",
"request_id": "req_abc123",
"status": 404,
"type": "https://docs.notiflows.com/errors/not_found"
}
}{
"error": {
"code": "not_found",
"details": {
"allowed_statuses": [
"string"
],
"allowed_transitions": [
"string"
],
"auth": "api_key",
"current_status": "string",
"fields": [
{
"field": "email",
"message": "can't be blank",
"reason": "required"
}
],
"id": "string",
"idempotency_key": "string",
"limit": 0,
"param": "string",
"reason": "string",
"required_scope": "string",
"resource": "string",
"retry_after": 0,
"window": "string"
},
"message": "User not found",
"request_id": "req_abc123",
"status": 404,
"type": "https://docs.notiflows.com/errors/not_found"
}
}{
"error": {
"code": "not_found",
"details": {
"allowed_statuses": [
"string"
],
"allowed_transitions": [
"string"
],
"auth": "api_key",
"current_status": "string",
"fields": [
{
"field": "email",
"message": "can't be blank",
"reason": "required"
}
],
"id": "string",
"idempotency_key": "string",
"limit": 0,
"param": "string",
"reason": "string",
"required_scope": "string",
"resource": "string",
"retry_after": 0,
"window": "string"
},
"message": "User not found",
"request_id": "req_abc123",
"status": 404,
"type": "https://docs.notiflows.com/errors/not_found"
}
}{
"error": {
"code": "not_found",
"details": {
"allowed_statuses": [
"string"
],
"allowed_transitions": [
"string"
],
"auth": "api_key",
"current_status": "string",
"fields": [
{
"field": "email",
"message": "can't be blank",
"reason": "required"
}
],
"id": "string",
"idempotency_key": "string",
"limit": 0,
"param": "string",
"reason": "string",
"required_scope": "string",
"resource": "string",
"retry_after": 0,
"window": "string"
},
"message": "User not found",
"request_id": "req_abc123",
"status": 404,
"type": "https://docs.notiflows.com/errors/not_found"
}
}{
"error": {
"code": "not_found",
"details": {
"allowed_statuses": [
"string"
],
"allowed_transitions": [
"string"
],
"auth": "api_key",
"current_status": "string",
"fields": [
{
"field": "email",
"message": "can't be blank",
"reason": "required"
}
],
"id": "string",
"idempotency_key": "string",
"limit": 0,
"param": "string",
"reason": "string",
"required_scope": "string",
"resource": "string",
"retry_after": 0,
"window": "string"
},
"message": "User not found",
"request_id": "req_abc123",
"status": 404,
"type": "https://docs.notiflows.com/errors/not_found"
}
}