---
title: "Issue a public credit link or personal email invitations [admin]"
method: POST
path: "/credit-campaigns"
tags: ["Credit campaigns"]
---

# Issue a public credit link or personal email invitations \[admin\]

`POST /credit-campaigns`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/credit-campaigns`
- Auth: HTTP bearer

Only allowlisted administrators can use these operations. Use one UUID requestId per campaign and reuse the identical body after timeouts. Personal emails are deduplicated and each gets a distinct, email-bound single-use code. Existing verified, unbanned recipients are credited immediately. sendEmail explicitly authorizes product email. Code creation is atomic; delivery/credit failures are per recipient. Retry the same request for retry_needed credit results; never change requestId just to retry. Email status sent means SES accepted, not inbox delivery. Sending/uncertain attempts are not automatically resent; use the returned personal link for manual delivery. Responses contain bearer codes: keep private. A different body with the same requestId returns 409.

## Request body

- object
  - `requestId` string, uuid, required
  - `amountUsd` number, required
  - `expiresInDays` integer, required
  - `note` string, required
  - `audience` union, required
    - object
      - `kind` 'anyone', required
      - `slots` integer, required
    - object
      - `kind` 'recipients', required
      - `emails` string[], required
  - `sendEmail` boolean

## Response `201`

Campaign result

- object
  - `campaignId` string, required
  - `recipients` object[], required
    - `id` string, required
    - `email` string, nullable, required
    - `code` string, required
    - `url` string, required
    - `claim` string, required
    - `emailStatus` string, required
    - `notifiedAt` string, nullable, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Admin token scope and administrator allowlist membership required
- `404`: Unknown campaign
- `409`: requestId reused with different settings
- `415`: Content-Type must be application/json
- `503`: Campaign migrations required
- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 7 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`
  - …3 more

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/credit-campaigns/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
