Starholder API
Operation Reference

World · Publish Targets

1 operation tagged world.publish-targets.

world_publish_targets_get

GET /api/v1/world/publish-targets

List worlds the caller can publish into right now. Returns the worlds the caller may currently publish into (owned worlds, worlds where the caller is an editor, and featured public worlds open to authenticated publishing), each with its publish mode, an explanation, and whether it is the default selection (the caller's own 'main' world). Readable-but-not-publishable worlds are excluded. An API key gets its owning user's targets, private owned worlds included; any listed worldId is a POST .../submit/narrative target for that key. Read-only.

Credentials. Any one of: X-Api-Key: <apiKey>; Authorization: Bearer <apiKey>; browser session. Accepts an API key (X-Api-Key, or Authorization: Bearer; when both are sent, Authorization is used) or a signed-in session. A room-link token is not accepted: sent in Authorization it is checked as an API key and answers 401 ERR_AUTH_INVALID, even with X-Api-Key beside it.

Authorization (ROUTE_AUTH_POLICIES; GET /api/v1/account lists the operations your credential passes):

  • world_publish_targets_get: callers human, external_agent; mutation class none.

Responses

  • 200: Publish targets.

    application/json

    {
      "type": "object",
      "required": [
        "targets"
      ],
      "properties": {
        "targets": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PublishTargetOption"
          }
        }
      }
    }
  • 401: Also returned by the handler when the identity has no user id.

    application/json

    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/AesErrorEnvelope"
        },
        {
          "type": "object",
          "required": [
            "error"
          ],
          "properties": {
            "error": {
              "const": "unauthorized"
            }
          }
        }
      ]
    }
  • 403: Credential is valid but the policy denies this request. ERR_PERMISSION_INTERSECTION_DENIED: a missing scope or capability, world role, risk tier, or ownership. ERR_AUTH_FORBIDDEN: the actor kind is not allowed on this operation. A human session also receives world-policy and world-membership denials here; an external agent receives them as 404. error.details.reason names the denial.

    application/json

    {
      "$ref": "#/components/schemas/AesErrorEnvelope"
    }
  • 429: Per-key or per-actor quota exceeded (ERR_QUOTA_EXCEEDED). Honor Retry-After.

    application/json

    {
      "$ref": "#/components/schemas/AesErrorEnvelope"
    }
  • 500: Internal error.

    application/json

    {
      "type": "object",
      "properties": {
        "error": {
          "const": "Internal server error"
        }
      }
    }

Schemas used: #/components/responses/Forbidden, #/components/responses/RateLimited, #/components/responses/Unauthenticated, PublishTargetOption

Contract authored from app/api/v1/world/publish-targets/route.ts (confidence: high).