{
  "openapi": "3.1.0",
  "info": {
    "title": "StackGo verification API",
    "version": "1.0.0",
    "summary": "Start identity verifications, KYB and Tranche 2 checks from your own systems, and retrieve the results.",
    "description": "The public, API-key surface of StackGo IdentityCheck: six endpoints under /api/v1/verification. Everything else the application exposes is its own session-authenticated internals and is not part of this API. Human-readable docs: https://stackgo.io/docs/. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
    "contact": {
      "name": "StackGo",
      "url": "https://stackgo.io/contact/"
    },
    "termsOfService": "https://stackgo.io/terms/"
  },
  "externalDocs": {
    "description": "API documentation",
    "url": "https://stackgo.io/docs/"
  },
  "servers": [
    {
      "url": "https://identity.stackgo.io",
      "description": "Production. The API needs a paid plan; it is not available on trial accounts."
    }
  ],
  "tags": [
    {
      "name": "Verification",
      "description": "Start verifications and retrieve their results."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/api/v1/verification/create": {
      "post": {
        "operationId": "createVerification",
        "summary": "Start a verification for an individual",
        "description": "Starts a verification for an individual. Requires scope `verification.create`.",
        "tags": [
          "Verification"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-required-scopes": [
          "verification.create"
        ],
        "requestBody": {
          "required": true,
          "description": "Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Accepted. Verification is asynchronous, so this returns an identifier, not a result. Get the outcome from the verification.decision webhook or GET /api/v1/verification/info/{id}. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verification/sms": {
      "post": {
        "operationId": "createVerificationSms",
        "summary": "Start a verification and invite by SMS",
        "description": "Starts a verification and sends the person their invitation by SMS. Requires scope `verification.create`.",
        "tags": [
          "Verification"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-required-scopes": [
          "verification.create"
        ],
        "requestBody": {
          "required": true,
          "description": "Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Accepted. Verification is asynchronous, so this returns an identifier, not a result. Get the outcome from the verification.decision webhook or GET /api/v1/verification/info/{id}. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verification/namescan/kyb": {
      "post": {
        "operationId": "createKybCheck",
        "summary": "Start a business (KYB) check",
        "description": "Starts a know-your-business check on an entity. Requires scope `verification.create`.",
        "tags": [
          "Verification"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-required-scopes": [
          "verification.create"
        ],
        "requestBody": {
          "required": true,
          "description": "Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Accepted. Verification is asynchronous, so this returns an identifier, not a result. Get the outcome from the verification.decision webhook or GET /api/v1/verification/info/{id}. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verification/tranche2": {
      "post": {
        "operationId": "createTranche2Workflow",
        "summary": "Start a Tranche 2 workflow",
        "description": "Starts an AUSTRAC Tranche 2 customer due diligence workflow. Requires scope `verification.create`.",
        "tags": [
          "Verification"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-required-scopes": [
          "verification.create"
        ],
        "requestBody": {
          "required": true,
          "description": "Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Accepted. Verification is asynchronous, so this returns an identifier, not a result. Get the outcome from the verification.decision webhook or GET /api/v1/verification/info/{id}. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verification/info/{id}": {
      "get": {
        "operationId": "getVerification",
        "summary": "Retrieve a verification and its result",
        "tags": [
          "Verification"
        ],
        "description": "Returns a verification and, once it has landed, its result. Polling works, but webhooks are recommended. Requires scope `verification.info`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-required-scopes": [
          "verification.info"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The verification identifier returned when it was created.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "The verification. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/verification/image/{verificationId}/{imageId}": {
      "get": {
        "operationId": "getVerificationImage",
        "summary": "Retrieve a captured document or selfie image",
        "tags": [
          "Verification"
        ],
        "description": "Returns an image captured during a verification, such as an identity document or selfie. Requires scope `verification.image`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-required-scopes": [
          "verification.image"
        ],
        "parameters": [
          {
            "name": "verificationId",
            "in": "path",
            "required": true,
            "description": "The verification identifier.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "imageId",
            "in": "path",
            "required": true,
            "description": "The image identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "The image. Field-level request and response schemas are not published yet. Contact StackGo for the field detail while the reference is finished: https://stackgo.io/contact/"
          }
        }
      }
    }
  },
  "webhooks": {
    "verification.decision": {
      "post": {
        "operationId": "onVerificationDecision",
        "summary": "A verification has a decision",
        "description": "Sent when a verification completes. Delivered and retried by Svix (https://docs.svix.com). Verify the svix-signature header with the endpoint's signing secret before acting on the body, respond 2xx quickly, and expect duplicates: key processing on the verification id. Set up endpoints under Account > Webhooks. See https://stackgo.io/docs/webhooks/.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "type",
                  "id",
                  "result"
                ],
                "properties": {
                  "type": {
                    "const": "verification.decision"
                  },
                  "id": {
                    "type": "string",
                    "description": "The verification id. Use it to de-duplicate retried deliveries."
                  },
                  "result": {
                    "type": "string",
                    "description": "The headline outcome, for example \"positive\"."
                  },
                  "adverse_media_results": {
                    "type": "object",
                    "description": "Populated when screening ran."
                  },
                  "sanctions_results": {
                    "type": "object",
                    "description": "Populated when screening ran."
                  },
                  "result_info": {
                    "type": "object",
                    "description": "Detail; result_info.verification.status carries the verification status, for example \"approved\"."
                  }
                }
              },
              "example": {
                "type": "verification.decision",
                "id": "a354461f-b116-4290-8969-8506255dc2fa",
                "result": "positive",
                "adverse_media_results": {},
                "sanctions_results": {},
                "result_info": {
                  "status": "success",
                  "verification": {
                    "id": "fa9ddce9-45c9-4e8d-a097-d612d08752db",
                    "status": "approved",
                    "code": 9001,
                    "acceptanceTime": "2023-10-18T04:38:59.680166Z",
                    "decisionTime": "2023-10-18T04:46:37.594669Z",
                    "document": {
                      "type": "DRIVERS_LICENSE",
                      "country": "AU"
                    },
                    "person": {}
                  },
                  "technicalData": {
                    "ip": "124.187.226.22"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "svix-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "svix-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "svix-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "Acknowledge quickly and process later. Slow or failed responses are retried with exponential backoff."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "basic",
        "description": "Send the API key as `Authorization: Basic <API_KEY>`. Keys start with `key-` and are created by a user with the developer permission. Each key carries a fixed set of scopes (verification.create, verification.info, verification.image), chosen when it is minted. Keep keys server-side. Bearer tokens are the web app's session auth and are not part of this API."
      }
    }
  }
}
