Skip to main content
POST
/
api
/
cases
Create Case
curl --request POST \
  --url https://app.sphinxhq.com/api/cases/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": 123,
  "customer": {
    "full_name": "<string>",
    "external_id": "<string>",
    "customer_type": "INDIVIDUAL",
    "input_details": {},
    "delete_after": 123
  },
  "webhook_url": "<string>",
  "checks": [
    {
      "check_type": "UBO_RESOLUTION",
      "input_details": {},
      "document_ids": [
        123
      ],
      "delete_after": 123
    }
  ],
  "document_ids": [
    123
  ],
  "delete_after": 123,
  "case_config": "<string>",
  "auto_start": true
}
'
{
  "customer_id": 123,
  "webhook_url": "https://example.com/webhook/case-complete",
  "delete_after": 30
}

Authorizations

Authorization
string
header
required

OAuth2 access token obtained from POST /api/oauth/token/ using client credentials.

Body

Write serializer for GenericCase creation.

customer_id
integer

ID of an existing customer for this case

customer
object

Customer data to create a new customer with this case

webhook_url
string | null

Webhook sent on case completion.

Maximum string length: 511
checks
object[]

A list of checks to create with this case.

document_ids
integer[]

List of document IDs to link to this case

delete_after
integer

Number of days until deletion. Use 0 for immediate deletion, or -1 for indefinite retention (never delete). Defaults to -1.

case_config
string

Slug of a CaseConfig or DualCaseConfig. For a CaseConfig, auto-generates checks from the config. Cannot be used together with 'checks'. For a DualCaseConfig (pairs KYB + KYC configs), creates a parent KYB case; when started, child KYC cases are auto-created for each shareholder extracted from documents.

auto_start
boolean

Whether to automatically start processing the case after creation. Defaults to true. Set to false to create a case without starting it (you can start it later via POST /cases/{id}/start/).

Response

201 - application/json

Read-only serializer for GenericCase with related objects.

id
integer
required
customer
object
required

Nested customer serializer for GenericCase responses.

note
string | null
required
risk_score
number<double> | null
required

Risk score (max of check risk scores for the case).

outcome
enum<string> | null
required
  • ACCEPTED - Accepted
  • REJECTED - Rejected
  • PENDING - Pending
Available options:
ACCEPTED,
REJECTED,
PENDING,
null
is_complete
boolean
required
failed
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
checks
object[]
required
rfi
object
required
webhook_url
string | null

Webhook sent on case completion.

Maximum string length: 511
delete_after
integer

Days until deletion. -1 means never delete.

Required range: -2147483648 <= x <= 2147483647