Pushary Decisions API

Ask a human, and read what they decided.

GitHub OpenAPI

Operations 7

POST /api/v1/server/decisions Ask a human to approve, deny or answer #
GET /api/v1/server/decisions/{decisionId} Read a decision #
POST /api/v1/server/decisions/{decisionId} Record an answer on a decision #
DELETE /api/v1/server/decisions/{decisionId} Cancel a pending decision #
GET /api/v1/server/reachability Check end-user delivery channels #
GET /api/v1/server/webhook-secret Read the decision webhook secret #
POST /api/v1/server/webhook-secret Rotate the decision webhook secret #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pushary-com:pushary-com-decisions-api"
All apis
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.

Get an API 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 Specification

pushary-com-decisions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pushary Com Decisions API
  version: 1.0.0
  contact:
    name: Pushary
    url: https://pushary.com/docs
    email: business@pushary.com
  termsOfService: https://pushary.com/terms
  description: 'Operations tagged Decisions across 2 of this provider''s published API definitions: pushary-com-openapi.json, pushary-com.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://pushary.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Decisions
  description: Ask a human, and read what they decided.
paths:
  /api/v1/server/decisions:
    post:
      operationId: createDecision
      summary: Ask a human to approve, deny or answer
      description: 'Opens a decision and delivers it to a person: you, your team, or the end-user named by `externalId`. Returns immediately with a `decisionId` to poll, unless `wait` is true, in which case the request is held open until the decision resolves or `timeoutSeconds` passes. Fails closed: an unanswered decision is never an approval.'
      tags:
      - Decisions
      requestBody:
        required: true
        description: The decision to open.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDecision'
      responses:
        '200':
          description: The decision was opened, replayed from an idempotency key, or refused with status stopped.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: The addressed end-user cannot be reached and `requireReachable` was true.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          description: Idempotency or replay storage is unavailable. Honor Retry-After and retry with the same idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/decisions/{decisionId}:
    get:
      operationId: getDecision
      summary: Read a decision
      description: Returns the current state of a decision. Pass a numeric wait in seconds, for example `wait=30`, to long-poll for a resolution. One request waits at most 55 seconds; the decision stays answerable for its full TTL either way.
      tags:
      - Decisions
      parameters:
      - name: decisionId
        in: path
        required: true
        description: The decision id returned by createDecision.
        schema:
          type: string
      - name: wait
        in: query
        required: false
        description: Long-poll budget in seconds. Omit or use 0 for an immediate read.
        schema:
          type: number
          minimum: 0
          maximum: 55
      responses:
        '200':
          description: The decision.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Decision'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: answerDecision
      summary: Record an answer on a decision
      description: Records a human answer server-side, for callers that collect the answer through their own surface instead of the hosted decision page. Needs a full-access key. A bound key gets 403 with code `bound_key_cannot_answer`, and an agent key gets 403.
      tags:
      - Decisions
      parameters:
      - name: decisionId
        in: path
        required: true
        description: The decision id.
        schema:
          type: string
      requestBody:
        required: true
        description: The answer to record.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnswerDecision'
      responses:
        '200':
          description: The answer was recorded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionAnswerResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    delete:
      operationId: cancelDecision
      summary: Cancel a pending decision
      description: Retracts a decision that is no longer needed, so the person is not asked something that has stopped mattering.
      tags:
      - Decisions
      parameters:
      - name: decisionId
        in: path
        required: true
        description: The decision id.
        schema:
          type: string
      responses:
        '200':
          description: The decision was cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelDecisionResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/reachability:
    get:
      operationId: getReachability
      summary: Check end-user delivery channels
      description: Checks whether an end-user can receive a decision before opening one. Requires the Partner plan. A bound key always uses its own recipient; a full key must supply externalId. This read opens no decision.
      tags:
      - Decisions
      parameters:
      - name: externalId
        in: query
        required: false
        description: Required for a full key; a bound key uses its own recipient.
        schema:
          type: string
          maxLength: 256
      responses:
        '200':
          description: Current delivery channels and suggested next step.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReachabilityResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
  /api/v1/server/webhook-secret:
    get:
      operationId: getWebhookSecret
      summary: Read the decision webhook secret
      description: Returns the secret to verify `X-Pushary-Signature` against on decision callbacks. Verify before trusting a callback body.
      tags:
      - Decisions
      responses:
        '200':
          description: The webhook secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSecret'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: rotateWebhookSecret
      summary: Rotate the decision webhook secret
      description: Issues a new webhook secret and invalidates the previous one. Callbacks signed with the old secret stop verifying immediately.
      tags:
      - Decisions
      responses:
        '200':
          description: The new webhook secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSecret'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://pushary.com
      description: Production
components:
  responses:
    RateLimited:
      description: Too many requests. `X-RateLimit-Remaining` and `X-RateLimit-Reset` are on every response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: 'The key is valid but not allowed to do this: wrong scope, wrong plan, or a locked workspace.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request body or parameters were rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource, or no such endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The API key is missing, malformed or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CreateDecision:
      allOf:
      - $ref: '#/components/schemas/DecisionSubject'
      - type: object
        required:
        - question
        properties:
          question:
            type: string
            description: What the person is being asked.
          presentation:
            $ref: '#/components/schemas/ActionPresentation'
          type:
            type: string
            description: How the person answers.
            enum:
            - confirm
            - select
            - input
          options:
            type: array
            items:
              type: string
            description: The choices, for a `select` decision.
          externalId:
            type: string
            description: Your own id for the end-user who should be asked.
          email:
            type: string
            description: Approver's email. With Slack connected, attempts a DM; lookup or DM failure falls back to the configured shared channel.
            format: email
          callbackUrl:
            type: string
            description: Pushary POSTs the resolved decision here, signed with X-Pushary-Signature.
            format: uri
          agentName:
            type: string
            description: Shown to the person so they know which agent is asking.
          context:
            type: string
            description: Free text echoed back after secret redaction on read and on the webhook.
          placeholder:
            type: string
            description: Placeholder text, for an `input` decision.
          expiresInSeconds:
            type: integer
            description: Decision lifetime in seconds. Defaults to 3600; clamped to 60–86400.
          wait:
            type: boolean
            description: Wait for an answer in this request. Defaults to false; does not change the decision lifetime.
          timeoutSeconds:
            type: integer
            description: Wait budget when wait is true. Defaults to 30 seconds; capped at 55.
          idempotencyKey:
            type: string
            description: Stable across retries of one logical decision.
          poweredBy:
            type: boolean
            description: Show Pushary branding on the hosted decision page.
          approvalUrl:
            type: boolean
            description: Request a recipient-bound bearer approval link on a fresh create. Requires externalId. The link expires after 12 hours or decision expiry, whichever is sooner; omitted on idempotent replays.
          sandboxOutcome:
            type: string
            description: Simulated answer for sandbox keys only. Ignored for live keys.
            enum:
            - approve
            - deny
            - no_answer
          requireReachable:
            type: boolean
            description: Refuse with 409 instead of opening a decision the end-user cannot receive, when the externalId has no enrolled device or push subscription.
    CancelDecisionResult:
      type: object
      required:
      - decisionId
      - cancelled
      - status
      properties:
        decisionId:
          type: string
          description: Identifier.
        cancelled:
          type: boolean
          description: True when this call cancelled it.
        status:
          type: string
          description: Lifecycle state after cancelling.
    DecisionSubject:
      type: object
      description: 'What a decision is about. Every field optional: a free-text question alone is a complete decision. Supplying these lets the decision be grouped, risk-classified and matched against a permission rule.'
      properties:
        toolName:
          type: string
          description: The action, e.g. `refund.create` or `database.write`.
        toolTarget:
          type: string
          description: What the action acts on.
        actor:
          type: string
          description: Whose authority the action claims, e.g. `user:u_44`. Not necessarily the approver. Maximum 120 characters.
          maxLength: 120
        environment:
          type: string
          description: Which deployment the action runs against, e.g. `production`. Maximum 40 characters.
          maxLength: 40
        parameters:
          type: object
          description: 'Typed arguments of the action, e.g. `{ "amount": 4800, "currency": "EUR" }`. Scalars only, at most 32 keys. A non-scalar value rejects the whole request with 400 rather than being dropped: a rule that reads a missing parameter can only ever decide more permissively than one that reads it.'
          additionalProperties:
            type:
            - string
            - number
            - boolean
    WebhookSecret:
      type: object
      required:
      - webhookSecret
      properties:
        webhookSecret:
          type: string
          description: The secret to verify X-Pushary-Signature against on decision callbacks.
    DecisionAnswerResult:
      type: object
      required:
      - decisionId
      - status
      - answered
      properties:
        decisionId:
          type: string
          description: Identifier.
        status:
          type: string
          description: Lifecycle state after recording.
          enum:
          - pending
          - answered
          - expired
          - cancelled
        answered:
          type: boolean
          description: True once a person has answered.
        value:
          type:
          - string
          - 'null'
          description: The recorded answer.
    Decision:
      type: object
      description: A decision as read back.
      required:
      - decisionId
      - status
      - answered
      - value
      - type
      - question
      - createdAt
      properties:
        decisionId:
          type: string
          description: Identifier.
        status:
          type: string
          description: Lifecycle state.
          enum:
          - pending
          - answered
          - expired
          - cancelled
        answered:
          type: boolean
          description: True once a person has answered.
        value:
          type:
          - string
          - 'null'
          description: The person's answer, or null while pending.
        type:
          type: string
          description: How the person answers.
          enum:
          - confirm
          - select
          - input
        question:
          type: string
          description: What the person was asked.
        options:
          type:
          - array
          - 'null'
          items:
            type: string
          description: The choices, for a `select` decision.
        externalId:
          type:
          - string
          - 'null'
          description: Your own id for the end-user who was asked.
        context:
          type:
          - string
          - 'null'
          description: Free text passed at create time.
        createdAt:
          type: string
          description: When the decision was opened.
          format: date-time
        answeredAt:
          type:
          - string
          - 'null'
          format: date-time
          description: When it was answered.
        expiresAt:
          type:
          - string
          - 'null'
          format: date-time
          description: When it stops being answerable.
    DecisionResult:
      type: object
      description: What creating a decision returns.
      required:
      - decisionId
      - status
      - answered
      properties:
        decisionId:
          type: string
          description: Identifier to poll, answer or cancel.
        status:
          type: string
          description: Lifecycle state. stopped means the workspace kill switch refused creation; no decision was opened.
          enum:
          - pending
          - answered
          - expired
          - cancelled
          - stopped
        answered:
          type: boolean
          description: True once a person has answered.
        value:
          type:
          - string
          - 'null'
          description: The person's answer, once answered.
        type:
          type: string
          description: How the person answers.
          enum:
          - confirm
          - select
          - input
        question:
          type: string
          description: What the person was asked.
        pollUrl:
          type: string
          description: Where to poll for the answer.
          format: uri
        decisionPageUrl:
          type: string
          description: The hosted page the person answers on.
          format: uri
        approvalUrl:
          type: string
          description: Recipient-bound bearer link, returned only when requested on a fresh create with externalId.
          format: uri
        deliverability:
          type: string
          description: Whether Pushary has a confirmed push channel, needs caller delivery, or has no named recipient.
          enum:
          - push
          - fallback
          - unreachable
        expiresInSeconds:
          type: integer
          description: How long the decision stays answerable.
        idempotent:
          type: boolean
          description: True when an idempotency key replayed an earlier decision.
        hint:
          type: string
          description: Advice when the decision may not reach anyone.
        reachable:
          type: boolean
          description: Whether the addressed end-user can be reached at create time.
        reachableChannels:
          type: integer
          description: How many channels can reach them.
        deviceCount:
          type: integer
          description: How many devices are enrolled for them.
    ActionPresentation:
      type: object
      description: Human-readable action summary. Each change reads its value from parameters; unknown or duplicate parameter references are rejected.
      required:
      - label
      - effect
      properties:
        label:
          type: string
          description: Action name shown to the person.
          minLength: 1
          maxLength: 80
        effect:
          type: string
          description: What executing this action does.
          minLength: 1
          maxLength: 200
        risk:
          type: string
          description: Why this action needs attention.
          maxLength: 200
        changes:
          type: array
          description: Parameters to display. Values must fit their requested format.
          maxItems: 8
          items:
            type: object
            required:
            - parameter
            - label
            - format
            properties:
              parameter:
                type: string
                description: A non-secret key in parameters.
              label:
                type: string
                description: Human-readable field name.
                minLength: 1
                maxLength: 80
              format:
                type: object
                description: Display format. Currency requires an uppercase three-letter currency code and an integer value in minor units.
                required:
                - kind
                properties:
                  kind:
                    type: string
                    description: Format kind.
                    enum:
                    - text
                    - currency
                    - quantity
                    - timestamp
                    - boolean
                  currency:
                    type: string
                    description: Required when kind is currency.
                    pattern: ^[A-Z]{3}$
                  unit:
                    type: string
                    description: Optional quantity unit, displayed up to 16 characters.
                if:
                  properties:
                    kind:
                      const: currency
                then:
                  required:
                  - currency
    AnswerDecision:
      type: object
      required:
      - answer
      properties:
        answer:
          type: string
          description: The answer to record. For a `confirm` decision, `yes` or `no`.
    Error:
      type: object
      description: JSON error response. Shared authentication and validation errors include code and diagnostics; some endpoint errors return only error. Branch on HTTP status and code when present, not message text.
      required:
      - error
      properties:
        error:
          type: string
          description: Human-readable summary.
        code:
          type: string
          description: Machine-readable classification, when available. Common values include unauthorized, forbidden, invalid_request, not_found, method_not_allowed and rate_limited.
        status:
          type: integer
          description: The HTTP status code, repeated in the body for transports that hide it.
        message:
          type: string
          description: What went wrong, in one sentence.
        hint:
          type: string
          description: What to do about it.
        documentation:
          type: string
          description: URL of the documentation page for this rule.
          format: uri
    ReachabilityResult:
      type: object
      required:
      - externalId
      - deliverability
      - reachable
      - reachableChannels
      - deviceCount
      - webEndpoints
      - hint
      properties:
        externalId:
          type: string
          description: The recipient checked.
        deliverability:
          type: string
          description: Who can deliver the decision.
          enum:
          - push
          - fallback
          - unreachable
        reachable:
          type: boolean
          description: Whether a push channel can reach this recipient.
        reachableChannels:
          type: integer
          description: Number of reachable channels.
        deviceCount:
          type: integer
          description: Number of enrolled native devices.
        webEndpoints:
          type: integer
          description: Number of browser subscription endpoints.
        hint:
          type: string
          description: Suggested next step for this delivery state.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A Pushary API key, sent as `Authorization: Bearer pk_xxx.xxx`. Create one with `npx -y pushary@latest setup` or in Dashboard > Agent > Settings. The MCP endpoint additionally accepts OAuth 2.0; see /.well-known/oauth-protected-resource.'
externalDocs:
  description: Pushary documentation
  url: https://pushary.com/docs
x-refined-from:
- pushary-com-openapi.json
- pushary-com.json