ConvertKit - v1.0.0

Tags

Wraps Kit v4's /tags endpoints. Access via ConvertKit::tags() or convertkit()->tags().

The list() call is cached — see reference-data caching.

list(): array<int, Tag>

Return every Kit tag, hitting the cache first.

$tags = ConvertKit::tags()->list();

foreach ( $tags as $tag ) {
    echo "{$tag->id}: {$tag->name}\n";
}

Cache key: {prefix}:{account}:tags. TTL: convertkit.cache.tags_ttl (default 1 hour).

refresh(): array<int, Tag>

Force a re-fetch and refresh the cache.

$tags = ConvertKit::tags()->refresh();

Or from the CLI: php artisan convertkit:sync tags.

Applying tags

The tags endpoint itself is read-only. To attach a tag to a subscriber, use one of:

The Forms Integration applies feed tags automatically as part of the job pipeline.

Tag DTO

final class Tag
{
    public function __construct(
        public readonly int $id,
        public readonly string $name,
        public readonly ?string $createdAt = null,
    ) {}
}

Errors

  • KitAuthException — bad or missing API key.
  • KitRateLimitException / KitServerException — transient; the client retries.

Full list: Errors.