{"openapi":"3.0.3","info":{"title":"Review Rover API","version":"v1","description":"The Review Rover public API. Authenticate every request with a bearer token.\n\n## Tokens and scopes\n\nCreate an API token (`rr_live_...`) in the Review Rover app under **Settings > Integrations >\nAPI Token Management**. Each token carries one or more scopes:\n\n- `read`: `GET` requests.\n- `write`: requests that create, change or delete data.\n- `send`: requests that contact a customer or publish to Google (for example enrolling a\n  contact in a campaign, sending an instant message, or publishing a review reply).\n\nEach operation lists the scope it requires under `x-required-scopes`. A token without that\nscope gets `403` with `code: insufficient_scope`. A token bound to one account gets `403` with\n`code: account_mismatch` when called with another account's `account_id`.\n\nOAuth access tokens and session JWTs issued to the Review Rover apps are also accepted.\n\n## Compatibility\n\nResponses may gain new fields at any time. Ignore fields you don't recognize. Removing or\nrenaming a field, or changing its type, is a breaking change and is announced in the changelog.\n","contact":{"name":"Review Rover support","url":"https://reviewrover.co/contact"},"license":{"name":"Proprietary","url":"https://reviewrover.co/terms"}},"servers":[{"url":"https://api.reviewrover.co/api/v1","description":"Production"},{"url":"https://dashboard.reviewrover.co/api/v1","description":"Production (legacy host)"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Auth","description":"Sign in with an email and password to get an API token."},{"name":"Me","description":"The authenticated user."},{"name":"Accounts","description":"The accounts a token can act on."},{"name":"Contacts","description":"People you ask for reviews."},{"name":"Reviews","description":"Reviews your locations received."},{"name":"Review replies","description":"Replies to reviews, published to Google."},{"name":"Metrics","description":"Review activity summaries."},{"name":"Campaigns","description":"Automated review request sequences."},{"name":"Campaign Steps","description":"The messages a campaign sends, in order."},{"name":"Enrollments","description":"Contacts going through a campaign."},{"name":"Instant Messages","description":"One-off review requests sent right away."},{"name":"Webhook Subscriptions","description":"URLs that Review Rover notifies when events happen."},{"name":"Invoices","description":"Invoices from your system, recorded as events on contacts."},{"name":"Payments","description":"Payments from your system, recorded as events on contacts."},{"name":"Visits","description":"Jobs and appointments from your system, recorded as events on contacts."},{"name":"Communications","description":"Review request emails and text messages sent to contacts."},{"name":"Feedbacks","description":"Private feedback contacts left instead of a public review."},{"name":"Meta","description":"The API contract itself."}],"paths":{"/auth":{"post":{"operationId":"create_auth_token","summary":"Sign in and get an API token","description":"Exchanges an email and password (plus a one-time code when two-factor authentication is on)\nfor an API token. No token is needed to call it. Each call rotates the token, so the token from\nthe previous sign-in stops working. Hotwire Native apps get a session cookie and an empty body\ninstead.\n","tags":["Auth"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"jane@example.com"},"password":{"type":"string","format":"password","example":"correct-horse-battery-staple"},"otp_attempt":{"type":"string","description":"The current two-factor code. Required when two-factor authentication is on.","example":"123456"}}}}}},"responses":{"200":{"description":"Signed in. Returns the token, or an empty object for Hotwire Native apps (which get a\nsession cookie instead).\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"An unbound API token with every scope and no expiry. Shown only in this\nresponse; store it securely.\n","example":"rr_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAM"}}},{"type":"object","maxProperties":0}]}}}},"401":{"description":"The email or password is wrong, or the two-factor code is incorrect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Two-factor authentication is on and `otp_attempt` is missing (`error` is `otp_attempt_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_auth_token","summary":"Sign out a Hotwire Native session","description":"Signs out the session cookie set by `POST /auth` for Hotwire Native apps, and removes the given\npush notification token. Bearer tokens aren't used or revoked by this call.\n","tags":["Auth"],"security":[],"x-required-scopes":[],"parameters":[{"name":"notification_token","in":"query","description":"A push notification token to remove from the signed-in user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Signed out.","content":{"application/json":{"schema":{"type":"object","maxProperties":0}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/me":{"get":{"operationId":"get_me","summary":"Get the current user","description":"Returns the user the token belongs to and the name of the current account.","tags":["Me"],"x-required-scopes":["read"],"responses":{"200":{"description":"The current user.","content":{"application/json":{"schema":{"type":"object","required":["id","name","account_name"],"properties":{"id":{"type":"integer","example":42},"name":{"type":"string","example":"Jane Smith"},"account_name":{"type":"string","nullable":true,"example":"Smith Dental"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/accounts":{"get":{"operationId":"list_accounts","summary":"List accounts","description":"Lists the accounts the token can act on: every account the user belongs to, or only the bound\naccount for a bound token. Requires the `read` scope.\n","tags":["Accounts"],"x-required-scopes":["read"],"responses":{"200":{"description":"The accounts.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts":{"get":{"operationId":"list_contacts","summary":"List contacts","description":"Lists the account's contacts, newest first, 20 per page by default. Requires the `read` scope.","tags":["Contacts"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/ContactsLimit"},{"name":"email","in":"query","description":"Only return the contact with this exact email address.","schema":{"type":"string"},"example":"jane@example.com"}],"responses":{"200":{"description":"A page of contacts. A page past the end returns the last page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_contact","summary":"Create a contact","description":"Creates a contact. New contacts are enrolled in the account's active campaign, which can send\nthem review requests, so this requires the `send` scope.\n","tags":["Contacts"],"x-required-scopes":["send"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}},"responses":{"201":{"description":"The new contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation failed, for example the email or phone is already used by another contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The contact's prefixed ID (`cont_...`).","schema":{"type":"string"},"example":"cont_8f3k2Lq9xZ7w"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_contact","summary":"Get a contact","description":"Returns one contact. Requires the `read` scope.","tags":["Contacts"],"x-required-scopes":["read"],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_contact","summary":"Update a contact","description":"Updates the fields you send and leaves the rest unchanged. Requires the `write` scope.","tags":["Contacts"],"x-required-scopes":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}},"responses":{"200":{"description":"The updated contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example the email or phone is already used by another contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_contact","summary":"Delete a contact","description":"Permanently deletes a contact and its enrollments and communication history. Requires the `write` scope.","tags":["Contacts"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reviews":{"get":{"operationId":"list_reviews","summary":"List reviews","description":"Lists the account's reviews, newest first. Requires the `read` scope.","tags":["Reviews"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"rating","in":"query","description":"Only return reviews with this star rating.","schema":{"type":"integer","minimum":0,"maximum":5},"example":5},{"name":"reply_status","in":"query","description":"Only return reviews that have (`replied`) or don't have (`awaiting_reply`) a reply.","schema":{"type":"string","enum":["replied","awaiting_reply"]}}],"responses":{"200":{"description":"A page of reviews.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reviews/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The review's prefixed ID (`rev_...`).","schema":{"type":"string"},"example":"rev_Tq7mW2xK9bLp"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_review","summary":"Get a review","description":"Returns one review with its reply and matched contact. Requires the `read` scope.","tags":["Reviews"],"x-required-scopes":["read"],"responses":{"200":{"description":"The review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reviews/{review_id}/reply":{"parameters":[{"$ref":"#/components/parameters/ReviewId"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_review_reply","summary":"Get a review's reply","description":"Returns the reply to a review. Requires the `read` scope.","tags":["Review replies"],"x-required-scopes":["read"],"responses":{"200":{"description":"The reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReply"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The review doesn't exist, or it has no reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_review_reply","summary":"Reply to a review","description":"Publishes a reply to the review on Google, then stores it. Uses the review's own Google\nBusiness Profile location, or the account's only Google connection. Requires the `send` scope.\n","tags":["Review replies"],"x-required-scopes":["send"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReplyInput"}}}},"responses":{"201":{"description":"The reply was published and stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReply"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ReplyUnprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ReplyGoogleError"}}},"patch":{"operationId":"update_review_reply","summary":"Replace a review's reply","description":"Republishes the reply on Google with new text and replaces the stored reply. Omit `comment` to\nrepublish the current text. Requires the `send` scope.\n","tags":["Review replies"],"x-required-scopes":["send"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReplyInput"}}}},"responses":{"200":{"description":"The reply was republished and stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReply"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The review doesn't exist, or it has no reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"$ref":"#/components/responses/ReplyUnprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"$ref":"#/components/responses/ReplyGoogleError"}}},"delete":{"operationId":"delete_review_reply","summary":"Delete a review's stored reply","description":"Deletes the stored reply. The reply stays published on Google. Requires the `write` scope.\n","tags":["Review replies"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The review doesn't exist, or it has no reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reviews/{review_id}/reply/generate":{"parameters":[{"$ref":"#/components/parameters/ReviewId"},{"$ref":"#/components/parameters/AccountId"}],"post":{"operationId":"generate_review_reply","summary":"Draft a reply with AI","description":"Drafts a reply to the review with AI. Nothing is published or stored. Requires the `write`\nscope.\n","tags":["Review replies"],"x-required-scopes":["write"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tone":{"type":"string","description":"The tone of the draft.","default":"casual","example":"professional"}}}}}},"responses":{"200":{"description":"The draft reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedReply"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"The draft couldn't be generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/metrics/unreplied_reviews":{"parameters":[{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_unreplied_reviews","summary":"Get unreplied reviews","description":"Returns how many reviews have no reply, with the 50 most recent of them. Requires the `read`\nscope.\n","tags":["Metrics"],"x-required-scopes":["read"],"responses":{"200":{"description":"Unreplied review summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnrepliedReviews"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/metrics/review_velocity":{"parameters":[{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_review_velocity","summary":"Get review velocity","description":"Returns the number of reviews and their average rating over the last 7 and 30 days. Requires\nthe `read` scope.\n","tags":["Metrics"],"x-required-scopes":["read"],"responses":{"200":{"description":"Review velocity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewVelocity"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns":{"get":{"operationId":"list_campaigns","summary":"List campaigns","description":"Lists the account's campaigns with their steps, newest first. Not paginated. Requires the `read` scope.","tags":["Campaigns"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"responses":{"200":{"description":"Every campaign on the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_campaign","summary":"Create a campaign","description":"Creates a campaign with no steps. Requires the `write` scope, or the `send` scope when the\nrequest sets `active: true`.\n","tags":["Campaigns"],"x-required-scopes":["write"],"x-conditional-scopes":{"send":"when the request sets `active: true`"},"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignInput"}}}},"responses":{"201":{"description":"The new campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation failed, for example `minimum_star_rating` isn't 4 or 5.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The campaign's prefixed ID (`camp_...`).","schema":{"type":"string"},"example":"camp_Lm3nP8qR2sTv"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_campaign","summary":"Get a campaign","description":"Returns one campaign with its steps. Requires the `read` scope.","tags":["Campaigns"],"x-required-scopes":["read"],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_campaign","summary":"Update a campaign","description":"Updates the fields you send and leaves the rest unchanged. Setting `active: true` on an\ninactive campaign activates it and enrolls the account's eligible contacts, which needs an\nactive subscription. Requires the `write` scope, or the `send` scope when the request sets\n`active: true`.\n","tags":["Campaigns"],"x-required-scopes":["write"],"x-conditional-scopes":{"send":"when the request sets `active: true`"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignInput"}}}},"responses":{"200":{"description":"The updated campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example `minimum_star_rating` isn't 4 or 5.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_campaign","summary":"Delete a campaign","description":"Permanently deletes a campaign with its steps and enrollments. Requires the `write` scope.","tags":["Campaigns"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns/{campaign_id}/steps":{"parameters":[{"$ref":"#/components/parameters/CampaignId"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"list_campaign_steps","summary":"List a campaign's steps","description":"Lists the campaign's steps in send order, with their message templates. Not paginated. Requires the `read` scope.","tags":["Campaign Steps"],"x-required-scopes":["read"],"responses":{"200":{"description":"Every step of the campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStepList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_campaign_step","summary":"Add a step to a campaign","description":"Creates a message template and a step that sends it. The step is appended to the campaign\nunless `insert_after_order` is set. Requires the `write` scope.\n","tags":["Campaign Steps"],"x-required-scopes":["write"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStepCreateInput"}}}},"responses":{"201":{"description":"The new step.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStep"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example a negative `delay_in_minutes` or a template syntax error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns/{campaign_id}/steps/{id}":{"parameters":[{"$ref":"#/components/parameters/CampaignId"},{"name":"id","in":"path","required":true,"description":"The step's numeric ID.","schema":{"type":"integer"},"example":2048},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_campaign_step","summary":"Get a campaign step","description":"Returns one step with its message template. Requires the `read` scope.","tags":["Campaign Steps"],"x-required-scopes":["read"],"responses":{"200":{"description":"The step.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStep"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_campaign_step","summary":"Update a campaign step","description":"Updates the step's position, delay or active flag. The message template can't be changed\nhere. Requires the `write` scope.\n","tags":["Campaign Steps"],"x-required-scopes":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStepUpdateInput"}}}},"responses":{"200":{"description":"The updated step.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStep"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example a negative `delay_in_minutes` or an `order` another step already has.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_campaign_step","summary":"Delete a campaign step","description":"Deletes the step. Later steps keep their `order`. Requires the `write` scope.","tags":["Campaign Steps"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/enrollments":{"get":{"operationId":"list_enrollments","summary":"List enrollments","description":"Lists the account's campaign enrollments, newest first, 25 per page by default. Requires the `read` scope.","tags":["Enrollments"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"campaign_id","in":"query","description":"Only return enrollments in this campaign, by prefixed ID (`camp_...`) or numeric ID.","schema":{"type":"string"},"example":"camp_Lm3nP8qR2sTv"},{"name":"contact_id","in":"query","description":"Only return enrollments of this contact, by prefixed ID (`cont_...`) or numeric ID.","schema":{"type":"string"},"example":"cont_8f3k2Lq9xZ7w"},{"name":"completed","in":"query","description":"Only return completed (`true`) or in-progress (`false`) enrollments.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page of enrollments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_enrollment","summary":"Enroll a contact in a campaign","description":"Enrolls a contact in an active campaign, which schedules the campaign's review requests to\nthe contact. Needs an active subscription. Requires the `send` scope.\n","tags":["Enrollments"],"x-required-scopes":["send"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentInput"}}}},"responses":{"201":{"description":"The new enrollment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Enrollment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The campaign or the contact doesn't exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"The contact wasn't enrolled. Refusals carry a `code`:\n\n- `campaign_inactive`: the campaign isn't active.\n- `already_enrolled`: the contact is already enrolled in this campaign.\n- `noreview`: the contact is tagged `noreview`.\n\nOther validation failures return `errors`.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CodedError"},{"$ref":"#/components/schemas/ErrorsList"}]}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/enrollments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The enrollment's numeric ID.","schema":{"type":"integer"},"example":4096},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_enrollment","summary":"Get an enrollment","description":"Returns one enrollment. Requires the `read` scope.","tags":["Enrollments"],"x-required-scopes":["read"],"responses":{"200":{"description":"The enrollment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Enrollment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_enrollment","summary":"Delete an enrollment","description":"Deletes the enrollment and its communications, which stops any review requests not yet sent.\nRequires the `write` scope.\n","tags":["Enrollments"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/instant_messages":{"post":{"operationId":"create_instant_message","summary":"Send an instant review request","description":"Sends a review request to one contact right away, using the email and SMS templates of the\naccount's active campaign. Finds or creates the contact when you pass `email` or `phone`.\nAccounts without a subscription can send a limited number of instant messages. Requires the\n`send` scope.\n","tags":["Instant Messages"],"x-required-scopes":["send"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantMessageInput"}}}},"responses":{"201":{"description":"The messages were queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"The token lacks the `send` scope or is bound to another account (`code` is\n`insufficient_scope` or `account_mismatch`), or the account reached its free instant\nmessage limit (`limit_reached: true`).\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CodedError"},{"$ref":"#/components/schemas/InstantMessageLimitError"}]}}}},"404":{"description":"No contact has this `contact_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"None of `contact_id`, `email` or `phone` was given (`error`), or the message couldn't be\nsent, for example the active campaign has no template for a requested channel or the new\ncontact is invalid (`errors`).\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorMessage"},{"$ref":"#/components/schemas/ErrorsList"}]}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook_subscriptions":{"get":{"operationId":"list_webhook_subscriptions","summary":"List webhook subscriptions","description":"Lists the account's webhook subscriptions, newest first. Not paginated. Requires the `read` scope.","tags":["Webhook Subscriptions"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"responses":{"200":{"description":"Every webhook subscription on the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_webhook_subscription","summary":"Create a webhook subscription","description":"Subscribes a URL to events. Review Rover sends a `POST` to the URL when a subscribed event\nhappens. The response includes the signing secret, which is shown only once. Requires the\n`write` scope.\n","tags":["Webhook Subscriptions"],"x-required-scopes":["write"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookSubscriptionInput"}],"required":["url","event_types"]}}}},"responses":{"201":{"description":"The new subscription, including its signing secret. The secret is shown only here.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionWithSecret"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation failed, for example the URL isn't `https`, doesn't resolve to a public address,\nor an event type isn't supported.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook_subscriptions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The subscription's numeric ID.","schema":{"type":"integer"},"example":64},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_webhook_subscription","summary":"Get a webhook subscription","description":"Returns one webhook subscription. Requires the `read` scope.","tags":["Webhook Subscriptions"],"x-required-scopes":["read"],"responses":{"200":{"description":"The subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_webhook_subscription","summary":"Update a webhook subscription","description":"Updates the fields you send and leaves the rest unchanged. Requires the `write` scope.","tags":["Webhook Subscriptions"],"x-required-scopes":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionInput"}}}},"responses":{"200":{"description":"The updated subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example the URL isn't `https` or an event type isn't supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_webhook_subscription","summary":"Delete a webhook subscription","description":"Deletes the subscription. Requires the `write` scope.","tags":["Webhook Subscriptions"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook_subscriptions/{id}/rotate_secret":{"post":{"operationId":"rotate_webhook_subscription_secret","summary":"Rotate a webhook signing secret","description":"Replaces the subscription's signing secret and returns the new one, once. Deliveries are signed\nwith the new secret immediately. Use this to get a secret for subscriptions created before\nsecrets were returned, or if a secret leaks. Requires the `write` scope.\n","tags":["Webhook Subscriptions"],"x-required-scopes":["write"],"parameters":[{"$ref":"#/components/parameters/Id"},{"$ref":"#/components/parameters/AccountId"}],"responses":{"200":{"description":"The subscription with its new signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionWithSecret"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices":{"get":{"operationId":"list_invoices","summary":"List invoices","description":"Lists the account's invoices, newest first, 25 per page by default. Requires the `read` scope.","tags":["Invoices"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"status","in":"query","description":"Only return invoices with this status.","schema":{"type":"string","enum":["unpaid","paid","overdue"]}}],"responses":{"200":{"description":"A page of invoices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_invoice","summary":"Create an invoice","description":"Records an invoice for a contact from your system.\nAlso records an event for the contact, dated `event_date`. Requires the `write` scope.\n","tags":["Invoices"],"x-required-scopes":["write"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInput"}}}},"responses":{"201":{"description":"The new invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The contact doesn't exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation failed, for example a missing or duplicate `external_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The invoice's numeric ID, or your `external_id` for it.","schema":{"type":"string"},"example":"5120"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_invoice","summary":"Get an invoice","description":"Returns one invoice. Requires the `read` scope.","tags":["Invoices"],"x-required-scopes":["read"],"responses":{"200":{"description":"The invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_invoice","summary":"Update an invoice","description":"Updates the fields you send and leaves the rest unchanged. Requires the `write` scope.","tags":["Invoices"],"x-required-scopes":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"description":"The updated invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example a duplicate `external_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_invoice","summary":"Delete an invoice","description":"Deletes the invoice and its event. Requires the `write` scope.","tags":["Invoices"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/payments":{"get":{"operationId":"list_payments","summary":"List payments","description":"Lists the account's payments, newest first, 25 per page by default. Requires the `read` scope.","tags":["Payments"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"status","in":"query","description":"Only return payments with this status.","schema":{"type":"string","enum":["pending","completed","failed"]}}],"responses":{"200":{"description":"A page of payments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_payment","summary":"Create a payment","description":"Records a payment by a contact from your system.\nAlso records an event for the contact, dated `event_date`. Requires the `write` scope.\n","tags":["Payments"],"x-required-scopes":["write"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInput"}}}},"responses":{"201":{"description":"The new payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The contact doesn't exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation failed, for example a missing or duplicate `external_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/payments/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The payment's numeric ID, or your `external_id` for it.","schema":{"type":"string"},"example":"7168"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_payment","summary":"Get a payment","description":"Returns one payment. Requires the `read` scope.","tags":["Payments"],"x-required-scopes":["read"],"responses":{"200":{"description":"The payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_payment","summary":"Update a payment","description":"Updates the fields you send and leaves the rest unchanged. Requires the `write` scope.","tags":["Payments"],"x-required-scopes":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentUpdate"}}}},"responses":{"200":{"description":"The updated payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example a duplicate `external_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_payment","summary":"Delete a payment","description":"Deletes the payment and its event. Requires the `write` scope.","tags":["Payments"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/visits":{"get":{"operationId":"list_visits","summary":"List visits","description":"Lists the account's visits, newest first, 25 per page by default. Requires the `read` scope.","tags":["Visits"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"A page of visits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_visit","summary":"Create a visit","description":"Records a visit (a job or appointment) for a contact from your system.\nAlso records an event for the contact, dated `event_date`. Requires the `write` scope.\n","tags":["Visits"],"x-required-scopes":["write"],"parameters":[{"$ref":"#/components/parameters/AccountId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitInput"}}}},"responses":{"201":{"description":"The new visit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Visit"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The contact doesn't exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation failed, for example a missing or duplicate `external_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/visits/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The visit's numeric ID, or your `external_id` for it.","schema":{"type":"string"},"example":"3072"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_visit","summary":"Get a visit","description":"Returns one visit. Requires the `read` scope.","tags":["Visits"],"x-required-scopes":["read"],"responses":{"200":{"description":"The visit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Visit"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_visit","summary":"Update a visit","description":"Updates the fields you send and leaves the rest unchanged. Requires the `write` scope.","tags":["Visits"],"x-required-scopes":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitUpdate"}}}},"responses":{"200":{"description":"The updated visit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Visit"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Validation failed, for example a duplicate `external_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorsList"}}}},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_visit","summary":"Delete a visit","description":"Deletes the visit and its event. Requires the `write` scope.","tags":["Visits"],"x-required-scopes":["write"],"responses":{"204":{"description":"Deleted."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/communications":{"get":{"operationId":"list_communications","summary":"List communications","description":"Lists the review request emails and text messages sent, or scheduled, to the account's\ncontacts, newest first, 25 per page by default. Requires the `read` scope.\n","tags":["Communications"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"},{"name":"type","in":"query","description":"Only return messages of this type.","schema":{"type":"string","enum":["email","sms"]}},{"name":"sent","in":"query","description":"Pass `true` to only return messages that have been sent. Any other value is ignored.","schema":{"type":"boolean"}},{"name":"manual","in":"query","description":"Only return manual messages (`true`) or campaign messages (`false`).","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page of communications.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/communications/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The communication's numeric ID.","schema":{"type":"integer"},"example":8192},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_communication","summary":"Get a communication","description":"Returns one review request email or text message. Requires the `read` scope.","tags":["Communications"],"x-required-scopes":["read"],"responses":{"200":{"description":"The communication.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Communication"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/feedbacks":{"get":{"operationId":"list_feedbacks","summary":"List feedback","description":"Lists the private feedback contacts left instead of a public review, newest first, 25 per page\nby default. Requires the `read` scope.\n","tags":["Feedbacks"],"x-required-scopes":["read"],"parameters":[{"$ref":"#/components/parameters/AccountId"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"A page of feedback.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/feedbacks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The feedback's prefixed ID (`feedb_...`) or numeric ID.","schema":{"type":"string"},"example":"feedb_Rk5nV8wQ3mZt"},{"$ref":"#/components/parameters/AccountId"}],"get":{"operationId":"get_feedback","summary":"Get feedback","description":"Returns one piece of private feedback. Requires the `read` scope.","tags":["Feedbacks"],"x-required-scopes":["read"],"responses":{"200":{"description":"The feedback.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feedback"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/openapi.json":{"get":{"operationId":"get_openapi_document","summary":"Get the OpenAPI contract","description":"Returns this API's OpenAPI 3.0 document as JSON. No authentication needed. The `ETag` is the\nSHA-256 of the published contract, so you can cache it and send `If-None-Match`.\n","tags":["Meta"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"The OpenAPI document.","headers":{"ETag":{"description":"SHA-256 of the published contract, in quotes.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","description":"An OpenAPI 3.0.3 document."}}}},"304":{"description":"The contract hasn't changed since the `If-None-Match` ETag."},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API token (`rr_live_...`), an OAuth access token, or a session JWT."}},"schemas":{"ErrorMessage":{"type":"object","description":"A single human-readable error message.","required":["error"],"properties":{"error":{"type":"string","example":"Contact not found"}}},"RateLimitError":{"type":"object","required":["error","message","retry_after"],"properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string","example":"Too many requests. Retry later."},"retry_after":{"type":"integer","description":"Seconds until the limit resets.","example":30}}},"OauthError":{"type":"object","description":"Returned when an OAuth access token is invalid for this API.","required":["error"],"properties":{"error":{"type":"string","example":"invalid_token"},"error_description":{"type":"string","example":"The access token is not valid for this API."}}},"CodedError":{"type":"object","description":"An error with a stable machine-readable `code`.","required":["error","code"],"properties":{"error":{"type":"string","example":"This API token doesn't have the 'send' permission required for this request."},"code":{"type":"string","example":"insufficient_scope"},"required_scope":{"type":"string","enum":["read","write","send"],"description":"Present when `code` is `insufficient_scope`."}}},"AccountPrefixId":{"type":"string","description":"An account's prefixed ID.","pattern":"^acct_[A-Za-z0-9]+$","example":"acct_Xb4kQz9mN2pR"},"Account":{"type":"object","required":["id","account_id","name","created_at","updated_at"],"properties":{"id":{"type":"integer","description":"The account's numeric ID. Accepted as `account_id` on other requests.","example":1024},"account_id":{"$ref":"#/components/schemas/AccountPrefixId"},"name":{"type":"string","example":"Smith Dental"},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12.000Z"}}},"ContactPrefixId":{"type":"string","description":"A contact's prefixed ID.","pattern":"^cont_[A-Za-z0-9]+$","example":"cont_8f3k2Lq9xZ7w"},"Contact":{"type":"object","required":["id","account_id","email","first_name","last_name","phone","company","position","tags","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/ContactPrefixId"},"account_id":{"$ref":"#/components/schemas/AccountPrefixId"},"email":{"type":"string","nullable":true,"example":"jane@example.com"},"first_name":{"type":"string","nullable":true,"example":"Jane"},"last_name":{"type":"string","nullable":true,"example":"Doe"},"phone":{"type":"string","nullable":true,"example":"+15555550123"},"company":{"type":"string","nullable":true,"example":"Example Co"},"position":{"type":"string","nullable":true,"example":"Office Manager"},"tags":{"type":"array","items":{"type":"string"},"example":["vip"]},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"ContactList":{"type":"object","required":["has_more","data"],"properties":{"has_more":{"type":"boolean","description":"Whether another page follows this one."},"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}},"ContactInput":{"type":"object","properties":{"email":{"type":"string","nullable":true,"example":"jane@example.com"},"first_name":{"type":"string","nullable":true,"example":"Jane"},"last_name":{"type":"string","nullable":true,"example":"Doe"},"phone":{"type":"string","nullable":true,"example":"+15555550123"},"company":{"type":"string","nullable":true,"example":"Example Co"},"position":{"type":"string","nullable":true,"example":"Office Manager"},"tag_list":{"type":"array","description":"Replaces the contact's tags. Returned as `tags`. Tag a contact `noreview` to keep it out of review campaigns.","items":{"type":"string"},"example":["vip"]}}},"ErrorList":{"type":"object","description":"Validation errors as a list of messages under `error`.","required":["error"],"properties":{"error":{"type":"array","items":{"type":"string"},"example":["Email is invalid"]}}},"ReviewPrefixId":{"type":"string","description":"A review's prefixed ID.","pattern":"^rev_[A-Za-z0-9]+$","example":"rev_Tq7mW2xK9bLp"},"ReviewSummary":{"type":"object","description":"A review as returned in lists.","required":["id","rating","comment","external_id","reviewer_name","contact_id","has_reply","reply_comment","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/ReviewPrefixId"},"rating":{"type":"integer","minimum":0,"maximum":5,"example":5},"comment":{"type":"string","nullable":true,"example":"Friendly staff and quick service."},"external_id":{"type":"string","description":"The review's ID at its source (for example Google).","example":"AbFvOqk9xZ2"},"reviewer_name":{"type":"string","nullable":true,"description":"Name of the matched contact, if any.","example":"Jane Doe"},"contact_id":{"type":"string","nullable":true,"description":"The matched contact's prefixed ID, if any.","example":"cont_8f3k2Lq9xZ7w"},"has_reply":{"type":"boolean"},"reply_comment":{"type":"string","nullable":true,"description":"Text of the reply, if any.","example":"Thanks, Jane!"},"created_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"PageMeta":{"type":"object","description":"Offset pagination metadata.","required":["page","limit","total","total_pages"],"properties":{"page":{"type":"integer","example":1},"limit":{"type":"integer","example":25},"total":{"type":"integer","example":42},"total_pages":{"type":"integer","example":2}}},"ReviewList":{"type":"object","required":["reviews","pagination"],"properties":{"reviews":{"type":"array","items":{"$ref":"#/components/schemas/ReviewSummary"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}},"Review":{"type":"object","description":"A review with its reply and matched contact.","required":["id","rating","comment","external_id","reviewer_name","contact_id","has_reply","review_reply","contact","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/ReviewPrefixId"},"rating":{"type":"integer","minimum":0,"maximum":5,"example":5},"comment":{"type":"string","nullable":true,"example":"Friendly staff and quick service."},"external_id":{"type":"string","description":"The review's ID at its source (for example Google).","example":"AbFvOqk9xZ2"},"reviewer_name":{"type":"string","nullable":true,"example":"Jane Doe"},"contact_id":{"type":"string","nullable":true,"description":"The matched contact's prefixed ID, if any.","example":"cont_8f3k2Lq9xZ7w"},"has_reply":{"type":"boolean"},"review_reply":{"type":"object","nullable":true,"required":["id","comment","replied_at","created_at"],"properties":{"id":{"type":"integer","example":311},"comment":{"type":"string","nullable":true,"example":"Thanks, Jane!"},"replied_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-03-03T08:00:00Z"},"created_at":{"type":"string","format":"date-time","example":"2026-03-03T08:00:01Z"}}},"contact":{"type":"object","nullable":true,"required":["id","name","email","phone"],"properties":{"id":{"$ref":"#/components/schemas/ContactPrefixId"},"name":{"type":"string","nullable":true,"example":"Jane Doe"},"email":{"type":"string","nullable":true,"example":"jane@example.com"},"phone":{"type":"string","nullable":true,"example":"+15555550123"}}},"created_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"ReviewReply":{"type":"object","required":["id","review_id","comment","replied_at","created_at","updated_at"],"properties":{"id":{"type":"integer","example":311},"review_id":{"$ref":"#/components/schemas/ReviewPrefixId"},"comment":{"type":"string","nullable":true,"example":"Thanks for the kind words, Jane!"},"replied_at":{"type":"string","format":"date-time","nullable":true,"description":"When Google recorded the reply.","example":"2026-03-03T08:00:00Z"},"created_at":{"type":"string","format":"date-time","example":"2026-03-03T08:00:01Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-03T08:00:01Z"}}},"ReviewReplyInput":{"type":"object","description":"`body` is accepted as an alias of `comment`; `comment` wins if both are sent. `replied_at` is\nno longer accepted: it's set from Google's response.\n","properties":{"comment":{"type":"string","example":"Thanks for the kind words, Jane!"},"body":{"type":"string","description":"Alias of `comment`.","example":"Thanks for the kind words, Jane!"}}},"ReplyError":{"type":"object","description":"A reply publishing failure with a stable `code`.","required":["error","code"],"properties":{"error":{"type":"string","example":"A reply already exists for this review. Pass overwrite to replace it."},"code":{"type":"string","enum":["reply_exists","gbp_not_linked","gbp_disconnected","google_error"]}}},"ReplyValidationError":{"type":"object","required":["errors","code"],"properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Reply comment cannot be blank"]},"code":{"type":"string","enum":["invalid"]}}},"GeneratedReply":{"type":"object","required":["reply","tone"],"properties":{"reply":{"type":"string","example":"Thank you so much for the kind words, Jane! We look forward to seeing you again."},"tone":{"type":"string","description":"The tone used.","example":"casual"}}},"UnrepliedReviews":{"type":"object","required":["count","reviews","locations"],"properties":{"count":{"type":"integer","description":"Total number of reviews without a reply.","example":3},"reviews":{"type":"array","description":"The 50 most recent reviews without a reply.","maxItems":50,"items":{"type":"object","required":["id","rating","author","snippet","received_at"],"properties":{"id":{"$ref":"#/components/schemas/ReviewPrefixId"},"rating":{"type":"integer","example":2},"author":{"type":"string","description":"The matched contact's name, or `Anonymous`.","example":"Jane Doe"},"snippet":{"type":"string","nullable":true,"description":"The review text, truncated to 120 characters.","example":"Waited 40 minutes past my appointment time..."},"received_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}}},"locations":{"type":"array","description":"One entry per connected Google Business location (or one entry named after the account).\nEach `count` is currently the account-wide unreplied total.\n","items":{"type":"object","required":["name","count"],"properties":{"name":{"type":"string","example":"Smith Dental - Downtown"},"count":{"type":"integer","example":3}}}}}},"VelocityWindow":{"type":"object","required":["count","avg_rating"],"properties":{"count":{"type":"integer","example":12},"avg_rating":{"type":"number","description":"Average rating in the window, rounded to one decimal. `0.0` when there are no reviews.","example":4.6}}},"ReviewVelocity":{"type":"object","required":["last_7_days","last_30_days"],"properties":{"last_7_days":{"$ref":"#/components/schemas/VelocityWindow"},"last_30_days":{"$ref":"#/components/schemas/VelocityWindow"}}},"CampaignPrefixId":{"type":"string","description":"A campaign's prefixed ID.","pattern":"^camp_[A-Za-z0-9]+$","example":"camp_Lm3nP8qR2sTv"},"ReviewRoutingStrategy":{"type":"string","enum":["round_robin","weighted_connected_accounts"],"description":"How enrollments are split across several Google Business Profiles: `round_robin` alternates,\n`weighted_connected_accounts` uses the weights set in the Review Rover app.\n","example":"round_robin"},"TemplateType":{"type":"string","enum":["email","sms"],"example":"email"},"StepTemplateSummary":{"type":"object","required":["id","template_type","subject","call_to_action"],"properties":{"id":{"type":"integer","example":512},"template_type":{"$ref":"#/components/schemas/TemplateType"},"subject":{"type":"string","nullable":true,"example":"How was your visit?"},"call_to_action":{"type":"string","nullable":true,"example":"Leave a review"}}},"CampaignStepSummary":{"type":"object","required":["id","order","delay_in_minutes","active","template","created_at","updated_at"],"properties":{"id":{"type":"integer","example":2048},"order":{"type":"integer","description":"The step's position in the campaign, starting at 1.","example":1},"delay_in_minutes":{"type":"integer","description":"Minutes to wait after the previous step (or enrollment) before sending.","example":1440},"active":{"type":"boolean"},"template":{"type":"object","allOf":[{"$ref":"#/components/schemas/StepTemplateSummary"}],"nullable":true},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"Campaign":{"type":"object","required":["id","name","description","active","minimum_star_rating","feedback_title","thank_you_title","thank_you_body","review_routing_strategy","created_at","updated_at","campaign_steps"],"properties":{"id":{"$ref":"#/components/schemas/CampaignPrefixId"},"name":{"type":"string","nullable":true,"example":"Post-visit follow-up"},"description":{"type":"string","nullable":true,"example":"Asks patients for a review after each visit."},"active":{"type":"boolean","description":"Whether the campaign enrolls contacts and sends review requests."},"minimum_star_rating":{"type":"integer","enum":[4,5],"description":"Ratings at or above this go to Google; lower ratings go to the private feedback page.","example":4},"feedback_title":{"type":"string","nullable":true,"example":"How did we do?"},"thank_you_title":{"type":"string","nullable":true,"example":"Thanks for your feedback"},"thank_you_body":{"type":"string","description":"The thank-you message as plain text. Empty when not set.","example":"We read every response."},"review_routing_strategy":{"$ref":"#/components/schemas/ReviewRoutingStrategy"},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"},"campaign_steps":{"type":"array","description":"The campaign's steps, in send order.","items":{"$ref":"#/components/schemas/CampaignStepSummary"}}}},"CampaignList":{"type":"object","required":["campaigns"],"properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}}}},"CampaignInput":{"type":"object","properties":{"name":{"type":"string","example":"Post-visit follow-up"},"description":{"type":"string","nullable":true,"example":"Asks patients for a review after each visit."},"active":{"type":"boolean","description":"Set `true` to activate the campaign, which needs the `send` scope. On update, activating\nenrolls the account's eligible contacts and needs an active subscription (`402` otherwise).\n"},"minimum_star_rating":{"type":"integer","enum":[4,5],"example":4},"feedback_title":{"type":"string","nullable":true,"example":"How did we do?"},"thank_you_title":{"type":"string","nullable":true,"example":"Thanks for your feedback"},"thank_you_body":{"type":"string","nullable":true,"description":"The thank-you message. Accepts plain text or HTML.","example":"We read every response."},"review_routing_strategy":{"$ref":"#/components/schemas/ReviewRoutingStrategy"}}},"ErrorsList":{"type":"object","description":"Validation errors as a list of messages under `errors`.","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"string"},"example":["Name can't be blank"]}}},"StepTemplate":{"type":"object","required":["id","template_type","subject","body","call_to_action"],"properties":{"id":{"type":"integer","example":512},"template_type":{"$ref":"#/components/schemas/TemplateType"},"subject":{"type":"string","nullable":true,"example":"How was your visit?"},"body":{"type":"string","description":"The message body as plain text.","example":"Hi {{ contact.first_name }}, thanks for visiting us."},"call_to_action":{"type":"string","nullable":true,"example":"Leave a review"}}},"CampaignStep":{"type":"object","required":["id","order","delay_in_minutes","active","campaign_id","template","created_at","updated_at"],"properties":{"id":{"type":"integer","example":2048},"order":{"type":"integer","description":"The step's position in the campaign, starting at 1.","example":1},"delay_in_minutes":{"type":"integer","description":"Minutes to wait after the previous step (or enrollment) before sending.","example":1440},"active":{"type":"boolean"},"campaign_id":{"type":"integer","description":"The campaign's numeric ID.","example":128},"template":{"type":"object","allOf":[{"$ref":"#/components/schemas/StepTemplate"}],"nullable":true},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"CampaignStepList":{"type":"object","required":["campaign_steps"],"properties":{"campaign_steps":{"type":"array","items":{"$ref":"#/components/schemas/CampaignStep"}}}},"CampaignStepCreateInput":{"type":"object","properties":{"template_type":{"type":"string","enum":["email","sms"],"default":"email"},"subject":{"type":"string","example":"How was your visit?"},"body":{"type":"string","example":"Hi {{ contact.first_name }}, thanks for visiting us."},"call_to_action":{"type":"string","example":"Leave a review"},"delay_in_minutes":{"type":"integer","minimum":0,"default":0,"example":1440},"active":{"type":"boolean","default":true},"insert_after_order":{"type":"integer","description":"Insert the step after the step with this `order`, shifting later steps down. Omit to append.","example":1}}},"CampaignStepUpdateInput":{"type":"object","properties":{"order":{"type":"integer","minimum":1,"description":"Must be unique within the campaign.","example":2},"delay_in_minutes":{"type":"integer","minimum":0,"example":2880},"active":{"type":"boolean"}}},"Enrollment":{"type":"object","required":["id","campaign_id","contact_id","enrolled_at","completed","created_at","updated_at"],"properties":{"id":{"type":"integer","example":4096},"campaign_id":{"$ref":"#/components/schemas/CampaignPrefixId"},"contact_id":{"$ref":"#/components/schemas/ContactPrefixId"},"enrolled_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-01-15T09:30:00Z"},"completed":{"type":"boolean","description":"Whether every step of the campaign has run for this contact."},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"EnrollmentList":{"type":"object","required":["enrollments","pagination"],"properties":{"enrollments":{"type":"array","items":{"$ref":"#/components/schemas/Enrollment"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}},"EnrollmentInput":{"type":"object","required":["campaign_id","contact_id"],"properties":{"campaign_id":{"type":"string","description":"The campaign's prefixed ID (`camp_...`). The campaign must be active.","example":"camp_Lm3nP8qR2sTv"},"contact_id":{"type":"string","description":"The contact's prefixed ID (`cont_...`).","example":"cont_8f3k2Lq9xZ7w"}}},"InstantMessageInput":{"type":"object","description":"Identify the contact with `contact_id`, or with `email` or `phone` to find a contact by that\nvalue or create one.\n","properties":{"contact_id":{"type":"string","description":"An existing contact's prefixed ID (`cont_...`).","example":"cont_8f3k2Lq9xZ7w"},"email":{"type":"string","example":"jane@example.com"},"phone":{"type":"string","example":"+15555550123"},"first_name":{"type":"string","description":"Set on the contact when it's found or created by `email` or `phone`.","example":"Jane"},"last_name":{"type":"string","description":"Set on the contact when it's found or created by `email` or `phone`.","example":"Doe"},"send_email":{"type":"boolean","default":false,"description":"Send the active campaign's email template."},"send_sms":{"type":"boolean","default":false,"description":"Send the active campaign's SMS template."}}},"InstantMessage":{"type":"object","required":["contact","sent","usage"],"properties":{"contact":{"type":"object","required":["id","name","email","phone"],"properties":{"id":{"$ref":"#/components/schemas/ContactPrefixId"},"name":{"type":"string","nullable":true,"example":"Jane Doe"},"email":{"type":"string","nullable":true,"example":"jane@example.com"},"phone":{"type":"string","nullable":true,"example":"+15555550123"}}},"sent":{"type":"array","description":"The channels a message was queued on. Empty when neither `send_email` nor `send_sms` is set.","items":{"type":"string","enum":["email","sms"]},"example":["sms"]},"usage":{"type":"object","required":["current","limit","remaining"],"properties":{"current":{"type":"integer","description":"Instant messages sent by the account so far.","example":3},"limit":{"type":"integer","nullable":true,"description":"The free-tier limit. `null` for subscribed accounts.","example":10},"remaining":{"type":"integer","nullable":true,"description":"Messages left on the free tier. `null` for subscribed accounts.","example":7}}}}},"InstantMessageLimitError":{"type":"object","required":["error","limit_reached","current_usage","limit"],"properties":{"error":{"type":"string","example":"You have reached your free instant message limit of 10. Please subscribe for unlimited messaging."},"limit_reached":{"type":"boolean","enum":[true]},"current_usage":{"type":"integer","example":10},"limit":{"type":"integer","example":10}}},"WebhookEventType":{"type":"string","enum":["review.created","enrollment.completed"]},"WebhookSubscription":{"type":"object","required":["id","url","event_types","active","created_at","updated_at"],"properties":{"id":{"type":"integer","example":64},"url":{"type":"string","format":"uri","example":"https://example.com/webhooks/review-rover"},"event_types":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"example":["review.created"]},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"}}},"WebhookSubscriptionList":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}}}},"WebhookSubscriptionInput":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"An `https` URL that resolves to a public internet address.","example":"https://example.com/webhooks/review-rover"},"event_types":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/WebhookEventType"},"example":["review.created"]},"active":{"type":"boolean","default":true}}},"WebhookSubscriptionWithSecret":{"type":"object","description":"A subscription plus its signing secret. The secret is only returned when the subscription is\ncreated and when it's rotated. Store it: it can't be retrieved again.\n","required":["id","url","event_types","active","created_at","updated_at","secret"],"properties":{"id":{"type":"integer","example":64},"url":{"type":"string","format":"uri","example":"https://example.com/webhooks/review-rover"},"event_types":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"example":["review.created"]},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-03-02T14:05:12Z"},"secret":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Signs every delivery. Each request carries `X-ReviewRover-Signature: sha256=<hex>`, the\nHMAC-SHA256 of the raw request body keyed with this secret.\n","example":"3f1c9a0e7b2d4c6e8a1b3d5f7092e4c6a8b0d2f4e6a8c0b2d4f6e8a0c2b4d6f8"}}},"Invoice":{"type":"object","required":["id","external_id","amount","status","date_paid","tags","contact_id","event_date","created_at","updated_at"],"properties":{"id":{"type":"integer","example":5120},"external_id":{"type":"string","description":"Your system's ID for the invoice. Unique within the account.","example":"INV-1001"},"amount":{"type":"string","format":"decimal","description":"The amount as a decimal string, for example `\"200.0\"`.","example":"200.0"},"status":{"type":"string","enum":["unpaid","paid","overdue"]},"date_paid":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-01T16:00:00Z"},"tags":{"type":"array","items":{"type":"string"},"example":["commercial"]},"contact_id":{"description":"The contact the invoice belongs to. Null for invoices without one, such as some synced invoices.","type":"string","allOf":[{"$ref":"#/components/schemas/ContactPrefixId"}],"nullable":true},"event_date":{"type":"string","format":"date-time","nullable":true,"description":"When the invoice happened (the date of its event on the contact).","example":"2026-01-28T09:00:00Z"},"created_at":{"type":"string","format":"date-time","example":"2026-01-28T09:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-02-01T16:00:00Z"}}},"InvoiceList":{"type":"object","required":["invoices","pagination"],"properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}},"InvoiceInput":{"type":"object","required":["contact_id","external_id","amount","status"],"properties":{"contact_id":{"type":"string","description":"The contact's prefixed ID (`cont_...`) or numeric ID.","example":"cont_8f3k2Lq9xZ7w"},"external_id":{"type":"string","description":"Your system's ID for the invoice. Must be unique within the account.","example":"INV-1001"},"amount":{"type":"number","example":200},"status":{"type":"string","enum":["unpaid","paid","overdue"]},"date_paid":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-01T16:00:00Z"},"tags":{"type":"array","items":{"type":"string"},"example":["commercial"]},"event_date":{"type":"string","format":"date-time","description":"When the invoice happened. Defaults to the time it was created.","example":"2026-01-28T09:00:00Z"}}},"InvoiceUpdate":{"type":"object","description":"Send only the fields to change. The invoice's contact can't be changed.","properties":{"external_id":{"type":"string","example":"INV-1001"},"amount":{"type":"number","example":200},"status":{"type":"string","enum":["unpaid","paid","overdue"]},"date_paid":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-01T16:00:00Z"},"tags":{"type":"array","items":{"type":"string"},"example":["commercial"]},"event_date":{"type":"string","format":"date-time","description":"When the invoice happened.","example":"2026-01-28T09:00:00Z"}}},"Payment":{"type":"object","required":["id","external_id","amount","status","tags","contact_id","event_date","created_at","updated_at"],"properties":{"id":{"type":"integer","example":7168},"external_id":{"type":"string","description":"Your system's ID for the payment. Unique within the account.","example":"PAY-2001"},"amount":{"type":"string","format":"decimal","description":"The amount as a decimal string, for example `\"75.0\"`.","example":"75.0"},"status":{"type":"string","enum":["pending","completed","failed"]},"tags":{"type":"array","items":{"type":"string"},"example":["residential"]},"contact_id":{"description":"The contact who paid. Null for payments without one, such as some synced payments.","type":"string","allOf":[{"$ref":"#/components/schemas/ContactPrefixId"}],"nullable":true},"event_date":{"type":"string","format":"date-time","nullable":true,"description":"When the payment happened (the date of its event on the contact).","example":"2026-01-28T09:00:00Z"},"created_at":{"type":"string","format":"date-time","example":"2026-01-28T09:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-01-28T09:00:00Z"}}},"PaymentList":{"type":"object","required":["payments","pagination"],"properties":{"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}},"PaymentInput":{"type":"object","required":["contact_id","external_id","amount","status"],"properties":{"contact_id":{"type":"string","description":"The contact's prefixed ID (`cont_...`) or numeric ID.","example":"cont_8f3k2Lq9xZ7w"},"external_id":{"type":"string","description":"Your system's ID for the payment. Must be unique within the account.","example":"PAY-2001"},"amount":{"type":"number","example":75},"status":{"type":"string","enum":["pending","completed","failed"]},"tags":{"type":"array","items":{"type":"string"},"example":["residential"]},"event_date":{"type":"string","format":"date-time","description":"When the payment happened. Defaults to the time it was created.","example":"2026-01-28T09:00:00Z"}}},"PaymentUpdate":{"type":"object","description":"Send only the fields to change. The payment's contact can't be changed.","properties":{"external_id":{"type":"string","example":"PAY-2001"},"amount":{"type":"number","example":75},"status":{"type":"string","enum":["pending","completed","failed"]},"tags":{"type":"array","items":{"type":"string"},"example":["residential"]},"event_date":{"type":"string","format":"date-time","description":"When the payment happened.","example":"2026-01-28T09:00:00Z"}}},"Visit":{"type":"object","required":["id","external_id","time_scheduled","time_completed","amount_collected","date_cancelled","completed","contact_id","event_date","created_at","updated_at"],"properties":{"id":{"type":"integer","example":3072},"external_id":{"type":"string","description":"Your system's ID for the visit. Unique within the account.","example":"JOB-3001"},"time_scheduled":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-10T14:00:00Z"},"time_completed":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-10T15:30:00Z"},"amount_collected":{"type":"string","format":"decimal","nullable":true,"description":"The amount collected as a decimal string, for example `\"150.0\"`.","example":"150.0"},"date_cancelled":{"type":"string","format":"date-time","nullable":true,"example":null},"completed":{"type":"boolean","description":"Whether `time_completed` is set."},"contact_id":{"description":"The contact visited. Null for visits without one, such as some synced visits.","type":"string","allOf":[{"$ref":"#/components/schemas/ContactPrefixId"}],"nullable":true},"event_date":{"type":"string","format":"date-time","nullable":true,"description":"When the visit happened (the date of its event on the contact).","example":"2026-02-10T14:00:00Z"},"created_at":{"type":"string","format":"date-time","example":"2026-02-01T09:00:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-02-10T15:30:00Z"}}},"VisitList":{"type":"object","required":["visits","pagination"],"properties":{"visits":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}},"VisitInput":{"type":"object","required":["contact_id","external_id"],"properties":{"contact_id":{"type":"string","description":"The contact's prefixed ID (`cont_...`) or numeric ID.","example":"cont_8f3k2Lq9xZ7w"},"external_id":{"type":"string","description":"Your system's ID for the visit. Must be unique within the account.","example":"JOB-3001"},"time_scheduled":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-10T14:00:00Z"},"time_completed":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-10T15:30:00Z"},"amount_collected":{"type":"number","nullable":true,"example":150},"date_cancelled":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-09T08:00:00Z"},"event_date":{"type":"string","format":"date-time","description":"When the visit happened. Defaults to `time_scheduled`, then to the time it was created.","example":"2026-02-10T14:00:00Z"}}},"VisitUpdate":{"type":"object","description":"Send only the fields to change. The visit's contact can't be changed.","properties":{"external_id":{"type":"string","example":"JOB-3001"},"time_scheduled":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-10T14:00:00Z"},"time_completed":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-10T15:30:00Z"},"amount_collected":{"type":"number","nullable":true,"example":150},"date_cancelled":{"type":"string","format":"date-time","nullable":true,"example":"2026-02-09T08:00:00Z"},"event_date":{"type":"string","format":"date-time","description":"When the visit happened.","example":"2026-02-10T14:00:00Z"}}},"Communication":{"type":"object","required":["id","communication_type","sent","sent_at","clicked","manual","contact_id","campaign_id","enrollment_id","created_at","updated_at"],"properties":{"id":{"type":"integer","example":8192},"communication_type":{"type":"string","enum":["email","sms"]},"sent":{"type":"boolean","description":"Whether the message has been sent."},"sent_at":{"type":"string","format":"date-time","nullable":true,"description":"Currently the time the contact clicked the review link, not the send time. Null until the\nlink is clicked.\n","example":"2026-01-16T10:12:00Z"},"clicked":{"type":"boolean","description":"Whether the contact clicked the review link."},"manual":{"type":"boolean","description":"Whether the message was sent by hand (an instant message) rather than by a campaign."},"contact_id":{"type":"string","allOf":[{"$ref":"#/components/schemas/ContactPrefixId"}],"nullable":true},"campaign_id":{"description":"The campaign that sent the message. Null for manual messages.","type":"string","allOf":[{"$ref":"#/components/schemas/CampaignPrefixId"}],"nullable":true},"enrollment_id":{"type":"integer","nullable":true,"description":"The enrollment that sent the message. Null for manual messages.","example":4096},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-01-16T10:12:00Z"}}},"CommunicationList":{"type":"object","required":["communications","pagination"],"properties":{"communications":{"type":"array","items":{"$ref":"#/components/schemas/Communication"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}},"FeedbackPrefixId":{"type":"string","description":"A feedback's prefixed ID.","pattern":"^feedb_[A-Za-z0-9]+$","example":"feedb_Rk5nV8wQ3mZt"},"Feedback":{"type":"object","required":["id","content","contact_id","contact_name","campaign_id","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/FeedbackPrefixId"},"content":{"type":"string","description":"The feedback the contact wrote.","example":"The technician arrived late."},"contact_id":{"type":"string","allOf":[{"$ref":"#/components/schemas/ContactPrefixId"}],"nullable":true},"contact_name":{"type":"string","nullable":true,"example":"Jane Doe"},"campaign_id":{"description":"The campaign whose review request led to the feedback. Null for manual messages.","type":"string","allOf":[{"$ref":"#/components/schemas/CampaignPrefixId"}],"nullable":true},"created_at":{"type":"string","format":"date-time","example":"2026-01-16T10:20:00Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-01-16T10:20:00Z"}}},"FeedbackList":{"type":"object","required":["feedbacks","pagination"],"properties":{"feedbacks":{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}},"pagination":{"$ref":"#/components/schemas/PageMeta"}}}},"responses":{"RateLimited":{"description":"Too many requests from this IP address.","headers":{"Retry-After":{"description":"Seconds until the limit resets.","schema":{"type":"string","pattern":"^[0-9]+$","example":"30"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"Unauthorized":{"description":"The bearer token is missing, invalid, expired or revoked. Some authentication failures return\nan empty body.\n","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorMessage"},{"$ref":"#/components/schemas/OauthError"}]}}}},"Forbidden":{"description":"The token lacks the required scope (`insufficient_scope`), or is bound to a different account\n(`account_mismatch`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodedError"}}}},"NotFound":{"description":"The resource doesn't exist or belongs to another account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ReplyUnprocessable":{"description":"The reply wasn't published. `code` is one of:\n\n- `invalid`: the comment is blank (body is `{errors, code}`).\n- `reply_exists`: the review already has a reply. Use `PATCH` to replace it.\n- `gbp_not_linked`: the review isn't linked to a connected Google Business Profile, or the\n  account has several and the review has none.\n- `gbp_disconnected`: Google access expired or was revoked. Reconnect Google.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReplyError"},{"$ref":"#/components/schemas/ReplyValidationError"}]}}}},"ReplyGoogleError":{"description":"Google returned an error (`code` is `google_error`). Nothing was stored. Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyError"}}}},"PaymentRequired":{"description":"The account's plan doesn't allow this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"parameters":{"AccountId":{"name":"account_id","in":"query","description":"The account to act on, by numeric ID. Only needed for unbound (legacy) tokens on users with\nseveral accounts. A bound token rejects any other account with `403 account_mismatch`; it also\naccepts its own account's prefixed ID.\n","schema":{"type":"string"},"example":"1024"},"Page":{"name":"page","in":"query","description":"Page number, starting at 1.","schema":{"type":"integer","minimum":1,"default":1}},"ContactsLimit":{"name":"limit","in":"query","description":"Contacts per page. Maximum 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},"Limit":{"name":"limit","in":"query","description":"Results per page. Maximum 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"ReviewId":{"name":"review_id","in":"path","required":true,"description":"The review's prefixed ID (`rev_...`).","schema":{"type":"string"},"example":"rev_Tq7mW2xK9bLp"},"CampaignId":{"name":"campaign_id","in":"path","required":true,"description":"The campaign's prefixed ID (`camp_...`).","schema":{"type":"string"},"example":"camp_Lm3nP8qR2sTv"},"Id":{"name":"id","in":"path","required":true,"description":"The resource's prefixed ID.","schema":{"type":"string"}}}}}