> This page is part of EVVA for Developers (https://developers.evvahub.com), the documentation of the EVVA Partner API. The API is in developer preview and the SDK packages are not yet published: do not suggest installing them. Index: https://developers.evvahub.com/llms.txt

# Create a subscription price version

POST https://api.evvahub.com/partner/v1/accounts/{creatorId}/subscription-plan/versions
Content-Type: application/json

Adds a new price version to the creator's subscription plan; existing subscribers keep their version.

**Request**

The same body as the creator's own reprice: `planRef`, `priceMinor`, `currency`, `periodMonths`, `discountMinor`, `trialDays` and `introPriceMinor`. The trial, the introductory price and the discount are terms of the version.

The creator's link must carry `money:subscription`, which is off by default. The creator's account must allow monetization (`MONETIZATION_SURFACE`).

**Action approval**

Every new version goes through [action approval](/approvals), bound to every term, under the agency's rule for this operation. The amount is the new `priceMinor`. When it needs a person, you get `202 APPROVAL_REQUIRED`.

The plan-version rules and the account restrictions are checked again when the approved request runs:

- the price must be positive;
- the discount must be below the price;
- an introductory price needs introductory days.

**Idempotency**

Your application must send an `Idempotency-Key`, as every request that goes through action approval must. A first append answers `201`. With a key, the append happens exactly once:

- a retry answers the first append;
- concurrent requests with the same key answer the first append (`200`);
- a retry after a failure between the append and its record answers the version already appended (`200`) instead of appending another.

**Errors**

- `409` — a conflict, such as `IDEMPOTENCY_KEY_CONFLICT` when the key was already used for different terms.

**Required scopes:** `money:subscription`.

**Approval:** this operation runs through [action approval](/approvals) for applications.

Reference: https://developers.evvahub.com/api-reference/content/create-subscription-plan-version

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Request an access token at `POST /partner/v1/oauth/token` (`grant_type=client_credentials`) with the application's client secret or a `private_key_jwt` assertion, then send it as `Authorization: Bearer evpa_live_…` (or `evpa_test_…` for a sandbox application). Tokens are opaque and short lived (see `expires_in`); there is no refresh token. Each operation lists the scopes it requires.

## Request

### Path parameters

- `creatorId` (string, required) — The creator profile id — the ONLY source of the creator a request acts for.

### Headers

- `X-Creator-Id` (string, optional) — Optional echo of the path `creatorId`; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.
- `Idempotency-Key` (string, required) — Required, because the operation may need approval: action approval claims an approval, or reserves the agency's automatic budget, under this key. Without it the request is `400 IDEMPOTENCY_KEY_REQUIRED`, and nothing is asked or reserved. With a key the new version is appended exactly once: concurrent requests and a retry after a failure answer `200` with the version the first one appended. The same key with different terms is `409 IDEMPOTENCY_KEY_CONFLICT`.
- `Partner-Approval-Id` (string, optional) — The `approvalId` a previous `202 APPROVAL_REQUIRED` returned, for an operation your application may run only with approval. Re-send it with the same payload once a person has approved. A blank value is no approval. The approval is spent once, for exactly that agency, application, creator, operation and payload digest, the same amount and currency, and at most the units it was given for. It is claimed for the request's `Idempotency-Key` (required) and becomes final when the operation succeeds: - A refusal before the effect, a `4xx` or `429`, hands it back for your next attempt. - A `5xx`, `503` included, keeps it claimed for this key, because the effect may have happened. It is handed back only when EVVA knows nothing was done. - The same key re-sent replays the request and never has a second effect. You get the stored result where the operation keeps one, otherwise `409 APPROVAL_CONSUMED` with `details.replay: true`: read the resource to see the result. - Another key is `409 APPROVAL_CONSUMED`. When the approval cannot be used, the request is refused with `403` (`APPROVAL_INVALID`, `APPROVAL_MISMATCH` or `APPROVAL_DECLINED`) or `409` (`APPROVAL_PENDING`, `APPROVAL_EXPIRED` or `APPROVAL_CONSUMED`). See [action approval](/approvals).

### Body (application/json)

This endpoint expects an object.

- `planRef` (string, required)
- `priceMinor` (string, required) — The price in minor units, as digits.
- `currency` (string, required)
- `periodMonths` (enum, required)
  - Allowed values: `1`, `3`, `6`, `12`
- `discountMinor` (string, optional)
- `trialDays` (integer, optional)
- `introPriceMinor` (string, optional)

## Response

### 200

A replay: the version this Idempotency-Key already appended (nothing is appended again).

- `map from string to any`

### 201

Appended. A replay with the same `Idempotency-Key` answers `200`.

- `map from string to any`

### 202

The action waits for an authorised person of the agency, and nothing was done. It waits because the agency has no policy for it, its policy requires approval, or the action is over the agency's own automatic limit (`LIMIT_EXCEEDED`). Once an `approval.decided` event approves it, re-send the same request with `Partner-Approval-Id: <approvalId>`. See [action approval](/approvals).

- `code` (enum, required)
  - Allowed values: `APPROVAL_REQUIRED`
- `error` (string, required)
- `approvalId` (string, required)
- `status` (enum, required) — The status of an approval request. Reads show the effective status. - `PENDING` becomes `APPROVED`, `DECLINED`, `EXPIRED` or `REVOKED`. - `APPROVED` becomes `CONSUMED`, `EXPIRED` or `REVOKED`. - `REVOKED` means the request was voided: its access was withdrawn (grant or consent link), the application or agency stopped, the creator was held or restricted, or the policy that governed it was replaced. `revokedReason` says which.
  - Allowed values: `PENDING`, `APPROVED`, `DECLINED`, `EXPIRED`, `CONSUMED`, `REVOKED`
- `reason` (enum, required) — Why the action was not automatic: no policy (the default), a policy that asks for approval, or over a limit.
  - Allowed values: `NO_POLICY`, `POLICY_REQUIRES_APPROVAL`, `LIMIT_EXCEEDED`
- `expiresAt` (datetime, required)
- `requestId` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Invalid or missing parameters: `INVALID_REQUEST` (`details` names the fields), or a more specific code of the operation.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 401 Unauthorized Error

Token missing, malformed, expired or revoked: `INVALID_TOKEN` (or `UNAUTHORIZED` when no bearer token was sent). Request a new token and retry.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 403 Forbidden Error

Not your creator, or not with this token: `GRANT_REVOKED` (no active link to the creator), `NOT_ASSIGNED`, `OAUTH_SCOPE_MISSING` (the creator has not consented to the scope), `INSUFFICIENT_SCOPE` (the token lacks it), `CREATOR_CONTEXT_MISMATCH`, `AGENCY_SUSPENDED`.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 404 Not Found Error

No such resource, or it belongs to another creator: `NOT_FOUND` or a more specific code.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 409 Conflict Error

Conflicts with the current state: `IDEMPOTENCY_KEY_REUSED` (the key was used for a different request), an approval that is still pending or already used, or a more specific code of the operation.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 429 Too Many Requests Error

Rate limited: `RATE_LIMIT_EXCEEDED`. Wait `Retry-After` seconds before retrying.

- `code` (enum, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
  - Allowed values: `RATE_LIMIT_EXCEEDED`, `TOO_MANY_MESSAGES`
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (RateLimitErrorDetails, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 500 Internal Server Error

Unexpected server error: `INTERNAL_ERROR`. Nothing internal is disclosed; quote the `X-Request-Id` when you report it.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 503 Service Unavailable Error

Temporarily unavailable: `SERVICE_UNAVAILABLE`, `TEMPORARILY_UNAVAILABLE`, `MEDIA_STORAGE_UNAVAILABLE` or `CREATOR_STANDING_UNAVAILABLE`. Retry after `Retry-After` seconds.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

## Types

### RateLimitErrorDetails

Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

- `retryAfterSec` (integer, required)
- `level` (enum, optional) — The DM send limit that refused the message, set only with `TOO_MANY_MESSAGES`. It is never a quota, a count or a key. - `conversation` — one side of one thread. - `sender` — a person's own ceiling; it does not apply to applications. - `creator` — everything sent for the creator, studio included. - `application` — everything your application sends. - `agency` — everything your agency sends. - `platform` — the agency's fair share of the platform: its throughput or its concurrency. See [rate limits](/authentication/rate-limits).
  - Allowed values: `conversation`, `sender`, `creator`, `application`, `agency`, `platform`

## Examples

### Content_createSubscriptionPlanVersion_example

**Request**

```json
{
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "priceMinor": "1299",
  "currency": "USD",
  "periodMonths": 1,
  "discountMinor": "0",
  "trialDays": 7,
  "introPriceMinor": "0"
}
```

**Response**

```json
{
  "outcome": "appended",
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "version": 4
}
```

**SDK Code**

```python Content_createSubscriptionPlanVersion_example
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions"

payload = {
    "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
    "priceMinor": "1299",
    "currency": "USD",
    "periodMonths": 1,
    "discountMinor": "0",
    "trialDays": 7,
    "introPriceMinor": "0"
}
headers = {
    "Idempotency-Key": "09039e56-c402-499b-b836-62eaf6024beb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Content_createSubscriptionPlanVersion_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions"

	payload := strings.NewReader("{\n  \"planRef\": \"5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54\",\n  \"priceMinor\": \"1299\",\n  \"currency\": \"USD\",\n  \"periodMonths\": 1,\n  \"discountMinor\": \"0\",\n  \"trialDays\": 7,\n  \"introPriceMinor\": \"0\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "09039e56-c402-499b-b836-62eaf6024beb")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Content_createSubscriptionPlanVersion_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions', [
  'body' => '{
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "priceMinor": "1299",
  "currency": "USD",
  "periodMonths": 1,
  "discountMinor": "0",
  "trialDays": 7,
  "introPriceMinor": "0"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '09039e56-c402-499b-b836-62eaf6024beb',
  ],
]);

echo $response->getBody();
```

### Content_createSubscriptionPlanVersion_example

**Request**

```json
{
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "priceMinor": "1299",
  "currency": "USD",
  "periodMonths": 1,
  "discountMinor": "0",
  "trialDays": 7,
  "introPriceMinor": "0"
}
```

**Response**

```json
{
  "outcome": "appended",
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "version": 4
}
```

**SDK Code**

```python Content_createSubscriptionPlanVersion_example
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions"

payload = {
    "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
    "priceMinor": "1299",
    "currency": "USD",
    "periodMonths": 1,
    "discountMinor": "0",
    "trialDays": 7,
    "introPriceMinor": "0"
}
headers = {
    "Idempotency-Key": "09039e56-c402-499b-b836-62eaf6024beb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Content_createSubscriptionPlanVersion_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions"

	payload := strings.NewReader("{\n  \"planRef\": \"5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54\",\n  \"priceMinor\": \"1299\",\n  \"currency\": \"USD\",\n  \"periodMonths\": 1,\n  \"discountMinor\": \"0\",\n  \"trialDays\": 7,\n  \"introPriceMinor\": \"0\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "09039e56-c402-499b-b836-62eaf6024beb")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Content_createSubscriptionPlanVersion_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions', [
  'body' => '{
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "priceMinor": "1299",
  "currency": "USD",
  "periodMonths": 1,
  "discountMinor": "0",
  "trialDays": 7,
  "introPriceMinor": "0"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '09039e56-c402-499b-b836-62eaf6024beb',
  ],
]);

echo $response->getBody();
```

### Content_createSubscriptionPlanVersion_example

**Request**

```json
{
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "priceMinor": "1299",
  "currency": "USD",
  "periodMonths": 1,
  "discountMinor": "0",
  "trialDays": 7,
  "introPriceMinor": "0"
}
```

**Response**

```json
{
  "approvalId": "apr_8sKq2VnT4xLm7RcB1pYw9ZdH",
  "code": "APPROVAL_REQUIRED",
  "error": "This action needs the approval of an authorised person",
  "expiresAt": "2026-12-03T14:31:00.000Z",
  "reason": "NO_POLICY",
  "requestId": "2ac01c39-6b45-4a0b-8db1-be67984d2cac",
  "status": "PENDING"
}
```

**SDK Code**

```python Content_createSubscriptionPlanVersion_example
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions"

payload = {
    "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
    "priceMinor": "1299",
    "currency": "USD",
    "periodMonths": 1,
    "discountMinor": "0",
    "trialDays": 7,
    "introPriceMinor": "0"
}
headers = {
    "Idempotency-Key": "09039e56-c402-499b-b836-62eaf6024beb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Content_createSubscriptionPlanVersion_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions"

	payload := strings.NewReader("{\n  \"planRef\": \"5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54\",\n  \"priceMinor\": \"1299\",\n  \"currency\": \"USD\",\n  \"periodMonths\": 1,\n  \"discountMinor\": \"0\",\n  \"trialDays\": 7,\n  \"introPriceMinor\": \"0\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "09039e56-c402-499b-b836-62eaf6024beb")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Content_createSubscriptionPlanVersion_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/subscription-plan/versions', [
  'body' => '{
  "planRef": "5d2b7c41-9e3a-4f68-b1d0-7a8c3e2f9b54",
  "priceMinor": "1299",
  "currency": "USD",
  "periodMonths": 1,
  "discountMinor": "0",
  "trialDays": 7,
  "introPriceMinor": "0"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '09039e56-c402-499b-b836-62eaf6024beb',
  ],
]);

echo $response->getBody();
```