Developers

Your app's users.
Your site's readers.

Your app already knows who your readers are. With a staff key, its code finds each reader by address and keeps them in step: their name, their labels, their newsletters, without a person in the loop.

Early accessThis guide uses a feature in early access. PixelGlass turns it on for a publication on request while it is new.

Say it to your agent

Write a nightly job that labels our paying users Customer on our PixelGlass site.

Two ways to do it.

By hand

In the admin

  1. As an admin, open Settings › API. Under Your keys, press New key and copy it: it is shown once.
  2. Find a reader by address: ask /pixel/members.json with the email. One member comes back, or none.
  3. Add a reader who is not there with a POST to /pixel/members.json. This door opens when PixelGlass turns it on for your site: ask on Audience › Import.
  4. Change a member's name, address or labels with a PATCH to the member. Join or leave a newsletter through their subscriptions.
  5. Change many members at once with /pixel/members/batch.json: subscribe, unsubscribe, add a label or remove one.

With your agent

In Claude, ChatGPT or your editor

No tool on the MCP server reads or changes the member list. A coding agent such as Claude Code can write the sync against the admin's JSON, and your app runs it with your staff key.

For example

  • Customers, labelled each night

    A design tool's nightly job adds the Customer label to every paying user. The newsletter team filters by it for the product updates.

  • A new account, a new reader

    A coding school adds each new student as a member the day they enrol, on the Course news newsletter.

  • An address that changed

    A user changes their email in a booking app. The app finds the member by the old address and sends the new one.

Questions, answered

How do I sync members from my app to PixelGlass?
Make a staff key as an admin, then use the admin's JSON: find a member by address, add one who is missing, change names, addresses and labels, and change many members at once with the batch.
How does my app find a member without PixelGlass ids?
Ask /pixel/members.json with the email address. The answer holds that one member, or none.
What happens when the address is already a member?
Adding it, or changing another member to it, answers 409. A bad field answers 422, so your code tells the two apart without reading the sentence.
Does adding a member through the API send an email?
No. A member added this way is confirmed and gets no email. It joins the newsletters you name, or the lists that take new sign-ups.
How do labels work through the API?
The labels you send replace the member's labels. To add one, send the ones they wear with it, or use add_label in the batch.
Who may a staff key change members as?
As the person who made it. An editor's key reads the list. An admin's or the owner's key adds, changes and deletes members.

Every feature on every plan

Start your publication
today.

Plans from $9 a month. No platform fee on what your readers pay.

14 days free. Have a site? Sign in