# Replace beta

URL: https://docs.hanzo.ai/docs/openapi/marketing/put-marketing-beta

> Writes the signed-in caller's application: the program, the answers, the betas asked for and the lead it was filed under.

`PUT /v1/marketing/beta`

> [Marketing →](https://docs.hanzo.ai/docs/openapi/marketing) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                          |
| ------------- | ---------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/marketing/beta` |
| **Method**    | `PUT`                                    |
| **Operation** | `put_marketing_beta`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`   |

Writes the signed-in caller's application: the program, the answers, the
betas asked for and the lead it was filed under. A field left out keeps what
the record holds; betas replace the set, each new id stamped with the time it
was asked for and stated on the event plane as beta\_requested.

## Request

7 fields, body `application/json` (required).

| Field                | In   | Type                    | Required | Description                                                                                                                              |
| -------------------- | ---- | ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `answers`            | body | marketing.BetaAnswer\[] | —        | Answers replace the record's answers.                                                                                                    |
| `answers[].answer`   | body | string\[]               | —        | Answer is what the person answered: one entry for a typed answer or a single choice, one entry per option for several.                   |
| `answers[].id`       | body | string                  | —        | ID is the question's id on the form, such as "builds".                                                                                   |
| `answers[].question` | body | string                  | —        | Question is the question as the form asked it.                                                                                           |
| `betas`              | body | string\[]               | —        | Betas replace the ids of the unreleased products the account asked for.                                                                  |
| `lead`               | body | string                  | —        | Lead is the reference the application was filed under as a lead (POST /v1/marketing/leads), so the record and the lead are one person's. |
| `program`            | body | string                  | —        | Program is the program applied to: beta, research or partner.                                                                            |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | marketing.Beta  | ok      |
| `default` | problem-details | refused |

`200` body — 21 fields.

| Field                | In   | Type                    | Always | Description                                                                                                                              |
| -------------------- | ---- | ----------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `actions`            | body | marketing.BetaAction\[] | —      | Actions are the actions that earned points, oldest first.                                                                                |
| `actions[].action`   | body | string                  | —      | Action is what was done: star, verified on GitHub, or follow, counted on trust.                                                          |
| `actions[].at`       | body | string                  | —      | At is when it was counted, RFC 3339 in UTC.                                                                                              |
| `actions[].points`   | body | integer (int64)         | —      | Points is what the action earned.                                                                                                        |
| `actions[].target`   | body | string                  | —      | Target is what it was done to: a repository (hanzoai/ai) for a star, a founder's link (zach/github) for a follow.                        |
| `answers`            | body | marketing.BetaAnswer\[] | —      | Answers are the application's answers.                                                                                                   |
| `answers[].answer`   | body | string\[]               | —      | Answer is what the person answered: one entry for a typed answer or a single choice, one entry per option for several.                   |
| `answers[].id`       | body | string                  | —      | ID is the question's id on the form, such as "builds".                                                                                   |
| `answers[].question` | body | string                  | —      | Question is the question as the form asked it.                                                                                           |
| `applied`            | body | boolean                 | —      | Applied is whether the account has applied: its record names a program.                                                                  |
| `betas`              | body | string\[]               | —      | Betas are the ids of the unreleased products asked for.                                                                                  |
| `github`             | body | string                  | —      | GitHub is the GitHub login the account's stars are counted for.                                                                          |
| `lead`               | body | string                  | —      | Lead is the reference the application was filed under as a lead.                                                                         |
| `of`                 | body | integer (int64)         | —      | Of is how many people are on the waitlist, as the board counts them.                                                                     |
| `place`              | body | integer (int64)         | —      | Place is the record's place on the waitlist, 1 first; 0 with no record, or when the board did not answer.                                |
| `points`             | body | integer (int64)         | —      | Points is the sum of what Actions earned.                                                                                                |
| `program`            | body | string                  | —      | Program is the program applied to: beta, research or partner.                                                                            |
| `requested`          | body | object                  | —      | Requested is when each of Betas was asked for, RFC 3339 in UTC, by id.                                                                   |
| `requested.*`        | body | string                  | —      |                                                                                                                                          |
| `score`              | body | integer (int64)         | —      | Score is what the waitlist ranks the record by: Points, the account's referrals and its token usage (GET /v1/leaderboard/beta says how). |
| `since`              | body | string                  | —      | Since is when the record began, as the CRM stamped it; empty with no record.                                                             |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo marketing beta replace
```

**SDK**

**.ts**

```ts
import { Configuration, MarketingApi } from 'hanzoai';

const api = new MarketingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.putMarketingBeta({ answers: [{"answer":["<answer>"],"id":"<id>","question":"<question>"}], betas: ["<betas>"] });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MarketingApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MarketingApi(client).put_marketing_beta(answers=[{"answer":["<answer>"],"id":"<id>","question":"<question>"}], betas=["<betas>"])
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MarketingAPI.PutMarketingBeta(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, marketing_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = marketing_api::put_marketing_beta(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MarketingApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new MarketingApi(client).putMarketingBeta();
```

**HTTP**

```bash
curl -X PUT https://api.hanzo.ai/v1/marketing/beta \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "answers": [
         {
           "answer": [
             "<answer>"
           ],
           "id": "<id>",
           "question": "<question>"
         }
       ],
       "betas": [
         "<betas>"
       ]
     }'
```

**MCP**

MCP reaches **marketing** through the `marketing` tool, which names its 82 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_marketing_audiences"
         }
       }
     }'
```

---

[Marketing API](https://docs.hanzo.ai/docs/openapi/marketing) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
