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

require 'vendor/autoload.php';

use novu;

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



$response = $sdk->topics->get(
    topicKey: '<value>'
);

if ($response->topicResponseDto !== null) {
    // handle response
}
{
  "_id": "64da692e9a94fb2e6449ad06",
  "key": "product-updates",
  "name": "Product Updates",
  "createdAt": "2023-08-15T00:00:00.000Z",
  "updatedAt": "2023-08-15T00:00:00.000Z"
}

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

topicKey
string
required

The key identifier of the topic

Response

OK

_id
string
required

The identifier of the topic

Example:

"64da692e9a94fb2e6449ad06"

key
string
required

The unique key of the topic

Example:

"product-updates"

name
string

The name of the topic

Example:

"Product Updates"

createdAt
string

The date the topic was created

Example:

"2023-08-15T00:00:00.000Z"

updatedAt
string

The date the topic was last updated

Example:

"2023-08-15T00:00:00.000Z"