mutation CloseUnderwritingAccount($input: CloseUnderwritingAccountInput!) {
closeUnderwritingAccount(input: $input) {
errors {
... on BadRequestError {
advice
code
message
}
... on InvalidActorError {
advice
code
message
}
... on NotFoundError {
advice
code
message
resourceId
resourceName
}
... on ServerError {
advice
code
message
}
... on UnderwritingAccountClosureRefusedError {
code
message
}
}
underwritingAccount {
activeReviewId
currentApplication {
applicationStatus
createdDateTime
declineComment
id
informationRequestStatus
kind
queue
submissionAttemptedDateTime
submissionSuccessfulDateTime
updatedDateTime
}
events {
}
id
status
}
}
}
{
"input": {
"comment": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
curl --request POST \
--url https://api.sandbox.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--data '{
"query": "mutation CloseUnderwritingAccount($input: CloseUnderwritingAccountInput!) {\n closeUnderwritingAccount(input: $input) {\n errors {\n ... on BadRequestError {\n advice\n code\n message\n }\n ... on InvalidActorError {\n advice\n code\n message\n }\n ... on NotFoundError {\n advice\n code\n message\n resourceId\n resourceName\n }\n ... on ServerError {\n advice\n code\n message\n }\n ... on UnderwritingAccountClosureRefusedError {\n code\n message\n }\n }\n underwritingAccount {\n activeReviewId\n currentApplication {\n applicationStatus\n createdDateTime\n declineComment\n id\n informationRequestStatus\n kind\n queue\n submissionAttemptedDateTime\n submissionSuccessfulDateTime\n updatedDateTime\n }\n events {\n\n }\n id\n status\n }\n }\n}",
"variables": {
"input": {
"comment": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}'
{
"data": {
"closeUnderwritingAccount": {
"errors": [
{
"__typename": "BadRequestError",
"advice": "example",
"code": "BAD_REQUEST",
"message": "example"
}
],
"underwritingAccount": {
"activeReviewId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"currentApplication": {
"applicationEvents": "example",
"applicationIdentity": "example",
"applicationStatus": "APPROVED",
"assignee": "example",
"attachments": [
"example"
],
"bankAccounts": [
"example"
],
"comments": [
"example"
],
"createdBy": "example",
"createdDateTime": "2026-01-15T14:30:00Z",
"decisionComponents": [
"example"
],
"declineComment": "example",
"declineReasons": [
"example"
],
"dynamicField": "example",
"dynamicFields": [
"example"
],
"id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
"informationRequests": [
"example"
],
"informationRequestStatus": "AWAITING_INFORMATION",
"kind": "MAINTENANCE_REVIEW",
"participants": [
"example"
],
"primaryUnderwriter": "example",
"processingActivity": "example",
"queue": "PARTNER",
"relationshipProcessingActivity": "example",
"schema": "example",
"secondaryUnderwriter": "example",
"stakeholders": [
"example"
],
"submissionAttemptedDateTime": "2026-01-15T14:30:00Z",
"submissionSuccessfulDateTime": "2026-01-15T14:30:00Z",
"updatedBy": "example",
"updatedDateTime": "2026-01-15T14:30:00Z"
},
"events": {
"items": [
"example"
],
"pageInfo": "example"
},
"id": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"status": "CLOSED"
}
}
}
}
Mutations
closeUnderwritingAccount
Closes an underwriting account with a closing comment. Closing cannot be undone, and it is refused while a review of the account is in progress. An account the caller cannot see is reported as not found.
mutation CloseUnderwritingAccount($input: CloseUnderwritingAccountInput!) {
closeUnderwritingAccount(input: $input) {
errors {
... on BadRequestError {
advice
code
message
}
... on InvalidActorError {
advice
code
message
}
... on NotFoundError {
advice
code
message
resourceId
resourceName
}
... on ServerError {
advice
code
message
}
... on UnderwritingAccountClosureRefusedError {
code
message
}
}
underwritingAccount {
activeReviewId
currentApplication {
applicationStatus
createdDateTime
declineComment
id
informationRequestStatus
kind
queue
submissionAttemptedDateTime
submissionSuccessfulDateTime
updatedDateTime
}
events {
}
id
status
}
}
}
{
"input": {
"comment": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
curl --request POST \
--url https://api.sandbox.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--data '{
"query": "mutation CloseUnderwritingAccount($input: CloseUnderwritingAccountInput!) {\n closeUnderwritingAccount(input: $input) {\n errors {\n ... on BadRequestError {\n advice\n code\n message\n }\n ... on InvalidActorError {\n advice\n code\n message\n }\n ... on NotFoundError {\n advice\n code\n message\n resourceId\n resourceName\n }\n ... on ServerError {\n advice\n code\n message\n }\n ... on UnderwritingAccountClosureRefusedError {\n code\n message\n }\n }\n underwritingAccount {\n activeReviewId\n currentApplication {\n applicationStatus\n createdDateTime\n declineComment\n id\n informationRequestStatus\n kind\n queue\n submissionAttemptedDateTime\n submissionSuccessfulDateTime\n updatedDateTime\n }\n events {\n\n }\n id\n status\n }\n }\n}",
"variables": {
"input": {
"comment": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}'
{
"data": {
"closeUnderwritingAccount": {
"errors": [
{
"__typename": "BadRequestError",
"advice": "example",
"code": "BAD_REQUEST",
"message": "example"
}
],
"underwritingAccount": {
"activeReviewId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"currentApplication": {
"applicationEvents": "example",
"applicationIdentity": "example",
"applicationStatus": "APPROVED",
"assignee": "example",
"attachments": [
"example"
],
"bankAccounts": [
"example"
],
"comments": [
"example"
],
"createdBy": "example",
"createdDateTime": "2026-01-15T14:30:00Z",
"decisionComponents": [
"example"
],
"declineComment": "example",
"declineReasons": [
"example"
],
"dynamicField": "example",
"dynamicFields": [
"example"
],
"id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
"informationRequests": [
"example"
],
"informationRequestStatus": "AWAITING_INFORMATION",
"kind": "MAINTENANCE_REVIEW",
"participants": [
"example"
],
"primaryUnderwriter": "example",
"processingActivity": "example",
"queue": "PARTNER",
"relationshipProcessingActivity": "example",
"schema": "example",
"secondaryUnderwriter": "example",
"stakeholders": [
"example"
],
"submissionAttemptedDateTime": "2026-01-15T14:30:00Z",
"submissionSuccessfulDateTime": "2026-01-15T14:30:00Z",
"updatedBy": "example",
"updatedDateTime": "2026-01-15T14:30:00Z"
},
"events": {
"items": [
"example"
],
"pageInfo": "example"
},
"id": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"status": "CLOSED"
}
}
}
}
Mutation
Arguments
Return type
CloseUnderwritingAccountPayload!
Errors that occurred during the mutation, if any. Null or empty indicates success.
Show Possible types
Show Possible types
Show BadRequestError
Show BadRequestError
Show InvalidActorError
Show InvalidActorError
Show NotFoundError
Show NotFoundError
Show ServerError
Show ServerError
Show UnderwritingAccountClosureRefusedError
Show UnderwritingAccountClosureRefusedError
The underwriting account cannot be closed in its current state; nothing was changed.
The closed account. Null when the account was not closed.
Show child attributes
Show child attributes
The unique identifier of the review application in progress on the account. Null when no review is in progress.
The most recently approved application, which holds the account’s current details.See UnderwritingApplication
The events recorded on the account, newest first.See UnderwritingAccountEventCollection
The status of the account.See UnderwritingAccountStatus
mutation CloseUnderwritingAccount($input: CloseUnderwritingAccountInput!) {
closeUnderwritingAccount(input: $input) {
errors {
... on BadRequestError {
advice
code
message
}
... on InvalidActorError {
advice
code
message
}
... on NotFoundError {
advice
code
message
resourceId
resourceName
}
... on ServerError {
advice
code
message
}
... on UnderwritingAccountClosureRefusedError {
code
message
}
}
underwritingAccount {
activeReviewId
currentApplication {
applicationStatus
createdDateTime
declineComment
id
informationRequestStatus
kind
queue
submissionAttemptedDateTime
submissionSuccessfulDateTime
updatedDateTime
}
events {
}
id
status
}
}
}
{
"input": {
"comment": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
curl --request POST \
--url https://api.sandbox.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--data '{
"query": "mutation CloseUnderwritingAccount($input: CloseUnderwritingAccountInput!) {\n closeUnderwritingAccount(input: $input) {\n errors {\n ... on BadRequestError {\n advice\n code\n message\n }\n ... on InvalidActorError {\n advice\n code\n message\n }\n ... on NotFoundError {\n advice\n code\n message\n resourceId\n resourceName\n }\n ... on ServerError {\n advice\n code\n message\n }\n ... on UnderwritingAccountClosureRefusedError {\n code\n message\n }\n }\n underwritingAccount {\n activeReviewId\n currentApplication {\n applicationStatus\n createdDateTime\n declineComment\n id\n informationRequestStatus\n kind\n queue\n submissionAttemptedDateTime\n submissionSuccessfulDateTime\n updatedDateTime\n }\n events {\n\n }\n id\n status\n }\n }\n}",
"variables": {
"input": {
"comment": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}'
{
"data": {
"closeUnderwritingAccount": {
"errors": [
{
"__typename": "BadRequestError",
"advice": "example",
"code": "BAD_REQUEST",
"message": "example"
}
],
"underwritingAccount": {
"activeReviewId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"currentApplication": {
"applicationEvents": "example",
"applicationIdentity": "example",
"applicationStatus": "APPROVED",
"assignee": "example",
"attachments": [
"example"
],
"bankAccounts": [
"example"
],
"comments": [
"example"
],
"createdBy": "example",
"createdDateTime": "2026-01-15T14:30:00Z",
"decisionComponents": [
"example"
],
"declineComment": "example",
"declineReasons": [
"example"
],
"dynamicField": "example",
"dynamicFields": [
"example"
],
"id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
"informationRequests": [
"example"
],
"informationRequestStatus": "AWAITING_INFORMATION",
"kind": "MAINTENANCE_REVIEW",
"participants": [
"example"
],
"primaryUnderwriter": "example",
"processingActivity": "example",
"queue": "PARTNER",
"relationshipProcessingActivity": "example",
"schema": "example",
"secondaryUnderwriter": "example",
"stakeholders": [
"example"
],
"submissionAttemptedDateTime": "2026-01-15T14:30:00Z",
"submissionSuccessfulDateTime": "2026-01-15T14:30:00Z",
"updatedBy": "example",
"updatedDateTime": "2026-01-15T14:30:00Z"
},
"events": {
"items": [
"example"
],
"pageInfo": "example"
},
"id": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"status": "CLOSED"
}
}
}
}
Was this page helpful?