Sift Scores API

Retrieve and recompute Sift risk scores.

OpenAPI Specification

sift-com-scores-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sift Decisions Scores API
  description: 'The Sift Decisions API records analyst or automation decisions (for example

    block, watch, or accept) against users, orders, sessions, and content. Decisions

    feed Sift''s machine learning models and drive downstream webhook notifications.

    '
  version: '205'
  contact:
    name: Sift
    url: https://sift.com
    email: support@sift.com
  license:
    name: Sift API Terms of Service
    url: https://sift.com/legal-and-compliance
servers:
- url: https://api.sift.com/v205
  description: Sift Production API
security:
- BasicAuth: []
tags:
- name: Scores
  description: Retrieve and recompute Sift risk scores.
paths:
  /score/{user_id}:
    get:
      summary: Sift Get User Score
      description: Retrieve the latest cached Sift Score for the user across the requested abuse types.
      operationId: getScore
      tags:
      - Scores
      parameters:
      - $ref: '#/components/parameters/UserId'
      - name: abuse_types
        in: query
        schema:
          type: string
        description: Comma-separated abuse types to return scores for.
      responses:
        '200':
          description: Score response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoreResponse'
  /rescore/{user_id}:
    post:
      summary: Sift Rescore User
      description: Force a fresh Sift Score computation for the user. Useful after a label update or out-of-band signal change.
      operationId: rescoreUser
      tags:
      - Scores
      parameters:
      - $ref: '#/components/parameters/UserId'
      - name: abuse_types
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Rescore response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoreResponse'
components:
  parameters:
    UserId:
      name: user_id
      in: path
      required: true
      schema:
        type: string
  schemas:
    ScoreResponse:
      type: object
      properties:
        status:
          type: integer
        error_message:
          type: string
        user_id:
          type: string
        scores:
          type: object
          additionalProperties:
            type: object
            properties:
              score:
                type: number
              reasons:
                type: array
                items:
                  type: object
        latest_decisions:
          type: object
        latest_labels:
          type: object
        workflow_statuses:
          type: array
          items:
            type: object
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic