Mailshake Push API
Push (webhook) subscriptions. Also served under /push-subscriptions/.
Push (webhook) subscriptions. Also served under /push-subscriptions/.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mailshake-com:mailshake-com-push-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Mailshake Push API
version: '2017-04-01'
description: The Mailshake API lets your software and AI assistants work with your Mailshake campaigns, recipients, leads, activity and sending mailboxes. Every operation answers any HTTP method; reads are documented as GET and writes as POST (campaigns/readiness-check, a read that takes a JSON body, is documented as POST). Parameters may be sent in the query string, as a JSON body, or as a form-encoded body. Every response body is JSON. Each call costs the quota units in `x-quota-units` (plus `x-quota-units-per-item` times the item count where set) from your hourly allowance.
servers:
- url: https://api.mailshake.com/2017-04-01
security:
- bearerKey: []
- oauth2: []
- apiKeyQuery: []
- basicKey: []
tags:
- name: Push
description: Push (webhook) subscriptions. Also served under /push-subscriptions/.
paths:
/push/create:
post:
operationId: pushCreate
tags:
- Push
summary: Create a push subscription
description: 'Subscribes `targetUrl` to an event. At most 50 subscriptions per team; the same event + URL + filter cannot be added twice. Answers HTTP 201 on success. Besides webhooks:manage, the token needs the read scope of the event''s data: replies:read for Replied, leads:read for the Lead events, campaigns:read for the others. With `version: 2` (webhooks v2): `events[]` instead of `event`, an https URL only, each event''s read scope is needed (replies:read for reply.*, leads:read for lead.*, senders:read for sender.*, recipients:read for recipient.*, campaigns:read for the others), and the answer includes the signing `secret` once.'
x-aliases:
- /push-subscriptions/create
x-scopes:
- webhooks:manage
x-quota-units: 100
x-mcp: write
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PushCreateRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PushCreateRequest'
responses:
'201':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
description: The subscription was created.
content:
application/json:
schema:
$ref: '#/components/schemas/PushSubscriptionCreated'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/push/delete:
post:
operationId: pushDelete
tags:
- Push
summary: Delete a push subscription
description: Deletes the caller's subscription for `targetUrl` (same client, team and user). An unknown URL also answers 200. With `id`, deletes that subscription of the team (404 if it is not the team's).
x-aliases:
- /push-subscriptions/delete
x-scopes:
- webhooks:manage
x-quota-units: 1
x-mcp: write
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PushDeleteRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PushDeleteRequest'
responses:
'200':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
X-RateLimit-Limit:
$ref: '#/components/headers/XRateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
description: Deleted (or nothing to delete).
content:
application/json:
schema:
$ref: '#/components/schemas/EmptyObject'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/push/list:
get:
operationId: pushList
tags:
- Push
summary: List push subscriptions
description: The team's push subscriptions (version 1 and 2), never their secrets.
x-aliases:
- /push-subscriptions/list
x-scopes:
- webhooks:manage
x-quota-units: 2
x-mcp: read
responses:
'200':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: List push subscriptions.
content:
application/json:
schema:
$ref: '#/components/schemas/PushSubscriptionList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/push/get:
get:
operationId: pushGet
tags:
- Push
summary: Get a push subscription
description: One of the team's subscriptions by ID; another team's ID answers 404.
x-aliases:
- /push-subscriptions/get
x-scopes:
- webhooks:manage
x-quota-units: 1
x-mcp: read
parameters:
- name: id
in: query
required: true
schema:
type: integer
responses:
'200':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Get a push subscription.
content:
application/json:
schema:
$ref: '#/components/schemas/PushSubscription'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/push/test:
post:
operationId: pushTest
tags:
- Push
summary: Send a test event
description: Sends one signed test.ping event to a version 2 subscription now and records the delivery.
x-aliases:
- /push-subscriptions/test
x-scopes:
- webhooks:manage
x-quota-units: 10
x-mcp: write
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PushIdRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PushIdRequest'
responses:
'200':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Send a test event.
content:
application/json:
schema:
$ref: '#/components/schemas/PushTestResult'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/push/rotate-secret:
post:
operationId: pushRotateSecret
tags:
- Push
summary: Rotate the signing secret
description: Creates a new signing secret for a version 2 subscription, shown once; the old one stays valid for 24 hours.
x-aliases:
- /push-subscriptions/rotate-secret
x-scopes:
- webhooks:manage
x-quota-units: 10
x-mcp: none
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PushIdRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PushIdRequest'
responses:
'200':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Rotate the signing secret.
content:
application/json:
schema:
$ref: '#/components/schemas/PushSecret'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/push/deliveries:
get:
operationId: pushDeliveries
tags:
- Push
summary: List deliveries
description: The latest 100 delivery attempts of one of the team's subscriptions, newest first.
x-aliases:
- /push-subscriptions/deliveries
x-scopes:
- webhooks:manage
x-quota-units: 2
x-mcp: read
parameters:
- name: id
in: query
required: true
schema:
type: integer
responses:
'200':
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: List deliveries.
content:
application/json:
schema:
$ref: '#/components/schemas/PushDeliveryList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
components:
schemas:
PushIdRequest:
type: object
additionalProperties: true
required:
- id
properties:
id:
type: integer
Error:
type: object
additionalProperties: true
required:
- code
- error
- time
properties:
code:
type: string
description: Error code. Friendly errors thrown without a code report `unspecified_error`.
enum:
- missing_parameter
- invalid_argument
- missing_dependent_data
- not_found
- not_authorized
- missing_scope
- invalid_api_key
- missing_team_admin
- exceeds_monthly_recipients
- limit_reached
- unspecified_error
- internal_error
- export-failed
- client_not_found
- app_not_approved
- app_not_enabled
- user_not_admin
- user_is_disabled
- team_blocked
- missing_subscription
- expired_subscription
- sender_already_exists
- sender_limit_reached
- smtp_connection_failed
- imap_connection_failed
- already-connected
- invalid_request
- invalid_client
- invalid_grant
- invalid_scope
- invalid_token
- insufficient_scope
- unauthorized_client
- unauthorized_request
- unsupported_grant_type
- unsupported_response_type
- access_denied
- server_error
- unsupported_operation
- already_exists
- too_many_push_subscriptions
- invalid_state
- sending_paused
- idempotency_conflict
- rate_limited
- confirmation_required
error:
type: string
description: Human-readable message.
time:
type: string
format: date-time
integrationID:
type: integer
description: Only on sender_already_exists, the existing sender's integration.
data:
type: object
additionalProperties: true
description: Structured detail for some errors (for example the conflicting object). Present only when the error has public detail.
requestId:
type: string
description: ID of this request, also sent as the X-Request-Id header. Quote it to support.
PushDeliveryList:
type: object
additionalProperties: true
required:
- results
properties:
results:
type: array
items:
type: object
additionalProperties: true
properties:
object:
const: push-delivery
deliveryID:
type: string
eventID:
type: string
eventType:
type: string
attempt:
type: integer
httpStatus:
type:
- integer
- 'null'
durationMs:
type:
- integer
- 'null'
error:
type:
- string
- 'null'
isTest:
type: boolean
created:
type:
- string
- 'null'
PushTestResult:
type: object
additionalProperties: true
properties:
delivered:
type: boolean
httpStatus:
type:
- integer
- 'null'
error:
type:
- string
- 'null'
eventID:
type: string
deliveryID:
type: string
PushSubscriptionCreated:
type: object
additionalProperties: true
required:
- id
properties:
id:
type: integer
secret:
type: string
description: Version 2 only, shown once. Verifies the Mailshake-Signature header.
PushCreateRequest:
type: object
additionalProperties: true
anyOf:
- required:
- targetUrl
- required:
- target_url
properties:
version:
type: integer
enum:
- 1
- 2
description: 2 for webhooks v2 (signed, several events per subscription). Default 1.
events:
type: array
description: Version 2 only. The events to receive.
items:
type: string
enum:
- email.sent
- email.opened
- link.clicked
- reply.received
- email.bounced
- reply.out_of_office
- recipient.unsubscribed
- lead.created
- lead.status_changed
- lead.assigned
- sender.quota_hit
- task.created
- task.completed
- call.completed
- sender.needs_reauth
- campaign.paused
- campaign.resumed
- sender.auto_action
targetUrl:
type: string
format: uri
description: http or https URL (https only for version 2); `target_url` is accepted too.
target_url:
type: string
format: uri
event:
type: string
description: Version 1 only (required there).
enum:
- Clicked
- Opened
- Replied
- MessageSent
- LeadCreated
- LeadStatusChanged
filter:
type: object
additionalProperties: true
properties:
campaignID:
type: integer
campaignMessageID:
type: integer
excludeDuplicates:
type: boolean
matchUrl:
type: string
messageType:
type: string
PushDeleteRequest:
type: object
additionalProperties: true
anyOf:
- required:
- targetUrl
- required:
- target_url
- required:
- id
properties:
id:
type: integer
description: Delete one subscription of the team by ID (another team's ID answers 404).
targetUrl:
type: string
format: uri
target_url:
type: string
format: uri
PushSubscription:
type: object
additionalProperties: true
required:
- object
- id
- version
- targetUrl
properties:
object:
const: push-subscription
id:
type: integer
version:
type: integer
targetUrl:
type: string
event:
type:
- string
- 'null'
events:
type:
- array
- 'null'
items:
type: string
filter:
type:
- object
- 'null'
additionalProperties: true
disabled:
type: boolean
disabledAt:
type:
- string
- 'null'
consecutiveFailures:
type: integer
created:
type:
- string
- 'null'
EmptyObject:
type: object
additionalProperties: true
description: An empty JSON object `{}`.
PushSubscriptionList:
type: object
additionalProperties: true
required:
- results
properties:
results:
type: array
items:
$ref: '#/components/schemas/PushSubscription'
PushSecret:
type: object
additionalProperties: true
required:
- id
- secret
properties:
id:
type: integer
secret:
type: string
previousSecretValidUntil:
type: string
responses:
TooManyRequests:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
Retry-After:
$ref: '#/components/headers/RetryAfter'
X-RateLimit-Remaining:
$ref: '#/components/headers/XRateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/XRateLimitReset'
description: 'Too many requests. limit_reached: the hourly quota is spent. rate_limited: more than the per-second velocity limit (25 requests per second per key by default, when enforced). Retry after `Retry-After` seconds.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
InternalError:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Unexpected error (internal_error).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Object not found (not_found).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Account or client state refuses the call (user_not_admin, user_is_disabled, team_blocked, app_not_approved, app_not_enabled, client_not_found, missing_subscription, expired_subscription), or sender_limit_reached on senders/add-smtp-imap.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Validation or friendly error (e.g. missing_parameter, invalid_argument, missing_dependent_data, not_authorized, exceeds_monthly_recipients, OAuth2 request errors).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: Missing or invalid credentials, or missing OAuth2 scope (invalid_api_key, missing_team_admin, missing_scope, invalid_token, unauthorized_request).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Conflict:
headers:
X-Request-Id:
$ref: '#/components/headers/XRequestId'
description: 'Conflict. idempotency_conflict: the Idempotency-Key was already used with a different request, or that request is still in progress. sender_already_exists (senders/add-smtp-imap): the mail account is already connected; the body includes its integrationID.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
XRateLimitRemaining:
description: Approximate quota units left in this hour. Units are charged after each response, so this call's own cost is not yet included.
schema:
type: integer
XRateLimitReset:
description: Unix time (seconds) when the hourly quota window resets.
schema:
type: integer
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
XRequestId:
description: ID of this request. Quote it to support.
schema:
type: string
XRateLimitLimit:
description: Quota units per hour for this API client.
schema:
type: integer
parameters:
IdempotencyKey:
name: Idempotency-Key
in: header
required: false
description: 'Optional on every write: 1 to 64 printable characters, unique per intended action. Retrying with the same key and the same request returns the first response (header `Idempotent-Replayed: true`) instead of acting twice. The same key with a different request is 409 `idempotency_conflict`. Keys are kept 24 hours; a 5xx answer is not kept, so a failed request can be retried with the same key.'
schema:
type: string
minLength: 1
maxLength: 64
securitySchemes:
bearerKey:
type: http
scheme: bearer
description: 'Recommended. `Authorization: Bearer <api key>`. The same header also takes an OAuth access token: a value that is not an API key is checked as an OAuth token.'
apiKeyQuery:
type: apiKey
in: query
name: apiKey
description: Deprecated (still works). The team's API key as the `apiKey` query or body parameter. Use bearerKey.
basicKey:
type: http
scheme: basic
description: Deprecated (still works). The API key as the basic-auth username, with an empty password (`-u key:`). Use bearerKey.
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://app.mailshake.com/oauth/
tokenUrl: https://api.mailshake.com/2017-04-01/token
refreshUrl: https://api.mailshake.com/2017-04-01/token
scopes:
campaigns:read: Read campaigns, their activity (sent, opens, clicks) and exports.
campaigns:write: Create, pause and resume campaigns.
recipients:read: Read recipients.
recipients:write: Add, pause, resume and unsubscribe recipients.
leads:read: Read leads and lead activity.
leads:write: Create, close, ignore and reopen leads.
senders:read: Read sending mailboxes.
senders:write: Add, update and remove sending mailboxes.
stats:read: Read campaign and mailbox statistics.
replies:read: Read replies.
replies:send: Send email replies on your behalf. Never implied by campaign-write.
webhooks:manage: Create and delete webhook (push) subscriptions.
team:read: Read team members and team info.
datafinder:spend: Spend Data Finder credits. Never implied by campaign-write.
campaign-read: Legacy. Grants every `:read` scope.
campaign-write: Legacy. Grants every `:write` scope and webhooks:manage, but not replies:send or datafinder:spend.
x-any-method: true