REST action reference
Import structured granted outcomes
Import structured granted outcomes. REST and MCP call the same domain service, so a successful invocation returns the same canonical result.
Request schema
Unknown fields are rejected. Path parameters merge with the JSON body or query input before validation.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"outcomes": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"external_outcome_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[\\x21-\\x7e]+$"
},
"outcome": {
"type": "string",
"const": "granted"
},
"benefit": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
},
"subject": {
"type": "object",
"properties": {
"external_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"email_verified": {
"type": "boolean"
}
},
"required": [
"email"
],
"additionalProperties": false
},
"occurred_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"claim_id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[\\x21-\\x7e]+$"
}
},
"required": [
"outcome",
"benefit",
"subject",
"occurred_at"
],
"additionalProperties": false
}
}
},
"required": [
"outcomes"
],
"additionalProperties": false
}Example request
{
"outcomes": [
{
"external_outcome_id": "historical_123",
"outcome": "granted",
"benefit": "signup_credits",
"subject": {
"external_id": "customer_123",
"email": "alex@example.com",
"email_verified": true
},
"occurred_at": "2026-09-20T12:00:00Z",
"claim_id": "claim_customer_123"
}
]
}Response schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}Example success response
REST returns JSON. MCP returns the same object in structuredContent plus a transport request ID.
{
"id": "00000000-0000-4000-8000-000000000001",
"state": "pending",
"accepted": 1
}Errors and recovery
Common statuses: 422 invalid input, 403 missing scope or organization access, 404 not found, 409 revision or idempotency conflict, 429 rate limit, 504 deadline exceeded.Include the request ID from the error envelope when you contact support.
Idempotency and deadlines
Send a stable Idempotency-Key and reuse it only for an exact retry of this mutation.Server deadline: 5s. Retry only when error.retryable is true.
cURL
curl -X POST https://abusezero.com/v1/imports \
-H "Authorization: Bearer $ABUSEZERO_SECRET_KEY" \
-H "AbuseZero-Organization: $ABUSEZERO_ORGANIZATION" \
-H "Idempotency-Key: operation_123" \
-H "Content-Type: application/json" \
--data '{"outcomes":[{"external_outcome_id":"historical_123","outcome":"granted","benefit":"signup_credits","subject":{"external_id":"customer_123","email":"alex@example.com","email_verified":true},"occurred_at":"2026-09-20T12:00:00Z","claim_id":"claim_customer_123"}]}'Node SDK
const result = await abusezero.call("/v1/imports", {
method: "POST",
input: {"outcomes":[{"external_outcome_id":"historical_123","outcome":"granted","benefit":"signup_credits","subject":{"external_id":"customer_123","email":"alex@example.com","email_verified":true},"occurred_at":"2026-09-20T12:00:00Z","claim_id":"claim_customer_123"}]},
idempotencyKey: "operation_123",
});MCP
abusezero_create_outcome_import({
"outcomes": [
{
"external_outcome_id": "historical_123",
"outcome": "granted",
"benefit": "signup_credits",
"subject": {
"external_id": "customer_123",
"email": "alex@example.com",
"email_verified": true
},
"occurred_at": "2026-09-20T12:00:00Z",
"claim_id": "claim_customer_123"
}
],
"idempotency_key": "operation_123"
})