PHPackages                             iqual/iq\_contentbird\_api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. iqual/iq\_contentbird\_api

ActiveDrupal-module[API Development](/categories/api)

iqual/iq\_contentbird\_api
==========================

Provides integration with the contentbird Integration API for content management, publishing workflows, and webhook events.

040↓41.7%PHP

Since Mar 5Pushed 2mo agoCompare

[ Source](https://github.com/iqual-ch/iq_contentbird_api)[ Packagist](https://packagist.org/packages/iqual/iq_contentbird_api)[ RSS](/packages/iqual-iq-contentbird-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

IQ Contentbird API
==================

[](#iq-contentbird-api)

Drupal 11 module providing integration with the [contentbird Integration API](https://api.docs.mycontentbird.io/?version=latest).

This module provides a configurable API client service and webhook endpoint to interface between Drupal and the contentbird content management platform.

Features
--------

[](#features)

- **API Token Authentication**: Secure communication via the `X-ContentbirdApiToken` header.
- **Admin Settings Form**: Configure API token, base URL, and endpoints at `admin/config/services/iq_contentbird_api`.
- **API Client Service**: Injectable service (`iq_contentbird_api.client`) for communicating with contentbird:

    - Fetch content statuses, custom elements, and custom fields (Utils).
    - Create, fetch, and update content items.
    - Update content status (e.g., "CMS imported", "Published").
    - Create social posts.
- **Webhook Endpoint**: Receives push events from contentbird at `/iq_contentbird_api/webhook`.
- **Event System**: Dispatches `ContentbirdWebhookEvent` so other modules can subscribe and react to webhook events.

Requirements
------------

[](#requirements)

- Drupal 11
- PHP 8.3+
- Guzzle HTTP client (included with Drupal core)

Installation
------------

[](#installation)

1. Install the module via Composer `composer require iqual/iq_contentbird_api`
2. Enable the module: `drush en iq_contentbird_api`
3. Navigate to **Admin &gt; Configuration &gt; Web services &gt; Contentbird API Settings**.
4. Enter your contentbird API token (generated under Setup &gt; System &gt; Integrations &gt; Api authentication in contentbird).
5. Verify the connection status shows as "Connected successfully".

Configuration
-------------

[](#configuration)

### API Token

[](#api-token)

Generate an API token in contentbird under **Setup &gt; System &gt; Integrations &gt; Api authentication** and paste it into the Drupal settings form.

### Webhook Setup

[](#webhook-setup)

1. Note the webhook URL shown on the settings page (e.g., `https://your-site.com/iq_contentbird_api/webhook`).
2. Configure this URL in your contentbird webhook settings.
3. Optionally set a webhook secret for payload signature verification.

Usage
-----

[](#usage)

### Using the API Client Service

[](#using-the-api-client-service)

Inject the service `iq_contentbird_api.client` in your custom code:

```
// In a controller or service using dependency injection:
public function __construct(
  private ContentbirdApiClientInterface $contentbirdClient,
) {}

// Fetch list ids.
$list_ids = $this->contentbirdClient->getListOfIds();

// Fetch a single content item.
$content = $this->contentbirdClient->getContent(12345);

// Update content status to a published status (status ID from getListOfIds()).
$this->contentbirdClient->updateStatusPublishedContent(
  content_id: 12345,
  status_id: 3,
  published_url: 'https://your-site.com/node/42',
);

// Create a social post.
$this->contentbirdClient->createSocialPost([
  'contentId' => 12345,
  'text' => 'Check out our new article!',
]);

```

### Subscribing to Webhook Events

[](#subscribing-to-webhook-events)

Create an event subscriber in your module:

```
namespace Drupal\my_module\EventSubscriber;

use Drupal\iq_contentbird_api\Event\ContentbirdWebhookEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class ContentbirdWebhookSubscriber implements EventSubscriberInterface {

  public static function getSubscribedEvents() {
    return [
      ContentbirdWebhookEvent::WEBHOOK_RECEIVED => 'onWebhookReceived',
    ];
  }

  public function onWebhookReceived(ContentbirdWebhookEvent $event) {
    $data = $event->getData();
    $eventType = $event->getEventType();
    // Process the webhook data, e.g., create/update Drupal nodes.
  }

}

```

Register the subscriber in your module's services YAML file:

```
services:
  my_module.contentbird_webhook_subscriber:
    class: Drupal\my_module\EventSubscriber\ContentbirdWebhookSubscriber
    tags:
      - { name: event_subscriber }

```

Typical Integration Workflow
----------------------------

[](#typical-integration-workflow)

1. Content is created and approved in contentbird.
2. Contentbird sends a webhook to your Drupal site (or you pull via API).
3. Your custom subscriber creates a Drupal node draft with the contentbird content.
4. The module updates the contentbird status to "CMS imported".
5. When the Drupal node is published, update the contentbird status with the published URL.

API Reference
-------------

[](#api-reference)

See the full [contentbird Integration API documentation](https://api.docs.mycontentbird.io/?version=latest).

License
-------

[](#license)

This project is licensed under the GPL-2.0-or-later license.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance57

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/43082de1b2e2b2b2d48b7ff7dbc7c60ff1d0a015123d4062ac0b49ea0b3b725f?d=identicon)[iqual](/maintainers/iqual)

---

Top Contributors

[![youpixxl](https://avatars.githubusercontent.com/u/3398689?v=4)](https://github.com/youpixxl "youpixxl (11 commits)")

### Embed Badge

![Health badge](/badges/iqual-iq-contentbird-api/health.svg)

```
[![Health](https://phpackages.com/badges/iqual-iq-contentbird-api/health.svg)](https://phpackages.com/packages/iqual-iq-contentbird-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
