Search by

sdkfabric / notion

chriskapp

Notion PHP SDK managed by SDK Fabric

Package info

github.com/sdk-fabric/notion-php

Homepage

pkg:composer/sdkfabric/notion

Fund package maintenance!

chriskapp

Statistics

Installs: 11 260

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2025-03-02 20:28 UTC

This package is auto-updated.

Last update: 2026-09-06 00:00:53 UTC


README

This SDK is managed by the SDK Fabric project, a global infrastructure to automatically generate SDKs for every API.

You can find more information about this SDK at TypeHub: https://app.typehub.cloud/d/sdkfabric/notion

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

$client = new \SdkFabric\Notion\Client::build('[access_token]');

// Returns a paginated list of Users for the workspace.
$response = $client->user()->getall('Notion-Version', 'start_cursor', 1);

// Retrieves a User using the ID specified.
$response = $client->user()->get('Notion-Version', 'user_id');

// Retrieves a database object — information that describes the structure and columns of a database — for a provided database ID.
$response = $client->database()->get('Notion-Version', 'database_id');

// Retrieves a Page object using the ID specified.
$response = $client->page()->get('page_id');

// Creates a new page that is a child of an existing page or database.
$response = $client->page()->create(new Page());