Skip to content

Play methods: apply

The Play Verbs apply as typed SDK methods, with inputs, result, refusals and an example.

Reference for Play, one group of Play methods.

Play.apply

Apply runs a Play across a Portfolio cohort, one wave at a time, measured as an Experiment. Verb page.

TypeScript
interface PlayVerbs {
  apply(input: PlayApplyInput, options?: SB.CallOptions): SB.Call<PlayApplyOutput>
}

Emits Play.applied.

Inputs

InputTypeRequiredDescription
playPlayrequiredThe Play to run.
cohortstringrequiredThe Portfolio query that selects the Startups.

Returns

OutputTypeRequiredDescription
experimentExperimentrequiredThe Experiment that measures the rollout.
playPlayrequiredThe Play applied.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const { experiment, play } = await $.Play.apply({ play: 'play_hr4WTcrAyZ', cohort: 'Example cohort' })