---
title: "Set an API key's publisher-only default"
method: PATCH
path: "/v1/developer/keys/{id}"
tags: ["Developer account"]
---

# Set an API key's publisher-only default

`PATCH /v1/developer/keys/{id}`

## Request

- Base URL: `https://api.memestack.ai`
- URL: `https://api.memestack.ai/v1/developer/keys/{id}`
- Auth: HTTP bearer

Turns the key's publisher_only default on or off. On: /v2/search and /v2/featured with this key return only charts imported from a licence-clean publisher (Our World in Data, USDA ERS, Eurostat, EEA) unless the call sends publisher_only itself — publisher_only=false still returns everything for that call. Takes effect on the next call. Session-authenticated (fresh account check), never with the key itself; private, no-store. Another account's key answers 404.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `publisher_only_default` boolean, required

## Response `200`

The updated key.

- object
  - `key` DeveloperApiKey
    - `id` string, uuid
    - `name` string
    - `prefix` string: The first 12 characters — the only part of a key ever shown again.
    - `created_at` string, date-time
    - `last_used_at` string, date-time, nullable
    - `revoked_at` string, date-time, nullable
    - `publisher_only_default` boolean: true = /v2/search and /v2/featured with this key return only charts imported from a licence-clean publisher (Our World in Data, USDA ERS, Eurostat, EEA) unless the call sends publisher_only itself (publisher_only=false overrides it). Off by default; set it on create or with PATCH /v1/developer/keys/{id}.
    - `calls_today` integer
    - `calls_30d` integer

## Other responses

- `400`: INVALID_PUBLISHER_ONLY_DEFAULT — the body must be {"publisher_only_default": true|false}.
- `401`: Not signed in.
- `404`: No such key on this account, or the developer API is dark.
- `409`: KEY_REVOKED — the key is revoked; no call can use it, so its default cannot change.

---

[API](https://skmtc.dev/memestack/apis/memestack-api.md) · [All operations](https://skmtc.dev/memestack/apis/memestack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memestack/apis/memestack-api/revisions/9d3a19565f75?raw)
