# Erna > AI-powered staff scheduling with constraint programming ## Docs - [Create a checkout session](https://docs.erna.ai/api-reference/billing/create-a-checkout-session.md): Create a Stripe Checkout session to top up credits. - [Get credit balance](https://docs.erna.ai/api-reference/billing/get-credit-balance.md): Return the current credit balance for the authenticated user. - [List credit transactions](https://docs.erna.ai/api-reference/billing/list-credit-transactions.md): Return recent credit transactions for the authenticated user. - [Receive Stripe webhook events](https://docs.erna.ai/api-reference/billing/receive-stripe-webhook-events.md): Receive Stripe webhook events for completed checkout sessions. - [Create a connector connection](https://docs.erna.ai/api-reference/connections/create-a-connector-connection.md): Creates a workspace connector connection. For manual Planday setup, set authMode = manual to return an Erna-hosted credential form. Trusted callers can still send auth.kind = customer_token with the customer portal app id and refresh token. Omit authMode to start OAuth when it is configured. - [Get a connection](https://docs.erna.ai/api-reference/connections/get-a-connection.md) - [List connections](https://docs.erna.ai/api-reference/connections/list-connections.md): Lists workspace-owned connections and returns the concrete link used to create another connection in this workspace. If a required connector is missing, choose a supported connector from the connector catalog and POST to links.create with that connector id. - [Revoke a connection](https://docs.erna.ai/api-reference/connections/revoke-a-connection.md) - [List connectors](https://docs.erna.ai/api-reference/connectors/list-connectors.md) - [Create a reusable pipeline configuration](https://docs.erna.ai/api-reference/pipelines/create-a-reusable-pipeline-configuration.md): Create a reusable pipeline configuration for a playbook. Do not create a new pipeline for every run. Create once, wait until it is ready, then execute it repeatedly with playbook-specific input. - [Get a reusable pipeline](https://docs.erna.ai/api-reference/pipelines/get-a-reusable-pipeline.md): Get pipeline details, build status, reusable definition, and run schemas. Fetch this before running when you need the inputJsonSchema for the next run. Only ready pipelines with a latestRevisionId can be executed. - [List reusable pipelines](https://docs.erna.ai/api-reference/pipelines/list-reusable-pipelines.md): List reusable pipeline configurations in a workspace. Use this before creating a pipeline so an existing ready pipeline can be reused for another run instead of creating a duplicate. - [List pipeline playbooks](https://docs.erna.ai/api-reference/playbooks/list-pipeline-playbooks.md): Discover available playbooks. A playbook defines the task type, generation behavior, and run input/output contract used by reusable pipelines. - [Build a new pipeline revision](https://docs.erna.ai/api-reference/revisions/build-a-new-pipeline-revision.md): Create a new executable revision when the reusable pipeline instructions or connector configuration change. Do not create a revision for each run date; use the run endpoint for each execution. - [Get a pipeline revision](https://docs.erna.ai/api-reference/revisions/get-a-pipeline-revision.md): Get one executable build of a reusable pipeline, including the input and output schemas used by runs of that revision. - [List pipeline revisions](https://docs.erna.ai/api-reference/revisions/list-pipeline-revisions.md): List executable builds for a reusable pipeline. Revisions represent configuration changes over time, not individual executions. - [Get a pipeline run](https://docs.erna.ai/api-reference/runs/get-a-pipeline-run.md): Get the current state and eventual output of one pipeline execution. Poll this endpoint until status is complete or failed. - [Run an existing pipeline](https://docs.erna.ai/api-reference/runs/run-an-existing-pipeline.md): Execute the latest ready revision of an existing reusable pipeline. Use this endpoint for each new execution instead of creating another pipeline. - [Create a workspace](https://docs.erna.ai/api-reference/workspaces/create-a-workspace.md): Create a workspace owned by the authenticated user. The user must already own at least one workspace, which prevents viewer-only users from creating workspaces. - [List workspaces](https://docs.erna.ai/api-reference/workspaces/list-workspaces.md): List workspaces and pipeline summaries accessible to the authenticated user. - [Authentication](https://docs.erna.ai/api/authentication.md): How to authenticate with the Erna API - [Overview](https://docs.erna.ai/api/overview.md): REST and MCP APIs for AI-powered staff scheduling - [Rules](https://docs.erna.ai/dabke/guides/rules.md): Built-in scheduling rules and how to configure them - [Semantic Time](https://docs.erna.ai/dabke/guides/semantic-time.md): Define flexible named time periods that vary by day - [Feedback](https://docs.erna.ai/dabke/guides/validation.md): Understand instruction-level schedule feedback, failures, and solver errors - [Overview](https://docs.erna.ai/dabke/overview.md): Scheduling library powered by constraint programming (CP-SAT) - [Quickstart](https://docs.erna.ai/dabke/quickstart.md): Create your first schedule in under 5 minutes - [AssignTogetherOptions](https://docs.erna.ai/dabke/reference/AssignTogetherOptions.md) - [BuiltInCpsatRuleConfigRegistry](https://docs.erna.ai/dabke/reference/BuiltInCpsatRuleConfigRegistry.md) - [builtInCpsatRuleRegistry](https://docs.erna.ai/dabke/reference/BuiltInCpsatRuleRegistry.md) - [CompilationResult](https://docs.erna.ai/dabke/reference/CompilationResult.md) - [ConstraintArtifact](https://docs.erna.ai/dabke/reference/ConstraintArtifact.md) - [CostRuleOptions](https://docs.erna.ai/dabke/reference/CostRuleOptions.md) - [CoverageOptions](https://docs.erna.ai/dabke/reference/CoverageOptions.md) - [CoverageVariant](https://docs.erna.ai/dabke/reference/CoverageVariant.md) - [CpsatRuleConfigByName](https://docs.erna.ai/dabke/reference/CpsatRuleConfigByName.md) - [CpsatRuleConfigEntry](https://docs.erna.ai/dabke/reference/CpsatRuleConfigEntry.md) - [CpsatRuleConfigEntryFor](https://docs.erna.ai/dabke/reference/CpsatRuleConfigEntryFor.md) - [CpsatRuleRegistry](https://docs.erna.ai/dabke/reference/CpsatRuleRegistry.md) - [DateString](https://docs.erna.ai/dabke/reference/DateString.md) - [DayOfWeek](https://docs.erna.ai/dabke/reference/DayOfWeek.md) - [DaysOfWeekPerPeriodOptions](https://docs.erna.ai/dabke/reference/DaysOfWeekPerPeriodOptions.md) - [EntityOnlyRuleOptions](https://docs.erna.ai/dabke/reference/EntityOnlyRuleOptions.md) - [HardConstraintArtifact](https://docs.erna.ai/dabke/reference/HardConstraintArtifact.md) - [HourlyPay](https://docs.erna.ai/dabke/reference/HourlyPay.md) - [HttpSolverClient](https://docs.erna.ai/dabke/reference/HttpSolverClient.md) - [MaxConcurrentAssignmentsOptions](https://docs.erna.ai/dabke/reference/MaxConcurrentAssignmentsOptions.md) - [ModelArtifact](https://docs.erna.ai/dabke/reference/ModelArtifact.md) - [ModelBuilder](https://docs.erna.ai/dabke/reference/ModelBuilder.md) - [ModelBuilderConfig](https://docs.erna.ai/dabke/reference/ModelBuilderConfig.md) - [ModelSolveStrategy](https://docs.erna.ai/dabke/reference/ModelSolveStrategy.md) - [ObjectiveArtifact](https://docs.erna.ai/dabke/reference/ObjectiveArtifact.md) - [OvertimeTier](https://docs.erna.ai/dabke/reference/OvertimeTier.md) - [RecurringPeriod](https://docs.erna.ai/dabke/reference/RecurringPeriod.md) - [ResolvedShiftAssignment](https://docs.erna.ai/dabke/reference/ResolvedShiftAssignment.md) - [RuleCompileContext](https://docs.erna.ai/dabke/reference/RuleCompileContext.md) - [RuleDescriptor](https://docs.erna.ai/dabke/reference/RuleDescriptor.md) - [RuleEntry](https://docs.erna.ai/dabke/reference/RuleEntry.md) - [RuleOptions](https://docs.erna.ai/dabke/reference/RuleOptions.md) - [SalariedPay](https://docs.erna.ai/dabke/reference/SalariedPay.md) - [schedule](https://docs.erna.ai/dabke/reference/Schedule.md) - [ScheduleConfig](https://docs.erna.ai/dabke/reference/ScheduleConfig.md) - [ScheduleRuleEntry](https://docs.erna.ai/dabke/reference/ScheduleRuleEntry.md) - [ScheduleWithRuleRegistryConfig](https://docs.erna.ai/dabke/reference/ScheduleWithRuleRegistryConfig.md) - [schedulingDay](https://docs.erna.ai/dabke/reference/SchedulingDay.md) - [SchedulingMember](https://docs.erna.ai/dabke/reference/SchedulingMember.md) - [SchedulingPeriod](https://docs.erna.ai/dabke/reference/SchedulingPeriod.md) - [ShiftAssignment](https://docs.erna.ai/dabke/reference/ShiftAssignment.md) - [ShiftPattern](https://docs.erna.ai/dabke/reference/ShiftPattern.md) - [SoftConstraintArtifact](https://docs.erna.ai/dabke/reference/SoftConstraintArtifact.md) - [SolveOptions](https://docs.erna.ai/dabke/reference/SolveOptions.md) - [SolveResult](https://docs.erna.ai/dabke/reference/SolveResult.md) - [SolveStrategy](https://docs.erna.ai/dabke/reference/SolveStrategy.md) - [SolverClient](https://docs.erna.ai/dabke/reference/SolverClient.md) - [SolverResult](https://docs.erna.ai/dabke/reference/SolverResult.md) - [SolverStatus](https://docs.erna.ai/dabke/reference/SolverStatus.md) - [TargetDaysPerWeekOptions](https://docs.erna.ai/dabke/reference/TargetDaysPerWeekOptions.md) - [TargetPeakConcurrentAssignmentsOptions](https://docs.erna.ai/dabke/reference/TargetPeakConcurrentAssignmentsOptions.md) - [TimeOfDay](https://docs.erna.ai/dabke/reference/TimeOfDay.md) - [TimeOffOptions](https://docs.erna.ai/dabke/reference/TimeOffOptions.md) - [VariableArtifact](https://docs.erna.ai/dabke/reference/VariableArtifact.md) - [assertValidCpsatRuleRegistry](https://docs.erna.ai/dabke/reference/assertValidCpsatRuleRegistry.md) - [assignTogether](https://docs.erna.ai/dabke/reference/assignTogether.md) - [avoidAssignment](https://docs.erna.ai/dabke/reference/avoidAssignment.md) - [compileRuleDescriptor](https://docs.erna.ai/dabke/reference/compileRuleDescriptor.md) - [cover](https://docs.erna.ai/dabke/reference/cover.md) - [createCpsatRuleRegistry](https://docs.erna.ai/dabke/reference/createCpsatRuleRegistry.md) - [dailyOvertimeMultiplier](https://docs.erna.ai/dabke/reference/dailyOvertimeMultiplier.md) - [dailyOvertimeSurcharge](https://docs.erna.ai/dabke/reference/dailyOvertimeSurcharge.md) - [dayMultiplier](https://docs.erna.ai/dabke/reference/dayMultiplier.md) - [daySurcharge](https://docs.erna.ai/dabke/reference/daySurcharge.md) - [defineRuleDescriptor](https://docs.erna.ai/dabke/reference/defineRuleDescriptor.md) - [defineRuleFor](https://docs.erna.ai/dabke/reference/defineRuleFor.md) - [maxConcurrentAssignments](https://docs.erna.ai/dabke/reference/maxConcurrentAssignments.md) - [maxConsecutiveDays](https://docs.erna.ai/dabke/reference/maxConsecutiveDays.md) - [maxDaysOfWeekPerPeriod](https://docs.erna.ai/dabke/reference/maxDaysOfWeekPerPeriod.md) - [maxDaysPerWeek](https://docs.erna.ai/dabke/reference/maxDaysPerWeek.md) - [maxHoursPerDay](https://docs.erna.ai/dabke/reference/maxHoursPerDay.md) - [maxHoursPerWeek](https://docs.erna.ai/dabke/reference/maxHoursPerWeek.md) - [maxShiftsPerDay](https://docs.erna.ai/dabke/reference/maxShiftsPerDay.md) - [minConsecutiveDays](https://docs.erna.ai/dabke/reference/minConsecutiveDays.md) - [minDaysOfWeekPerPeriod](https://docs.erna.ai/dabke/reference/minDaysOfWeekPerPeriod.md) - [minDaysPerWeek](https://docs.erna.ai/dabke/reference/minDaysPerWeek.md) - [minHoursPerDay](https://docs.erna.ai/dabke/reference/minHoursPerDay.md) - [minHoursPerWeek](https://docs.erna.ai/dabke/reference/minHoursPerWeek.md) - [minRestBetweenShifts](https://docs.erna.ai/dabke/reference/minRestBetweenShifts.md) - [minimizeCost](https://docs.erna.ai/dabke/reference/minimizeCost.md) - [mustAssign](https://docs.erna.ai/dabke/reference/mustAssign.md) - [overtimeMultiplier](https://docs.erna.ai/dabke/reference/overtimeMultiplier.md) - [overtimeSurcharge](https://docs.erna.ai/dabke/reference/overtimeSurcharge.md) - [parseSolverResponse](https://docs.erna.ai/dabke/reference/parseSolverResponse.md) - [partialSchedule](https://docs.erna.ai/dabke/reference/partialSchedule.md) - [preferAssignment](https://docs.erna.ai/dabke/reference/preferAssignment.md) - [preferLocation](https://docs.erna.ai/dabke/reference/preferLocation.md) - [preferRole](https://docs.erna.ai/dabke/reference/preferRole.md) - [resolveAssignments](https://docs.erna.ai/dabke/reference/resolveAssignments.md) - [scheduleWithRuleRegistry](https://docs.erna.ai/dabke/reference/scheduleWithRuleRegistry.md) - [shift](https://docs.erna.ai/dabke/reference/shift.md) - [t](https://docs.erna.ai/dabke/reference/t.md) - [targetDaysPerWeek](https://docs.erna.ai/dabke/reference/targetDaysPerWeek.md) - [targetPeakConcurrentAssignments](https://docs.erna.ai/dabke/reference/targetPeakConcurrentAssignments.md) - [tieredOvertimeMultiplier](https://docs.erna.ai/dabke/reference/tieredOvertimeMultiplier.md) - [time](https://docs.erna.ai/dabke/reference/time.md) - [timeOff](https://docs.erna.ai/dabke/reference/timeOff.md) - [timeSurcharge](https://docs.erna.ai/dabke/reference/timeSurcharge.md) - [weekdays](https://docs.erna.ai/dabke/reference/weekdays.md) - [weekend](https://docs.erna.ai/dabke/reference/weekend.md) ## OpenAPI Specs - [openapi](https://docs.erna.ai/openapi.json)