curl --request POST \
--url 'https://api.widgetic.com/v1/workspaces/789e0123-e89b-12d3-a456-426614174002/ab-tests' \
--header "Authorization: Bearer $WIDGETIC_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--header 'Content-Type: application/json' \
--data '{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}'import { ABTestingApi } from '@widgetic/api-sdk-ts';
import { randomUUID } from 'node:crypto';
const aBTestingApi = new ABTestingApi(process.env.WIDGETIC_API_KEY!);
const result = await aBTestingApi.createWorkspaceABTest({
workspaceId: '789e0123-e89b-12d3-a456-426614174002',
idempotencyKey: randomUUID(),
createABTestRequest: {
name: 'Homepage Hero Test',
variants: [
{
name: 'Variant A',
compositionId: '456e7890-e89b-12d3-a456-426614174003',
trafficPercentage: 50,
description: 'New design with a larger CTA',
},
],
primaryMetric: 'clicks',
description: 'Testing different hero section layouts',
},
});
console.log(result);import os
import uuid
import api_sdk_py
configuration = api_sdk_py.Configuration(access_token=os.environ["WIDGETIC_API_KEY"])
with api_sdk_py.ApiClient(configuration) as api_client:
abtesting_api = api_sdk_py.ABTestingApi(api_client)
result = abtesting_api.create_workspace_ab_test(
workspace_id="789e0123-e89b-12d3-a456-426614174002",
idempotency_key=str(uuid.uuid4()),
create_ab_test_request={
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA",
},
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts",
},
)
print(result)package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/google/uuid"
widgetic "github.com/widgetic/api-sdk-go"
)
func main() {
ctx := context.WithValue(context.Background(), widgetic.ContextAccessToken, os.Getenv("WIDGETIC_API_KEY"))
client := widgetic.NewAPIClient(widgetic.NewConfiguration())
createABTestRequestJSON := `{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}`
var createABTestRequest widgetic.CreateABTestRequest
if err := json.Unmarshal([]byte(createABTestRequestJSON), &createABTestRequest); err != nil {
log.Fatal(err)
}
result, _, err := client.ABTestingAPI.CreateWorkspaceABTest(ctx, "789e0123-e89b-12d3-a456-426614174002").
IdempotencyKey(uuid.NewString()).
CreateABTestRequest(createABTestRequest).
Execute()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(result)
}import com.widgetic.api.ApiClient;
import com.widgetic.api.ApiException;
import com.widgetic.api.Configuration;
import com.widgetic.api.JSON;
import com.widgetic.api.api.ABTestingApi;
import com.widgetic.api.model.CreateABTestRequest;
import java.util.UUID;
public class Example {
public static void main(String[] args) throws ApiException {
ApiClient client = Configuration.getDefaultApiClient();
client.setBearerToken(System.getenv("WIDGETIC_API_KEY"));
ABTestingApi aBTestingApi = new ABTestingApi(client);
String createABTestRequestJson = """
{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}
""";
CreateABTestRequest createABTestRequest = JSON.deserialize(createABTestRequestJson, CreateABTestRequest.class);
var result = aBTestingApi.createWorkspaceABTest(
"789e0123-e89b-12d3-a456-426614174002",
UUID.randomUUID().toString(),
createABTestRequest,
null,
null
);
System.out.println(result);
}
}using System;
using Newtonsoft.Json;
using Widgetic.ApiSdk.Cs.Api;
using Widgetic.ApiSdk.Cs.Client;
using Widgetic.ApiSdk.Cs.Model;
var configuration = new Configuration
{
AccessToken = Environment.GetEnvironmentVariable("WIDGETIC_API_KEY")!,
};
var aBTestingApi = new ABTestingApi(configuration);
var createABTestRequest = JsonConvert.DeserializeObject<CreateABTestRequest>("""
{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}
""")!;
var result = aBTestingApi.CreateWorkspaceABTest(
workspaceId: "789e0123-e89b-12d3-a456-426614174002",
idempotencyKey: Guid.NewGuid().ToString(),
createABTestRequest: createABTestRequest
);
Console.WriteLine(result);require 'securerandom'
require 'api-sdk-rb'
ApiSdkRb.configure do |config|
config.access_token = ENV['WIDGETIC_API_KEY']
end
abtesting_api = ApiSdkRb::ABTestingApi.new
result = abtesting_api.create_workspace_ab_test(
'789e0123-e89b-12d3-a456-426614174002',
SecureRandom.uuid,
{
name: 'Homepage Hero Test',
variants: [
{
name: 'Variant A',
compositionId: '456e7890-e89b-12d3-a456-426614174003',
trafficPercentage: 50,
description: 'New design with a larger CTA'
}
],
primaryMetric: 'clicks',
description: 'Testing different hero section layouts'
}
)
puts result<?php
require_once __DIR__ . '/vendor/autoload.php';
use WidgeticApi\Api\ABTestingApi;
use WidgeticApi\Configuration;
use WidgeticApi\Model\CreateABTestRequest;
use WidgeticApi\ObjectSerializer;
$config = Configuration::getDefaultConfiguration()->setAccessToken(getenv('WIDGETIC_API_KEY'));
$aBTestingApi = new ABTestingApi(new GuzzleHttp\Client(), $config);
$createABTestRequestJson = '{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}';
$createABTestRequest = ObjectSerializer::deserialize(json_decode($createABTestRequestJson), CreateABTestRequest::class);
$result = $aBTestingApi->createWorkspaceABTest(
workspace_id: '789e0123-e89b-12d3-a456-426614174002',
idempotency_key: bin2hex(random_bytes(16)),
create_ab_test_request: $createABTestRequest,
);
print_r($result);{
"success": true,
"data": {
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "789e0123-e89b-12d3-a456-426614174002",
"name": "Homepage Hero Test",
"description": "Testing different hero section layouts",
"status": "running",
"successMetrics": [
"clicks",
"conversions"
],
"primaryMetric": "conversions",
"confidenceLevel": 0.95,
"minSampleSize": 1000,
"autoGraduate": true,
"graduationThreshold": 0.95,
"startDate": "2024-01-15T10:00:00Z",
"endDate": "2024-01-30T10:00:00Z",
"durationDays": 15,
"createdAt": "2024-01-15T09:00:00Z",
"updatedAt": "2024-01-15T09:00:00Z",
"variants": []
}
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Create an A/B test
Creates a new AB test in the specified workspace. Use the id of the workspace (its organization UUID) as workspaceId.
Called for one managed user (X-Managed-User-Id or X-Managed-User-External-Id), the test is filed under that
customer (managedUserId in the answer) and every version has to be a composition of that customer: a composition
of another customer, or one that is yours, answers 404 as if it did not exist. A customer may hold only so many
tests (details.limit says how many), and a customer that is switched off cannot be given a new one. The
customer comes from the header and nowhere else: a managedUserId in the body is not read.
A test is always made as a draft, and no visitor sees it until it is started with
POST /workspaces/{workspaceId}/ab-tests/{testId}/start.
The test is at data.data.
curl --request POST \
--url 'https://api.widgetic.com/v1/workspaces/789e0123-e89b-12d3-a456-426614174002/ab-tests' \
--header "Authorization: Bearer $WIDGETIC_API_KEY" \
--header "Idempotency-Key: $(uuidgen)" \
--header 'Content-Type: application/json' \
--data '{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}'import { ABTestingApi } from '@widgetic/api-sdk-ts';
import { randomUUID } from 'node:crypto';
const aBTestingApi = new ABTestingApi(process.env.WIDGETIC_API_KEY!);
const result = await aBTestingApi.createWorkspaceABTest({
workspaceId: '789e0123-e89b-12d3-a456-426614174002',
idempotencyKey: randomUUID(),
createABTestRequest: {
name: 'Homepage Hero Test',
variants: [
{
name: 'Variant A',
compositionId: '456e7890-e89b-12d3-a456-426614174003',
trafficPercentage: 50,
description: 'New design with a larger CTA',
},
],
primaryMetric: 'clicks',
description: 'Testing different hero section layouts',
},
});
console.log(result);import os
import uuid
import api_sdk_py
configuration = api_sdk_py.Configuration(access_token=os.environ["WIDGETIC_API_KEY"])
with api_sdk_py.ApiClient(configuration) as api_client:
abtesting_api = api_sdk_py.ABTestingApi(api_client)
result = abtesting_api.create_workspace_ab_test(
workspace_id="789e0123-e89b-12d3-a456-426614174002",
idempotency_key=str(uuid.uuid4()),
create_ab_test_request={
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA",
},
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts",
},
)
print(result)package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/google/uuid"
widgetic "github.com/widgetic/api-sdk-go"
)
func main() {
ctx := context.WithValue(context.Background(), widgetic.ContextAccessToken, os.Getenv("WIDGETIC_API_KEY"))
client := widgetic.NewAPIClient(widgetic.NewConfiguration())
createABTestRequestJSON := `{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}`
var createABTestRequest widgetic.CreateABTestRequest
if err := json.Unmarshal([]byte(createABTestRequestJSON), &createABTestRequest); err != nil {
log.Fatal(err)
}
result, _, err := client.ABTestingAPI.CreateWorkspaceABTest(ctx, "789e0123-e89b-12d3-a456-426614174002").
IdempotencyKey(uuid.NewString()).
CreateABTestRequest(createABTestRequest).
Execute()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(result)
}import com.widgetic.api.ApiClient;
import com.widgetic.api.ApiException;
import com.widgetic.api.Configuration;
import com.widgetic.api.JSON;
import com.widgetic.api.api.ABTestingApi;
import com.widgetic.api.model.CreateABTestRequest;
import java.util.UUID;
public class Example {
public static void main(String[] args) throws ApiException {
ApiClient client = Configuration.getDefaultApiClient();
client.setBearerToken(System.getenv("WIDGETIC_API_KEY"));
ABTestingApi aBTestingApi = new ABTestingApi(client);
String createABTestRequestJson = """
{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}
""";
CreateABTestRequest createABTestRequest = JSON.deserialize(createABTestRequestJson, CreateABTestRequest.class);
var result = aBTestingApi.createWorkspaceABTest(
"789e0123-e89b-12d3-a456-426614174002",
UUID.randomUUID().toString(),
createABTestRequest,
null,
null
);
System.out.println(result);
}
}using System;
using Newtonsoft.Json;
using Widgetic.ApiSdk.Cs.Api;
using Widgetic.ApiSdk.Cs.Client;
using Widgetic.ApiSdk.Cs.Model;
var configuration = new Configuration
{
AccessToken = Environment.GetEnvironmentVariable("WIDGETIC_API_KEY")!,
};
var aBTestingApi = new ABTestingApi(configuration);
var createABTestRequest = JsonConvert.DeserializeObject<CreateABTestRequest>("""
{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}
""")!;
var result = aBTestingApi.CreateWorkspaceABTest(
workspaceId: "789e0123-e89b-12d3-a456-426614174002",
idempotencyKey: Guid.NewGuid().ToString(),
createABTestRequest: createABTestRequest
);
Console.WriteLine(result);require 'securerandom'
require 'api-sdk-rb'
ApiSdkRb.configure do |config|
config.access_token = ENV['WIDGETIC_API_KEY']
end
abtesting_api = ApiSdkRb::ABTestingApi.new
result = abtesting_api.create_workspace_ab_test(
'789e0123-e89b-12d3-a456-426614174002',
SecureRandom.uuid,
{
name: 'Homepage Hero Test',
variants: [
{
name: 'Variant A',
compositionId: '456e7890-e89b-12d3-a456-426614174003',
trafficPercentage: 50,
description: 'New design with a larger CTA'
}
],
primaryMetric: 'clicks',
description: 'Testing different hero section layouts'
}
)
puts result<?php
require_once __DIR__ . '/vendor/autoload.php';
use WidgeticApi\Api\ABTestingApi;
use WidgeticApi\Configuration;
use WidgeticApi\Model\CreateABTestRequest;
use WidgeticApi\ObjectSerializer;
$config = Configuration::getDefaultConfiguration()->setAccessToken(getenv('WIDGETIC_API_KEY'));
$aBTestingApi = new ABTestingApi(new GuzzleHttp\Client(), $config);
$createABTestRequestJson = '{
"name": "Homepage Hero Test",
"variants": [
{
"name": "Variant A",
"compositionId": "456e7890-e89b-12d3-a456-426614174003",
"trafficPercentage": 50,
"description": "New design with a larger CTA"
}
],
"primaryMetric": "clicks",
"description": "Testing different hero section layouts"
}';
$createABTestRequest = ObjectSerializer::deserialize(json_decode($createABTestRequestJson), CreateABTestRequest::class);
$result = $aBTestingApi->createWorkspaceABTest(
workspace_id: '789e0123-e89b-12d3-a456-426614174002',
idempotency_key: bin2hex(random_bytes(16)),
create_ab_test_request: $createABTestRequest,
);
print_r($result);{
"success": true,
"data": {
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "789e0123-e89b-12d3-a456-426614174002",
"name": "Homepage Hero Test",
"description": "Testing different hero section layouts",
"status": "running",
"successMetrics": [
"clicks",
"conversions"
],
"primaryMetric": "conversions",
"confidenceLevel": 0.95,
"minSampleSize": 1000,
"autoGraduate": true,
"graduationThreshold": 0.95,
"startDate": "2024-01-15T10:00:00Z",
"endDate": "2024-01-30T10:00:00Z",
"durationDays": 15,
"createdAt": "2024-01-15T09:00:00Z",
"updatedAt": "2024-01-15T09:00:00Z",
"variants": []
}
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Authorizations
Send your API key as a bearer token: Authorization: Bearer <your API key>. Make a key in the dashboard under Settings → API keys; a workspace key starts with wdg_org_ and works in the workspace it was made in. See API keys and Authentication.
Headers
Required: a call without it is refused with 400. A key of your own that names this one request; a UUID is ideal. It is 8 to 50 characters of letters, digits, - and _. Send the same key again when you retry (after a timeout, a dropped connection or a 5xx) and the call is carried out once: the retry gets the first answer back, marked X-Idempotency-Cached: true. The same key with a different body is refused with 422, and a retry that arrives while the first call is still running with 409 (see Retry-After).
8 - 50^[a-zA-Z0-9_-]{8,50}$"9b2d6f0a-3c41-4e5a-8d77-1f2e3a4b5c6d"
The id Widgetic gave the managed user (POST /managed-users). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions, workflows, A/B tests and translations: a list shows only theirs, one the call makes is filed under them, and one of another user, or one that does not exist, answers 404 (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers 404 with MANAGED_USER_NOT_FOUND. An empty, repeated or malformed header is 400 with MANAGED_USER_SCOPE_INVALID; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with 403 and MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE: send it without the header. Only a partner's API key can send it, because only a partner has managed users: a call that is not made with an API key is refused with 403 and MANAGED_USER_SCOPE_NOT_ALLOWED, and an API key that is not a partner's finds no managed user (404 with MANAGED_USER_NOT_FOUND). The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An Idempotency-Key is kept apart for each managed user.
"3f2b8c1e-7a4d-4e0b-9c55-2d1a6b7e8f90"
Your own id for the managed user (its externalId), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. Send this header, or the other one, never both. Left out, the call works on your whole account, as it always has. With it, the call reaches only that user's compositions, workflows, A/B tests and translations: a list shows only theirs, one the call makes is filed under them, and one of another user, or one that does not exist, answers 404 (the same answer, so the call cannot be used to find out what another customer has). A managed user that is not yours answers 404 with MANAGED_USER_NOT_FOUND. An empty, repeated or malformed header is 400 with MANAGED_USER_SCOPE_INVALID; an empty header is never read as no header. A call that is about the whole account, such as the list of your managed users, is refused with 403 and MANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE: send it without the header. Only a partner's API key can send it, because only a partner has managed users: a call that is not made with an API key is refused with 403 and MANAGED_USER_SCOPE_NOT_ALLOWED, and an API key that is not a partner's finds no managed user (404 with MANAGED_USER_NOT_FOUND). The header is a limit the call asks for: whoever holds the key can leave it out, so for a credential that a customer's browser holds, use an editor session. An Idempotency-Key is kept apart for each managed user.
1 - 255"customer-1042"
Body
Response
AB test created successfully