Skip to main content
GET
/
v1
/
topics
/
{topicKey}
/
subscribers
/
{externalSubscriberId}
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use novu;

$sdk = novu\Novu::builder()
    ->setSecurity(
        'YOUR_SECRET_KEY_HERE'
    )
    ->build();



$response = $sdk->topicsSubscribers->check(
    externalSubscriberId: '<id>',
    topicKey: '<value>'

);

if ($response->topicSubscriberDto !== null) {
    // handle response
}
{
  "_organizationId": "org_123456789",
  "_environmentId": "env_123456789",
  "_subscriberId": "sub_123456789",
  "_topicId": "topic_123456789",
  "topicKey": "my_topic_key",
  "externalSubscriberId": "external_subscriber_123"
}

Authorizations

Authorization
string
header
required

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

externalSubscriberId
string
required

The external subscriber id

topicKey
string
required

The topic key

Response

_organizationId
string
required

Unique identifier for the organization

Example:

"org_123456789"

_environmentId
string
required

Unique identifier for the environment

Example:

"env_123456789"

_subscriberId
string
required

Unique identifier for the subscriber

Example:

"sub_123456789"

_topicId
string
required

Unique identifier for the topic

Example:

"topic_123456789"

topicKey
string
required

Key associated with the topic

Example:

"my_topic_key"

externalSubscriberId
string
required

External identifier for the subscriber

Example:

"external_subscriber_123"