Skip to main content
GET
Suggested campaign settings
The settings the dashboard’s campaign wizard starts a new campaign from, resolved for your workspace: its outcome IDs, its timezone and its working week. settings is shaped to be sent to POST /campaigns as-is. Required scope: campaigns:read.
These are suggestions you send, not defaults the API applies — with one exception. A campaign’s configuration columns have no default: a name-only POST /campaigns creates a draft with every other setting null, and launch refuses until each is set. The exception is stop_disposition_ids: left out of POST /campaigns, the campaign stops on the set below. Read these values, change what you want, and send them — the way a dashboard user sees them on screen before saving.
The suggested stop set includes every outcome your workspace added itself, whatever it means. An outcome of yours that asks for another call — Call me back on Sunday, Callback requested — confirm number — therefore stops a new campaign from calling that contact again, unlike the built-in Callback Requested. Take such an outcome out of settings.stop_disposition_ids before you send it, or the person who asked to be called back never is.
The stop set is copied when the campaign is created. POST /campaigns stores these ids on the campaign; it does not follow this list afterwards. An outcome you add to the workspace later stops only the campaigns created after it — an existing draft or a running campaign keeps the set it was created with. To give an existing campaign the current suggested set, read this endpoint again and send its settings.stop_disposition_ids with PATCH /campaigns/{id}:
There is no query parameter and no request body.

Response fields

Example

stop_dispositions is abbreviated to one entry here; the response carries all seven — one per ID above, for a workspace with only the standard outcomes, and one more for each outcome it added.

Creating a campaign from them

Errors

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Response

The suggested settings for this workspace

settings
object

Writable campaign fields with their suggested values. stop_disposition_ids holds this workspace's Interested, Appointment Set, Not Interested, Issue Resolved, Transferred to a Person, Wrong Number and Do Not Call outcomes (any the workspace still has) and every outcome the workspace added itself — all but Callback Requested and the four Yappr assigns (No Answer, Voicemail, Unclassified, Failed). calling_window is in the workspace timezone and follows the workspace calling hours when it has them: while outbound_enabled is true, their days from the earliest opening to the latest close (the hours still trim each day); while it is false, the window that fits inside the hours of every day it offers; without hours it is 09:00–18:00, Sunday–Thursday where that is the working week and Monday–Friday elsewhere. {} when the workspace has no timezone.

stop_dispositions
object[]

The full outcome objects behind settings.stop_disposition_ids.

timezone
string | null
window_source
enum<string>

Where settings.calling_window came from — the workspace calling hours, or the fixed suggestion when the workspace has none.

Available options:
workspace_hours,
suggested
company_id
string<uuid>