Set a job's auto-invite rule
Creates the job's rule or replaces it, and switches it on. By default the rule queues candidates for approval. With mode: invite it invites them itself after holdMinutes; that, a changed wait, a raised cap and any edit to a rule that invites need the auto_invite:manage scope, which only keys created by an admin or owner can hold (auto_invite_admin_required otherwise; the owner's current role is checked on every call). Switching back to queue returns candidates still held to the queue. Changing the criteria raises revision; candidates already queued stay queued. It applies to reports that finish after this call, unless you send applyToExisting as well; that also runs the job's existing finished reports through the rule, and only when this call switches the rule on or loosens it. Preview the effect first with POST /v1/jobs/{id}/auto-invite/preview. Saving the criteria the rule already has changes nothing. A closed job answers job_closed.
Required scope: auto_invite:write.
Errors
- 400:
auto_invite_apply_not_allowed,invalid_content_type,invalid_json,max_credits_required,request_body_too_large,unknown_field - 401:
authentication_required,invalid_api_key - 402:
quote_exceeds_max_credits - 403:
api_access_disabled,auto_invite_admin_required,insufficient_scope - 404:
job_not_found - 409:
job_closed - 422:
invalid_parameter - 429:
rate_limit_exceeded - 500:
api_error - 503:
maintenance_mode,service_unavailable
ApiKeyAuthorizationBearer <probb_live_<id>_<secret>>id*stringThe job's ID.
1 <= length <= 200application/json- body
criteria*The bar a finished report must clear to be queued or invited. All conditions must hold.
mode?stringqueue (the default for a new rule) queues candidates for approval. invite holds them for holdMinutes and then invites them without asking. Switching to invite needs the auto_invite:manage scope on a key created by an admin or owner. Omit to keep the rule's current mode.
"queue""invite"holdMinutes?integerInvite mode: minutes a matching candidate waits before being invited, 0 to 1440 (default 30). Changing it needs auto_invite:manage.
0 <= value <= 1440inviteCap?integerInvite mode: the most automatic invites on this job, 1 to 500 (default 20). Raising it needs auto_invite:manage; lowering it does not.
1 <= value <= 500applyToExisting?booleanAlso run the job's existing finished reports through the rule, as if they had just finished (at most 1,000, the ones newMatches counts in the preview). Allowed only when this save switches the rule on or loosens it (auto_invite_apply_not_allowed otherwise). In queue mode nothing is spent. In invite mode the candidates who clear the bar are held and invited like any other, up to the cap, which spends credits: send maxCredits, at least the preview's applyQuote.credits.
maxCredits?numberWith applyToExisting in invite mode: the most credits applying may cost, at least applyQuote.credits from the preview. Required when the quote is above zero credits (max_credits_required); a lower value fails with quote_exceeds_max_credits and nothing is saved.
0 < value <= 1000000Success.
application/json- response
object*stringjobId*stringThe job the rule belongs to.
enabled*booleanFalse after the rule was switched off. Its criteria are kept; switching it on again with PUT keeps the revision when they are unchanged.
mode*stringqueue: candidates who clear the bar wait for a person to approve them (the default). invite: they are held for holdMinutes and then invited automatically, unless a person cancels, the rule changed or inviteCap is reached.
"queue""invite"holdMinutes*integerInvite mode: how long a matching candidate waits before the invitation goes out and can still be cancelled, 0 to 1440 minutes. If the wait ends outside 09:00 to 18:00 in timeZone, the invitation goes out at 09:00 the next morning.
-9007199254740991 <= value <= 9007199254740991timeZone*stringThe organisation's time zone, an IANA name such as Europe/London (UTC when unset). In invite mode invitations go out between 09:00 and 18:00 in it; a wait that ends at night sends the next morning.
inviteCap*integerInvite mode: the most automatic invites the rule may send on this job, 1 to 500. It counts invites, not credits, so it holds in every billing mode. Past it, matches are queued for approval instead.
-9007199254740991 <= value <= 9007199254740991autoInvitedCount*integerAutomatic invites the rule has sent on this job so far.
-9007199254740991 <= value <= 9007199254740991criteria*description*stringThe rule as one sentence, such as the app shows it.
revision*integerStarts at 1 and goes up each time the criteria change. Every evaluation records the revision it used.
-9007199254740991 <= value <= 9007199254740991queuedCount*integerCandidates waiting for approval on this job.
-9007199254740991 <= value <= 9007199254740991heldCount*integerCandidates held to be invited automatically, whose invitation can still be cancelled.
-9007199254740991 <= value <= 9007199254740991invitedCount*integerQueued candidates who were invited, whoever sent the invitation, across every revision of the rule.
-9007199254740991 <= value <= 9007199254740991dismissedCount*integerQueued candidates a person dismissed, across every revision of the rule.
-9007199254740991 <= value <= 9007199254740991noLongerMatchingCount*integerQueued candidates the rule as it stands would no longer queue, such as after the bar was raised. Nothing is dismissed automatically: each shows matchesCurrentRule: false in the evaluations, and you can dismiss them with POST .../evaluations/dismiss.
-9007199254740991 <= value <= 9007199254740991appliedToExistingCount*|PUT with applyToExisting only: how many of the job's existing reports were sent through the rule. Null otherwise.
stats*updatedAt*stringdate-time# Set PROBB_URL and PROBB_API_KEY. Replace any *_VALUE placeholder and any example ID (such as job_example) with a real one.curl --fail-with-body -X PUT "$PROBB_URL/api/v1/jobs/ID_VALUE/auto-invite" \ -H "Authorization: Bearer $PROBB_API_KEY" \ -H 'Content-Type: application/json' \ --data-binary '{ "criteria": { "minFitScore": 7.5, "mustHaves": "partly_or_better", "whenUnknown": "queue", "excludeIntegrityReview": true }, "mode": "invite", "holdMinutes": 30, "inviteCap": 20}'{ "object": "auto_invite_rule", "jobId": "string", "enabled": true, "mode": "queue", "holdMinutes": -9007199254740991, "timeZone": "string", "inviteCap": -9007199254740991, "autoInvitedCount": -9007199254740991, "criteria": { "minFitScore": 0, "mustHaves": "any", "whenUnknown": "queue", "excludeIntegrityReview": true }, "description": "string", "revision": -9007199254740991, "queuedCount": -9007199254740991, "heldCount": -9007199254740991, "invitedCount": -9007199254740991, "dismissedCount": -9007199254740991, "noLongerMatchingCount": -9007199254740991, "appliedToExistingCount": -9007199254740991, "stats": { "byVersion": [ { "versionId": "string", "label": "string", "evaluated": -9007199254740991, "cleared": -9007199254740991 } ], "people": { "approved": -9007199254740991, "invitedByRule": -9007199254740991, "dismissed": -9007199254740991, "cancelled": -9007199254740991 } }, "updatedAt": "2019-08-24T14:15:22Z"}