Subscribers

Update provider credentials

Update credentials for a provider such as slack and FCM. providerId is required field. This API creates the deviceTokens or replaces the existing ones.

put/v1/subscribers/{subscriberId}/credentials

Path parameters

subscriberIdstring required

Headers

idempotency-keystring

A header for idempotency purposes

Request body

providerId'slack' | 'discord' | 'msteams' | 'webex-messaging' | 'mattermost' | 'ryver' | 'zulip' | 'grafana-on-call' | 'getstream' | 'rocket-chat' | 'whatsapp-business' | 'line' | 'chat-webhook' | 'novu-slack' | 'telegram' | 'sendblue' | 'novu-web-chat' | 'fcm' | 'apns' | 'expo' | 'one-signal' | 'pushpad' | 'push-webhook' | 'pusher-beams' | 'appio' required

The provider identifier for the credentials

integrationIdentifierstring

The integration identifier

Example request

{
  "credentials": {
    "webhookUrl": "https://example.com/webhook",
    "channel": "general",
    "deviceTokens": [
      "token1",
      "token2",
      "token3"
    ],
    "alertUid": "12345-abcde",
    "title": "Critical Alert",
    "imageUrl": "https://example.com/image.png",
    "state": "resolved",
    "externalUrl": "https://example.com/details"
  }
}

Response

OK

_idstring

The internal ID generated by Novu for your subscriber. This ID does not match the subscriberId used in your queries. Refer to subscriberId for that identifier.

firstNamestring nullable

The first name of the subscriber.

lastNamestring nullable

The last name of the subscriber.

emailstring nullable

The email address of the subscriber.

phonestring nullable

The phone number of the subscriber.

avatarstring nullable

The URL of the subscriber's avatar image.

localestring nullable

The locale setting of the subscriber, indicating their preferred language or region.

topicsstring[]

An array of topics that the subscriber is subscribed to.

isOnlineboolean nullable

Indicates whether the subscriber is currently online.

lastOnlineAtstring nullable

The timestamp indicating when the subscriber was last online, in ISO 8601 format.

__vnumber

The version of the subscriber document.

dataobject nullable

Additional custom data for the subscriber

timezonestring nullable

Timezone of the subscriber

subscriberIdstring required

The identifier used to create this subscriber, which typically corresponds to the user ID in your system.

_organizationIdstring required

The unique identifier of the organization to which the subscriber belongs.

_environmentIdstring required

The unique identifier of the environment associated with this subscriber.

deletedboolean required

Indicates whether the subscriber has been deleted.

createdAtstring required

The timestamp indicating when the subscriber was created, in ISO 8601 format.

updatedAtstring required

The timestamp indicating when the subscriber was last updated, in ISO 8601 format.

Example response

{
  "channels": [
    {
      "credentials": {
        "webhookUrl": "https://example.com/webhook",
        "channel": "general",
        "deviceTokens": [
          "token1",
          "token2",
          "token3"
        ],
        "alertUid": "12345-abcde",
        "title": "Critical Alert",
        "imageUrl": "https://example.com/image.png",
        "state": "resolved",
        "externalUrl": "https://example.com/details"
      }
    }
  ]
}

Changes

Changed in 4 of the 12 revisions of this API.268

  • 24e82408dec7112See the full diff
    • removed the enum value novu-agent-chat of the request property providerId

      request-property-enum-value-removed

    • added the new novu-web-chat enum value to the channels/items/providerId response property for the response status 200

      response-property-enum-value-added

    • added the new novu-web-chat enum value to the request property providerId

      request-property-enum-value-added

    • removed the novu-agent-chat enum value from the channels/items/providerId response property for the response status 200

      response-property-enum-value-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • c2b2fa0d5d48112See the full diff
    • removed the enum value novu-web-chat of the request property providerId

      request-property-enum-value-removed

    • added the new novu-agent-chat enum value to the channels/items/providerId response property for the response status 200

      response-property-enum-value-added

    • added the new novu-agent-chat enum value to the request property providerId

      request-property-enum-value-added

    • removed the novu-web-chat enum value from the channels/items/providerId response property for the response status 200

      response-property-enum-value-removed

  • 8092e41edd5711See the full diff
    • added the new novu-web-chat enum value to the channels/items/providerId response property for the response status 200

      response-property-enum-value-added

    • added the new novu-web-chat enum value to the request property providerId

      request-property-enum-value-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • c69777f6018433See the full diff
    • added the new line enum value to the channels/items/providerId response property for the response status 200

      response-property-enum-value-added

    • added the new sendblue enum value to the channels/items/providerId response property for the response status 200

      response-property-enum-value-added

    • added the new webex-messaging enum value to the channels/items/providerId response property for the response status 200

      response-property-enum-value-added

    • added the new line enum value to the request property providerId

      request-property-enum-value-added

    • added the new sendblue enum value to the request property providerId

      request-property-enum-value-added

    • added the new webex-messaging enum value to the request property providerId

      request-property-enum-value-added