# Mutations

Mutations modify or create data on the ledger or execute admin actions by specifying the operation to be performed and the input data.

Source: https://www.twisp.com/docs/reference/graphql/mutations

## ach
### createConfiguration
Create a configuration for processing an ACH file. Defines settlement
exception and suspense accounts. Defines the endpoint that decisioning
webhooks are sent to for this configuration.
#### Resolves to
[`AchConfiguration`](/docs/reference/graphql/types/object#ach-configuration)
#### Arguments

---
* ``input`` - [`AchCreateConfigurationInput!`](/docs/reference/graphql/types/input#ach-create-configuration-input)
*

**Request**

```graphql
mutation CreateConfiguration {
  ach {
    createConfiguration(
      input: {
        configId: "1dc71d60-f463-4bb6-b82a-ab42e2f923ff"
        endpointId: "b84512f1-a67e-4dc2-94dd-66c48b4d13fb"
        settlementAccountId: "37f7e8a6-171f-411d-ad59-7b1f40f505ea"
        exceptionAccountId: "3171b0c2-6e9f-41aa-a5a6-ee927deb27cf"
        suspenseAccountId: "3171b0c2-6e9f-41aa-a5a6-ee927deb27cf"
        feeAccountId: "62808a87-0b11-4dce-8877-767b70f029af"
        journalId: "00000000-0000-0000-0000-000000000000"
        odfiHeaderConfiguration: {
          immediateDestination: "026009593"
          immediateDestinationName: "ACME BANK"
          immediateOrigin: "231380104"
          immediateOriginName: "ZUZU"
        }
        timeZone: "America/Los_Angeles"
      }
    ) {
      configId
    }
  }
}
```
**Response**

```json
{
  "data": {
    "ach": {
      "createConfiguration": {
        "configId": "1dc71d60-f463-4bb6-b82a-ab42e2f923ff"
      }
    }
  }
}
```

### generateFile
Generate an ACH file.  Currently only generates RDFI return files.
#### Resolves to
[`AchGeneratedFile!`](/docs/reference/graphql/types/object#ach-generated-file)
#### Arguments

---
* ``input`` - [`AchGenerateFileInput!`](/docs/reference/graphql/types/input#ach-generate-file-input)
*

**Request**

```graphql
mutation GenerateFile {
  ach {
    generateFile(
      input: {
        configId: "1dc71d60-f463-4bb6-b82a-ab42e2f923ff"
        fileKey: "return.ach"
        fileType: RDFI_RETURN
      }
    ) {
      fileKey
    }
  }
}
```
**Response**

```json
{
  "data": {
    "ach": {
      "generateFile": {
        "fileKey": "return.ach"
      }
    }
  }
}
```

### processFile
Process an ACH file at the file key with the defined configuration.
#### Resolves to
[`AchProcessedFile!`](/docs/reference/graphql/types/object#ach-processed-file)
#### Arguments

---
* ``input`` - [`AchProcessFileInput!`](/docs/reference/graphql/types/input#ach-process-file-input)
*

**Request**

```graphql
mutation ProcessFile {
  ach {
    processFile(
      input: {
        configId: "1dc71d60-f463-4bb6-b82a-ab42e2f923ff"
        fileKey: "ppd-credit.ach"
        fileType: RDFI
      }
    ) {
      fileId
    }
  }
}
```
**Response**

```json
{
  "data": {
    "ach": {
      "processFile": {
        "fileId": "b0d76a9a-afcd-4b1b-b115-01b88d7b84e6"
      }
    }
  }
}
```

### updateConfiguration
Update an ACH configuration.
#### Resolves to
[`AchConfiguration`](/docs/reference/graphql/types/object#ach-configuration)
#### Arguments

---
* ``configId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.
---
* ``input`` - [`AchUpdateConfigurationInput!`](/docs/reference/graphql/types/input#ach-update-configuration-input)
*

**Request**

```graphql
mutation UpdateConfiguration {
  ach {
    updateConfiguration(
      configId: "1dc71d60-f463-4bb6-b82a-ab42e2f923ff"
      input: {
        timeZone: "America/Chicago"
        traceNumberConfiguration: {
          minTraceNumber: 5000000
          maxTraceNumber: 9999999
        }
      }
    ) {
      configId
      timeZone
      traceNumberConfiguration {
        minTraceNumber
        maxTraceNumber
      }
      version
    }
  }
}
```
**Response**

```json
{
  "data": {
    "ach": {
      "updateConfiguration": {
        "configId": "1dc71d60-f463-4bb6-b82a-ab42e2f923ff",
        "timeZone": "America/Chicago",
        "traceNumberConfiguration": {
          "minTraceNumber": 5000000,
          "maxTraceNumber": 9999999
        },
        "version": 2
      }
    }
  }
}
```

## addLimitToControl
Add a limit to the control.
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The control to add limit to.
---
* ``velocityLimitId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The velocity limit to add.

## addToAccountSet
Add a new member to a set. Members can be an Account or another AccountSet.
#### Resolves to
[`AccountSet!`](/docs/reference/graphql/types/object#account-set)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier for set.
---
* ``member`` - [`AccountSetMemberInput!`](/docs/reference/graphql/types/input#account-set-member-input)
* Account or AccountSet to add as a member of this set.

**Request**

```graphql
mutation AddToAccountSet(
  $accountSetCustomersId: UUID!
  $accountCustomerAliciaId: UUID!
) {
  addToAccountSet(
    id: $accountSetCustomersId
    member: { memberId: $accountCustomerAliciaId, memberType: ACCOUNT }
  ) {
    accountSetId
    members(first: 10) {
      nodes {
        ... on Account {
          accountId
          name
          code
        }
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "addToAccountSet": {
      "accountSetId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8",
      "members": {
        "nodes": [
          {
            "accountId": "260fd651-8819-4f99-9c8a-87d27e03ee4c",
            "name": "Alicia",
            "code": "CUST.Alicia"
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "accountSetCustomersId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8",
  "accountCustomerAliciaId": "260fd651-8819-4f99-9c8a-87d27e03ee4c"
}
```
## admin
Mutations in the `admin` namespace are used to manage the organization data like users, groups, and tenants.
### createGroup
Create a new group.
#### Resolves to
[`Group`](/docs/reference/graphql/types/object#group)
#### Arguments

---
* ``input`` - [`CreateGroupInput!`](/docs/reference/graphql/types/input#create-group-input)
* Fields to create a new group.

**Request**

```graphql
mutation AdminCreateGroup {
  admin {
    createGroup(
      input: {
        id: "917e123a-b89d-4ab5-b11c-cdf6aac80b63"
        name: "empty-policy-1"
        description: "A group with an empty policy"
        policy: "[]"
      }
    ) {
      name
      description
      policy
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "createGroup": {
        "name": "empty-policy-1",
        "description": "A group with an empty policy",
        "policy": "[]"
      }
    }
  }
}
```

### createTenant
Create a new tenant.
#### Resolves to
[`Tenant`](/docs/reference/graphql/types/object#tenant)
#### Arguments

---
* ``input`` - [`CreateTenantInput!`](/docs/reference/graphql/types/input#create-tenant-input)
* Fields to create a new tenant.

**Request**

```graphql
mutation AdminCreateTenant {
  admin {
    createTenant(
      input: {
        id: "72a0097f-239e-48ec-a417-49c318332ed6"
        accountId: "sandbox"
        name: "Sandbox"
        description: "Sandbox tenant for testing"
      }
    ) {
      accountId
      name
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "createTenant": {
        "accountId": "sandbox",
        "name": "Sandbox"
      }
    }
  }
}
```

### createUser
Create a new human user.

Upon creation, new users will receive an invite email to sign in to Twisp Console.
#### Resolves to
[`User`](/docs/reference/graphql/types/object#user)
#### Arguments

---
* ``input`` - [`CreateUserInput!`](/docs/reference/graphql/types/input#create-user-input)
* Fields to create a new user.

**Request**

```graphql
mutation AdminCreateUser {
  admin {
    createUser(
      input: {
        id: "9cc8bd28-a36d-502e-89fd-7f1410c1b90a"
        groupIds: ["d57bd759-73d5-4452-a73e-12b590324e35"]
        email: "george@twisp.com"
      }
    ) {
      id
      email
      groupIds
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "createUser": {
        "id": "9cc8bd28-a36d-502e-89fd-7f1410c1b90a",
        "email": "george@twisp.com",
        "groupIds": ["d57bd759-73d5-4452-a73e-12b590324e35"]
      }
    }
  }
}
```

### deleteGroup
Delete an existing group.
#### Resolves to
[`Group`](/docs/reference/graphql/types/object#group)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Name of group to delete.

**Request**

```graphql
mutation AdminDeleteGroup {
  admin {
    deleteGroup(name: "empty-policy-1") {
      name
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "deleteGroup": {
        "name": "empty-policy-1"
      }
    }
  }
}
```

### deleteTenant
Delete an existing tenant.
#### Resolves to
[`Tenant`](/docs/reference/graphql/types/object#tenant)
#### Arguments

---
* ``accountId`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Unique identifier.

**Request**

```graphql
mutation AdminDeleteTenant {
  admin {
    deleteTenant(accountId: "sandbox") {
      accountId
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "deleteTenant": {
        "accountId": "sandbox"
      }
    }
  }
}
```

### deleteUser
Delete an existing human user.
#### Resolves to
[`User`](/docs/reference/graphql/types/object#user)
#### Arguments

---
* ``email`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Email of user to delete.

**Request**

```graphql
mutation AdminDeleteUser {
  admin {
    deleteUser(email: "george@twisp.com") {
      email
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "deleteUser": {
        "email": "george@twisp.com"
      }
    }
  }
}
```

### restore
Restore a tenant/region into a new tenant/region
#### Resolves to
[`RestoreOutput`](/docs/reference/graphql/types/object#restore-output)
#### Arguments

---
* ``input`` - [`RestoreInput!`](/docs/reference/graphql/types/input#restore-input)
*

### updateGroup
Update an existing group. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Group`](/docs/reference/graphql/types/object#group)
#### Arguments

---
* ``input`` - [`UpdateGroupInput!`](/docs/reference/graphql/types/input#update-group-input)
* Fields to update.

**Request**

```graphql
mutation AdminUpdateGroup {
  admin {
    updateGroup(
      input: {
        name: "empty-policy-1"
        description: "An empty policy layer will default to the base policy."
        policy: "[{\"actions\": [\"*\"],\"effect\": \"DENY\",\"resources\":[\"*\"], \"assertions\": {\"always false\": \"1 == 0\"}}]"
      }
    ) {
      name
      description
      policy
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "updateGroup": {
        "name": "empty-policy-1",
        "description": "An empty policy layer will default to the base policy.",
        "policy": "[{\"actions\": [\"*\"],\"effect\": \"DENY\",\"resources\":[\"*\"], \"assertions\": {\"always false\": \"1 == 0\"}}]"
      }
    }
  }
}
```

### updateTenant
Update an existing tenant. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Tenant`](/docs/reference/graphql/types/object#tenant)
#### Arguments

---
* ``input`` - [`UpdateTenantInput!`](/docs/reference/graphql/types/input#update-tenant-input)
* Fields to update.

**Request**

```graphql
mutation AdminUpdateTenant {
  admin {
    updateTenant(
      input: {
        accountId: "sandbox"
        description: "This is the sandbox tenant."
      }
    ) {
      accountId
      description
      version
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "updateTenant": {
        "accountId": "sandbox",
        "description": "This is the sandbox tenant.",
        "version": 2
      }
    }
  }
}
```

### updateUser
Update an existing human user. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`User`](/docs/reference/graphql/types/object#user)
#### Arguments

---
* ``input`` - [`UpdateUserInput!`](/docs/reference/graphql/types/input#update-user-input)
* Fields to update.

**Request**

```graphql
mutation AdminUpdateUser {
  admin {
    updateUser(
      input: {
        email: "george@twisp.com"
        groupIds: ["152f0c89-6cba-53c9-955e-16d7cbc1f35e"]
      }
    ) {
      email
      groupIds
    }
  }
}
```
**Response**

```json
{
  "data": {
    "admin": {
      "updateUser": {
        "email": "george@twisp.com",
        "groupIds": ["152f0c89-6cba-53c9-955e-16d7cbc1f35e"]
      }
    }
  }
}
```

## attachCalculation
Attaches a calculation to an account or account set for entries on the specified journal.
#### Resolves to
[`AttachedCalculation!`](/docs/reference/graphql/types/object#attached-calculation)
#### Arguments

---
* ``input`` - [`AttachCalculationInput!`](/docs/reference/graphql/types/input#attach-calculation-input)
*

**Request**

```graphql
mutation AttachCalculation {
  attachCalculation(
    input: {
      accountId: "260fd651-8819-4f99-9c8a-87d27e03ee4c"
      calculationId: "5867b5dd-fc69-416c-80f5-62e8a53610d5"
      journalId: "822cb59f-ce51-4837-8391-2af3b7a5fc51"
    }
  ) {
    calculationId
  }
}
```
**Response**

```json
{
  "data": {
    "attachCalculation": {
      "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5"
    }
  }
}
```

## attachVelocityControl
Attach an account or set to the control.
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The control to attach account limit to.
---
* ``accountId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Account or Set Id to attach to the velocity control to.
---
* ``journalId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* Journal on which journal to attach the velocity control to.
  Attaches to the default journal if not provided.
---
* ``params`` - [`JSON`](/docs/reference/graphql/types/scalar#json)
* The parameters for the velocity limit to use.
  If attaching for default limits for control (`velocityLimitId == null`),
  Then params must satify all defined params on defualt limits

**Request**

```graphql
mutation AttachVelocityControl(
  $velocityControlId: UUID! = "f6f27892-dfd8-480b-9213-d6adf7ef04ef"
  $aliciaAccountId: UUID! = "260fd651-8819-4f99-9c8a-87d27e03ee4c"
  $journalId: UUID! = "822cb59f-ce51-4837-8391-2af3b7a5fc51"
  $limit: Decimal = "1000.00"
) {
  attachVelocityControl(
    velocityControlId: $velocityControlId
    accountId: $aliciaAccountId
    journalId: $journalId
    params: { amount: $limit }
  ) {
    velocityControlId
  }
}
```
**Response**

```json
{
  "data": {
    "attachVelocityControl": {
      "velocityControlId": "f6f27892-dfd8-480b-9213-d6adf7ef04ef"
    }
  }
}
```

## auth
Mutations in the `auth` namespace are used to manage clients and their policies. Use the `createClient` mutation to create a new client, `updateClient` to update an existing client, and `deleteClient` to delete a client.
### createClient
Create a new security client.
#### Resolves to
[`Client!`](/docs/reference/graphql/types/object#client)
#### Arguments

---
* ``input`` - [`CreateClientInput!`](/docs/reference/graphql/types/input#create-client-input)
*

**Request**

```graphql
mutation CreateAuthClient($authClientGithub: String!) {
  auth {
    createClient(
      input: {
        principal: $authClientGithub
        name: "Github"
        policies: [
          {
            effect: ALLOW
            actions: [SELECT, INSERT, UPDATE, DELETE]
            resources: ["financial.*"]
            assertions: { isTrue: "true" }
          }
        ]
      }
    ) {
      principal
    }
  }
}
```
**Response**

```json
{
  "data": {
    "auth": {
      "createClient": {
        "principal": "arn:aws:iam::048962233173:user/github.action"
      }
    }
  }
}
```
**Variables**

```json
{
  "authClientGithub": "arn:aws:iam::048962233173:user/github.action"
}
```
### deleteClient
Delete a security client.
#### Resolves to
[`Client`](/docs/reference/graphql/types/object#client)
#### Arguments

---
* ``principal`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Principal to delete.

**Request**

```graphql
mutation DeleteAuthClient($authClientGithub: String!) {
  auth {
    deleteClient(principal: $authClientGithub) {
      principal
    }
  }
}
```
**Response**

```json
{
  "data": {
    "auth": {
      "deleteClient": {
        "principal": "arn:aws:iam::048962233173:user/github.action"
      }
    }
  }
}
```
**Variables**

```json
{
  "authClientGithub": "arn:aws:iam::048962233173:user/github.action"
}
```
### updateClient
Update an existing client by replacing policies.
#### Resolves to
[`Client`](/docs/reference/graphql/types/object#client)
#### Arguments

---
* ``principal`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* Principal of the client to update.
---
* ``input`` - [`UpdateClientInput!`](/docs/reference/graphql/types/input#update-client-input)
* Client fields to update.

**Request**

```graphql
mutation UpdateAuthClient($authClientGithub: String!) {
  auth {
    updateClient(
      principal: $authClientGithub
      input: {
        policies: [
          {
            effect: ALLOW
            actions: [SELECT, INSERT]
            resources: ["financial.*"]
            assertions: { isTrue: "true" }
          }
        ]
      }
    ) {
      policies {
        effect
        actions
        resources
        assertions
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "auth": {
      "updateClient": {
        "policies": [
          {
            "effect": "ALLOW",
            "actions": ["SELECT", "INSERT"],
            "resources": ["financial.*"],
            "assertions": { "isTrue": "true" }
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "authClientGithub": "arn:aws:iam::048962233173:user/github.action"
}
```
## bulk
### cancelExecution
Request cancellation of a running bulk query execution.

Returns immediately with `stopping: true` if a cancellation request was sent.
Note: there is a race condition between requesting cancellation and the execution
completing on its own. The execution may finish (successfully or with an error)
before the cancellation takes effect. Use the `execution` query to poll for the
final status.
#### Resolves to
[`CancelBulkQueryExecutionResult`](/docs/reference/graphql/types/object#cancel-bulk-query-execution-result)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

### execute
#### Resolves to
[`BulkQueryExecution`](/docs/reference/graphql/types/object#bulk-query-execution)
#### Arguments

---
* ``input`` - [`BulkQueryInput`](/docs/reference/graphql/types/input#bulk-query-input)
*

## cards
Mutations in the `cards` namespace are used to initialize card processing transaction codes, including specific implementations like the Lithic card processing webhook.
### initializeCardTransactionCodes
DEPRECATED: Use Lithic workflow in workflow namespace.

Initialize your Twisp instance with Card Processing Transaction Codes. Returns the default settlement account.
#### Resolves to
[`Account!`](/docs/reference/graphql/types/object#account)
#### Arguments

---
* ``input`` - [`CardInitializeInput!`](/docs/reference/graphql/types/input#card-initialize-input)
*

**Request**

```graphql
mutation InitializeCardTransactionCodes($journalGLId: UUID!) {
  cards {
    initializeCardTransactionCodes(input: { journalId: $journalGLId }) {
      accountId
      name
      code
    }
  }
}
```
**Response**

```json
{
  "data": {
    "cards": {
      "initializeCardTransactionCodes": {
        "accountId": "f8c3b0a4-e0f7-4057-aced-7030c0eb918a",
        "name": "Card Settlement Account",
        "code": "Liabilities.Settlement.Card"
      }
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51"
}
```
### postLithicTransaction
DEPRECATED: Use Lithic workflow in workflow namespace.

This mutation supports converting Lithic [Transaction Webhooks JSON](https://docs.lithic.com/docs/transaction-webhooks#schema) into into Twisp accounting core using our card transaction codes.

This mutation supports all lithic transaction webhook payloads, including ASA and Balance Inquiry. The general approach is to post all webhooks to Twisp, utilize the balances that come back for decisioning, and allow Twisp and Lithic to work together to track the state of the authorization/settlement cycle.
#### Resolves to
[`LithicTransactionBalance!`](/docs/reference/graphql/types/object#lithic-transaction-balance)
#### Arguments

---
* ``input`` - [`LithicTransactionInput!`](/docs/reference/graphql/types/input#lithic-transaction-input)
*

## createAccount
Create a new account.
#### Resolves to
[`Account!`](/docs/reference/graphql/types/object#account)
#### Arguments

---
* ``input`` - [`AccountInput!`](/docs/reference/graphql/types/input#account-input)
* Fields to create a new account.

**Request**

```graphql
mutation CreateAccount($accountCardSettlementId: UUID!) {
  createAccount(
    input: {
      accountId: $accountCardSettlementId
      name: "Card Settlement"
      code: "SETTLE.CARD"
      description: "Settlement account for card transactions."
      normalBalanceType: CREDIT
      status: ACTIVE
    }
  ) {
    accountId
    name
    code
    description
    normalBalanceType
  }
}
```
**Response**

```json
{
  "data": {
    "createAccount": {
      "accountId": "a9c8dde6-c0e5-407c-9d99-029c523f7ea8",
      "name": "Card Settlement",
      "code": "SETTLE.CARD",
      "description": "Settlement account for card transactions.",
      "normalBalanceType": "CREDIT"
    }
  }
}
```
**Variables**

```json
{
  "accountCardSettlementId": "a9c8dde6-c0e5-407c-9d99-029c523f7ea8"
}
```
## createAccountSet
Create a new account set.
#### Resolves to
[`AccountSet!`](/docs/reference/graphql/types/object#account-set)
#### Arguments

---
* ``input`` - [`AccountSetInput!`](/docs/reference/graphql/types/input#account-set-input)
* Fields to create a new account set.

**Request**

```graphql
mutation CreateAccountSet($accountSetCustomersId: UUID!, $journalGLId: UUID!) {
  createAccountSet(
    input: {
      accountSetId: $accountSetCustomersId
      journalId: $journalGLId
      name: "Customers"
      description: "All customer wallets."
      normalBalanceType: DEBIT
    }
  ) {
    accountSetId
    name
    description
    code
  }
}
```
**Response**

```json
{
  "data": {
    "createAccountSet": {
      "accountSetId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8",
      "name": "Customers",
      "description": "All customer wallets.",
      "code": "Ke8_GJexQNmYUifxYHtsqIIstZ_OUUg3g5Eq87el_FE"
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
  "accountSetCustomersId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8"
}
```
## createCalculation
Create a calculation, which allows for balances to be customized on dimensions/filters.
#### Resolves to
[`Calculation!`](/docs/reference/graphql/types/object#calculation)
#### Arguments

---
* ``input`` - [`CreateCalculationInput!`](/docs/reference/graphql/types/input#create-calculation-input)
*

**Request**

```graphql
mutation CreateCalculation {
  createCalculation(
    input: {
      calculationId: "5867b5dd-fc69-416c-80f5-62e8a53610d5"
      code: "EFFECTIVE_DATE"
      description: "Track balances per EFFECTIVE_DATE in an account."
      dimensions: [
        { alias: "effectiveDate", value: "context.vars.transaction.effective" }
      ]
      scope: LOCAL
    }
  ) {
    calculationId
    code
    description
    scope
    dimensions {
      alias
      value
    }
  }
}
```
**Response**

```json
{
  "data": {
    "createCalculation": {
      "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5",
      "code": "EFFECTIVE_DATE",
      "description": "Track balances per EFFECTIVE_DATE in an account.",
      "dimensions": [
        {
          "alias": "effectiveDate",
          "value": "context.vars.transaction.effective"
        }
      ],
      "scope": "LOCAL"
    }
  }
}
```

## createJournal
Create a new journal for recording transactions in the ledger.
#### Resolves to
[`Journal!`](/docs/reference/graphql/types/object#journal)
#### Arguments

---
* ``input`` - [`JournalInput!`](/docs/reference/graphql/types/input#journal-input)
* Fields to create a new Journal.

**Request**

```graphql
mutation CreateJournal($journalGLId: UUID!) {
  createJournal(
    input: {
      journalId: $journalGLId
      name: "GL"
      description: "General Ledger"
      status: ACTIVE
    }
  ) {
    journalId
    name
    description
    status
  }
}
```
**Response**

```json
{
  "data": {
    "createJournal": {
      "journalId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
      "name": "GL",
      "description": "General Ledger",
      "status": "ACTIVE"
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51"
}
```
## createTranCode
Create a new transaction code (tran code).
#### Resolves to
[`TranCode!`](/docs/reference/graphql/types/object#tran-code)
#### Arguments

---
* ``input`` - [`TranCodeInput!`](/docs/reference/graphql/types/input#tran-code-input)
* Fields to create a new TranCode.

**Request**

```graphql
mutation CreateTranCode(
  $tcBookTransferId: UUID!
  $journalGLIdExp: Expression!
) {
  createTranCode(
    input: {
      tranCodeId: $tcBookTransferId
      code: "BOOK_TRANSFER"
      description: "Book transfer between two internal accounts."
      metadata: { category: "Internal" }
      params: [
        { name: "crAccount", type: UUID, description: "Account to credit." }
        { name: "drAccount", type: UUID, description: "Account to debit." }
        {
          name: "amount"
          type: DECIMAL
          description: "Amount with decimal, e.g. `1.23`."
        }
        {
          name: "currency"
          type: STRING
          description: "Currency used for transaction."
        }
        {
          name: "effective"
          type: DATE
          description: "Effective date for transaction."
        }
      ]
      vars: { amount2: "decimal('1.00')", amount3: "this.amount2" }
      transaction: {
        journalId: $journalGLIdExp
        effective: "params.effective"
        description: "'Book transfer for $' + string(params.amount)"
      }
      entries: [
        {
          accountId: "params.drAccount"
          units: "params.amount"
          currency: "params.currency"
          entryType: "'BOOK_TRANSFER_DR'"
          direction: "DEBIT"
          layer: "SETTLED"
        }
        {
          accountId: "params.crAccount"
          units: "params.amount"
          currency: "params.currency"
          entryType: "'BOOK_TRANSFER_CR'"
          direction: "CREDIT"
          layer: "SETTLED"
        }
      ]
    }
  ) {
    tranCodeId
  }
}
```
**Response**

```json
{
  "data": {
    "createTranCode": { "tranCodeId": "e0ffa94d-ca03-4ae2-aa69-cbaaa21d3855" }
  }
}
```
**Variables**

```json
{
  "journalGLIdExp": "uuid('822cb59f-ce51-4837-8391-2af3b7a5fc51')",
  "tcBookTransferId": "e0ffa94d-ca03-4ae2-aa69-cbaaa21d3855"
}
```
## createVelocityControl
#### Resolves to
[`VelocityControl!`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``input`` - [`VelocityControlInput!`](/docs/reference/graphql/types/input#velocity-control-input)
*

**Request**

```graphql
mutation CreateVelocityControl {
  createVelocityControl(
    input: {
      velocityControlId: "f6f27892-dfd8-480b-9213-d6adf7ef04ef"
      name: "Example Control"
      description: """
      Example control that rejects transactions unless transaction metadata
      explictly disables enforcement of control.
      """
      condition: "context.vars.transaction.?metadata.disableVelocityControl.orValue(false) == false"
      enforcement: { action: REJECT }
    }
  ) {
    velocityControlId
    name
  }
}
```
**Response**

```json
{
  "data": {
    "createVelocityControl": {
      "velocityControlId": "f6f27892-dfd8-480b-9213-d6adf7ef04ef",
      "name": "Example Control"
    }
  }
}
```

## createVelocityLimit
#### Resolves to
[`VelocityLimit!`](/docs/reference/graphql/types/object#velocity-limit)
#### Arguments

---
* ``input`` - [`VelocityLimitInput!`](/docs/reference/graphql/types/input#velocity-limit-input)
*

**Request**

```graphql
mutation CreateVelocityLimit {
  createVelocityLimit(
    input: {
      velocityLimitId: "370ac19b-a48c-4480-9b1f-18c39d214a0a"
      name: "Example Monthly Limit"
      description: """
      A per month spending limit at the ENCUMBRANCE layer.
      """
      window: [
        { alias: "year", value: "context.vars.transaction.effective.getYear()" }
        {
          alias: "month"
          value: "context.vars.transaction.effective.getMonth()"
        }
      ]
      currency: "USD"
      limit: {
        balance: [
          {
            layer: "ENCUMBRANCE"
            amount: "params.amount"
            normalBalanceType: "DEBIT"
          }
        ]
      }
      params: [
        {
          name: "amount"
          type: DECIMAL
          description: """
          Aggregate spend up to amount per effective month.
          Defaults to $100.00
          """
          default: "100.00"
        }
      ]
      # Add to existing velocity control
      velocityControlIds: ["f6f27892-dfd8-480b-9213-d6adf7ef04ef"]
    }
  ) {
    velocityLimitId
  }
}
```
**Response**

```json
{
  "data": {
    "createVelocityLimit": {
      "velocityLimitId": "370ac19b-a48c-4480-9b1f-18c39d214a0a"
    }
  }
}
```

## deleteAccount
Delete account moves the account state to `LOCKED`. When an account is in LOCKED, prevents entries from being posted to it.
#### Resolves to
[`Account`](/docs/reference/graphql/types/object#account)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
mutation DeleteAccount($accountCustomerBobbyId: UUID!) {
  deleteAccount(id: $accountCustomerBobbyId) {
    accountId
    status
  }
}
```
**Response**

```json
{
  "data": {
    "deleteAccount": {
      "accountId": "ae9d36cb-dcf5-41a9-bc1e-99a1cf56ef5b",
      "status": "LOCKED"
    }
  }
}
```
**Variables**

```json
{
  "accountCustomerBobbyId": "ae9d36cb-dcf5-41a9-bc1e-99a1cf56ef5b"
}
```
## deleteAccountSet
Delete an account set.
#### Resolves to
[`AccountSet`](/docs/reference/graphql/types/object#account-set)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
mutation DeleteAccountSet($accountSetCustomersId: UUID!) {
  deleteAccountSet(id: $accountSetCustomersId) {
    accountSetId
  }
}
```
**Response**

```json
{
  "data": {
    "deleteAccountSet": {
      "accountSetId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8"
    }
  }
}
```
**Variables**

```json
{
  "accountSetCustomersId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8"
}
```
## deleteCalculation
"
Delete calculation sets calculation to `LOCKED`. If in attached scope, must remove all attachments first.
#### Resolves to
[`Calculation`](/docs/reference/graphql/types/object#calculation)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
mutation DeleteCalculation {
  deleteCalculation(id: "5867b5dd-fc69-416c-80f5-62e8a53610d5") {
    calculationId
    status
  }
}
```
**Response**

```json
{
  "data": {
    "deleteCalculation": {
      "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5",
      "status": "LOCKED"
    }
  }
}
```

## deleteJournal
Moves journal into `LOCKED` status. Prevents entries from being posted to the journal.
#### Resolves to
[`Journal`](/docs/reference/graphql/types/object#journal)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
mutation DeleteJournal($journalGLId: UUID!) {
  deleteJournal(id: $journalGLId) {
    journalId
    status
  }
}
```
**Response**

```json
{
  "data": {
    "deleteJournal": {
      "journalId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
      "status": "LOCKED"
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51"
}
```
## deleteTranCode
Moves the tran code into `LOCKED` status. Prevents transactions from posting using this version of tran code.
#### Resolves to
[`TranCode`](/docs/reference/graphql/types/object#tran-code)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
mutation DeleteTranCode($tcBookTransferId: UUID!) {
  deleteTranCode(id: $tcBookTransferId) {
    tranCodeId
    status
  }
}
```
**Response**

```json
{
  "data": {
    "deleteTranCode": {
      "tranCodeId": "e0ffa94d-ca03-4ae2-aa69-cbaaa21d3855",
      "status": "LOCKED"
    }
  }
}
```
**Variables**

```json
{
  "tcBookTransferId": "e0ffa94d-ca03-4ae2-aa69-cbaaa21d3855"
}
```
## deleteVelocityControl
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

## deleteVelocityLimit
#### Resolves to
[`VelocityLimit`](/docs/reference/graphql/types/object#velocity-limit)
#### Arguments

---
* ``velocityLimitId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

## detachCalculation
Removes calculation from attachment.
#### Resolves to
[`AttachedCalculation`](/docs/reference/graphql/types/object#attached-calculation)
#### Arguments

---
* ``input`` - [`DetachCalculationInput!`](/docs/reference/graphql/types/input#detach-calculation-input)
*

**Request**

```graphql
mutation DetachCalculation {
  detachCalculation(
    input: {
      accountId: "260fd651-8819-4f99-9c8a-87d27e03ee4c"
      calculationId: "5867b5dd-fc69-416c-80f5-62e8a53610d5"
      journalId: "822cb59f-ce51-4837-8391-2af3b7a5fc51"
    }
  ) {
    calculationId
  }
}
```
**Response**

```json
{
  "data": {
    "detachCalculation": {
      "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5"
    }
  }
}
```

## detachVelocityControl
detach account from control.
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The Velocity Control to detach.
---
* ``accountId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The account id detaching from.
---
* ``journalId`` - [`UUID`](/docs/reference/graphql/types/scalar#uuid)
* The journal detaching from. If not provided this will detach from default journal.

## evaluate
Evaluate a CEL (common expression language) expression using Twisp's calculation engine. Returns a String representation of the evaluated result.
#### Resolves to
[`Value!`](/docs/reference/graphql/types/scalar#value)
#### Arguments

---
* ``expressions`` - [`ExpressionNestedMap!`](/docs/reference/graphql/types/scalar#expression-nested-map)
* A nested map of literal CEL expressions to be evaluated in a shared context
  Ex: {
    "two": "this.one + 1",
    "one": "2 - 1",
    "sqrt2": "math.Sqrt(double(2))",
    "now": "time.Now()",
    "obj": {
       "foo": "'bar'"
    }
  }
---
* ``document`` - [`Value`](/docs/reference/graphql/types/scalar#value)
* Value object. Similar to the JSON object with support for type coersion

**Request**

```graphql
mutation Cel(
  $id: String! = "uuid.New()" @cel
  $uppercase: String! = "strings.ToUpper(context.vars.lowercase)" @cel
  $expression: String! @cel
  $this: String! = "this.uppercase" @cel
  $nonCEL: String!
  $celNonCEL: String! = "this.nonCEL" @cel
) {
  evaluate(
    expressions: {
      a: "int(1)"
      b: "document.greeting + ' World!'"
      c: "decimal.Sub(decimal('1.234567'), decimal('0.987654321'))"
      d: "math.Max(double(123), double(456))"
      e: "size(string(document.uuid))"
      f: "document.upper"
      g: "document.expr"
      h: "document.this"
      i: "strings.ToUpper(document.celNonCEL)"
      j: "context.auth"
      k: "decimal('-inf')"
      l: "string(decimal('-inf'))"
      m: { n: "document.this" }
      o: "this.m.n"
    }
    document: {
      greeting: "Hello"
      uuid: $id
      upper: $uppercase
      expr: $expression
      this: $this
      nonCEL: $nonCEL
      celNonCEL: $celNonCEL
    }
  )
}
```
**Response**

```json
{
  "data": {
    "evaluate": {
      "a": 1,
      "b": "Hello World!",
      "c": "0.246912679",
      "d": 456,
      "e": 36,
      "f": "JOHN DOE",
      "g": 4,
      "h": "JOHN DOE",
      "i": "NOT CEL",
      "j": {
        "claims": {},
        "policies": [
          {
            "actions": ["*"],
            "effect": 1,
            "resources": ["*"]
          }
        ],
        "principal": "test"
      },
      "k": "-Infinity",
      "l": "-Infinity",
      "m": {
        "n": "JOHN DOE"
      },
      "o": "JOHN DOE"
    }
  }
}
```
**Variables**

```json
{
  "lowercase": "john doe",
  "expression": "2 * 2",
  "nonCEL": "not cel"
}
```
## events
Queries in the `events` namespace retrieve event data, such as webhooks.
### createEndpoint
Create a new endpoint.
#### Resolves to
[`Endpoint!`](/docs/reference/graphql/types/object#endpoint)
#### Arguments

---
* ``input`` - [`EndpointInput!`](/docs/reference/graphql/types/input#endpoint-input)
* Fields to create a new endpoint.

**Request**

```graphql
mutation CreateEndpoint {
  events {
    createEndpoint(
      input: {
        endpointId: "345940ed-2726-4b20-88aa-820857ac0e68"
        status: ENABLED
        endpointType: WEBHOOK
        url: "https://webhook.site/twisp-webhook-test"
        description: "subscribe to balance and account events"
        subscription: ["balance*", "account.*"]
      }
    ) {
      endpointId
      status
      endpointType
      url
      subscription
      description
    }
  }
}
```
**Response**

```json
{
  "data": {
    "events": {
      "createEndpoint": {
        "endpointId": "345940ed-2726-4b20-88aa-820857ac0e68",
        "status": "ENABLED",
        "endpointType": "WEBHOOK",
        "url": "https://webhook.site/twisp-webhook-test",
        "subscription": ["balance*", "account.*"],
        "description": "subscribe to balance and account events"
      }
    }
  }
}
```

### deleteEndpoint
#### Resolves to
[`Endpoint`](/docs/reference/graphql/types/object#endpoint)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.

**Request**

```graphql
mutation DeleteEndpoint {
  events {
    deleteEndpoint(id: "345940ed-2726-4b20-88aa-820857ac0e68") {
      endpointId
      status
      endpointType
      url
      subscription
      description
    }
  }
}
```
**Response**

```json
{
  "data": {
    "events": {
      "deleteEndpoint": {
        "endpointId": "345940ed-2726-4b20-88aa-820857ac0e68",
        "status": "DISABLED",
        "endpointType": "WEBHOOK",
        "url": "https://webhook.site/updated-webhook-test",
        "subscription": ["account.*"],
        "description": "updated status"
      }
    }
  }
}
```

### updateEndpoint
Update fields on an existing account. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Endpoint`](/docs/reference/graphql/types/object#endpoint)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`EndpointUpdateInput!`](/docs/reference/graphql/types/input#endpoint-update-input)
* Fields to update.

**Request**

```graphql
mutation UpdateEndpoint {
  events {
    updateEndpoint(
      id: "345940ed-2726-4b20-88aa-820857ac0e68"
      input: {
        status: DISABLED
        url: "https://webhook.site/updated-webhook-test"
        description: "updated status"
        subscription: ["account.*"]
        filters: { isTrue: "true" }
      }
    ) {
      endpointId
      status
      endpointType
      url
      subscription
      description
      filters
    }
  }
}
```
**Response**

```json
{
  "data": {
    "events": {
      "updateEndpoint": {
        "endpointId": "345940ed-2726-4b20-88aa-820857ac0e68",
        "status": "DISABLED",
        "endpointType": "WEBHOOK",
        "url": "https://webhook.site/updated-webhook-test",
        "subscription": ["account.*"],
        "description": "updated status",
        "filters": {
          "isTrue": "true"
        }
      }
    }
  }
}
```

## files
### createDownload
Create a link to download a file.
#### Resolves to
[`Download`](/docs/reference/graphql/types/object#download)
#### Arguments

---
* ``key`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

**Request**

```graphql
mutation CreateDownload {
  files {
    createDownload(key: "some-file.json") {
      downloadURL
    }
  }
}
```
**Response**

```json
{
  "data": {
    "files": {
      "createDownload": {
        "downloadURL": "http://localhost:8080/files?tenant=REDACTED&key=some-file.json"
      }
    }
  }
}
```

### createUpload
Create a file upload.
#### Resolves to
[`Upload`](/docs/reference/graphql/types/object#upload)
#### Arguments

---
* ``input`` - [`CreateUpload!`](/docs/reference/graphql/types/input#create-upload)
*

## iso8583
### createConfig
Create a configuration for ISO8583 processing. Defines settlement account, journal, and timezone.
#### Resolves to
[`ISO8583Config`](/docs/reference/graphql/types/object#iso8583config)
#### Arguments

---
* ``input`` - [`ISO8583CreateConfigInput!`](/docs/reference/graphql/types/input#iso8583create-config-input)
*

**Request**

```graphql
# Create a journal and settlement account first before creating config
mutation CreateISO8583Config {
  # Create the ISO8583 config
  iso8583 {
    createConfig(
      input: {
        configId: "670504f6-0515-11f0-a441-069b540ea27c"
        journalId: "8b65c8dc-0515-11f0-a441-069b540ea27c"
        settlementAccountId: "779886bc-0515-11f0-aa78-069b540ea27c"
        timeZone: "America/Chicago"
        description: "Primary ISO8583 processor configuration"
        processor: I2C
      }
    ) {
      configId
      journalId
      settlementAccountId
      timeZone
      description
      processor
      version
    }
  }
}
```
**Response**

```json
{
  "data": {
    "iso8583": {
      "createConfig": {
        "configId": "670504f6-0515-11f0-a441-069b540ea27c",
        "journalId": "8b65c8dc-0515-11f0-a441-069b540ea27c",
        "settlementAccountId": "779886bc-0515-11f0-aa78-069b540ea27c",
        "timeZone": "America/Chicago",
        "description": "Primary ISO8583 processor configuration",
        "processor": "I2C",
        "version": 1
      }
    }
  }
}
```

### deleteConfig
Remove configuration.
#### Resolves to
[`ISO8583Config`](/docs/reference/graphql/types/object#iso8583config)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.

### updateConfig
Update configuration for ISO8583 processing.
#### Resolves to
[`ISO8583Config`](/docs/reference/graphql/types/object#iso8583config)
#### Arguments

---
* ``configId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.
---
* ``input`` - [`ISO8583UpdateConfigInput!`](/docs/reference/graphql/types/input#iso8583update-config-input)
*

## kv
Namespace for transactional key/value mutations.
### delete
Delete a KV record by its `(namespace, key)` natural key.

Optional `conditions` run against the current record, with `document`
and `value` bound to it — or `null` when no record exists. The delete
proceeds only if all conditions evaluate to `true`.
#### Resolves to
[`KVValue`](/docs/reference/graphql/types/object#kvvalue)
#### Arguments

---
* ``namespace`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
---
* ``key`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
---
* ``conditions`` - [`ExpressionMap`](/docs/reference/graphql/types/scalar#expression-map)
* A map of literal CEL expressions to be evaluated in a shared context
  Ex: {
    "two": "this.one + 1",
    "one": "2 - 1",
    "sqrt2": "math.Sqrt(double(2))",
    "now": "time.Now()"
  }

**Request**

```graphql
mutation DeleteKv {
  kv {
    delete(namespace: "flags", key: "feature-a") {
      namespace
      key
      description
      value
    }
  }
}
```
**Response**

```json
{
  "data": {
    "kv": {
      "delete": {
        "namespace": "flags",
        "key": "feature-a",
        "description": "feature flag a",
        "value": {
          "enabled": false,
          "rollout": 50,
          "owner": "risk"
        }
      }
    }
  }
}
```

### put
Create or replace a KV record. Writes a new version on every call.

Limits:
- `namespace`: max 512 UTF-8 bytes
- `key`: max 512 UTF-8 bytes
- persisted payload (`description` + serialized `value`): max 256 KiB
#### Resolves to
[`KVValue!`](/docs/reference/graphql/types/object#kvvalue)
#### Arguments

---
* ``input`` - [`KVPutInput!`](/docs/reference/graphql/types/input#kvput-input)
*

**Request**

```graphql
mutation PutKv {
  kv {
    put(
      input: {
        namespace: "flags"
        key: "feature-a"
        description: "feature flag a"
        value: { enabled: true, rollout: 25, owner: "risk" }
      }
    ) {
      namespace
      key
      description
      value
      version
    }
  }
}
```
**Response**

```json
{
  "data": {
    "kv": {
      "put": {
        "namespace": "flags",
        "key": "feature-a",
        "description": "feature flag a",
        "value": {
          "enabled": true,
          "rollout": 25,
          "owner": "risk"
        },
        "version": 1
      }
    }
  }
}
```

### update
Evaluate an expression value against the existing KV `value` and merge the
result in using RFC 7396 semantics. String leaves are CEL expressions;
non-string leaves are literal patch values. `value` and `document` in the
expression context both refer to the existing KV `value`.

Fails with NOT_FOUND when no record exists for `(namespace, key)`.
#### Resolves to
[`KVValue!`](/docs/reference/graphql/types/object#kvvalue)
#### Arguments

---
* ``input`` - [`KVUpdateInput!`](/docs/reference/graphql/types/input#kvupdate-input)
*

**Request**

```graphql
mutation UpdateKv {
  kv {
    update(
      input: {
        namespace: "flags"
        key: "feature-a"
        expressions: { enabled: false, rollout: "value.rollout + 25" }
        conditions: { current_rollout: "document.value.rollout == 25" }
      }
    ) {
      namespace
      key
      description
      value
      version
      conditions
    }
  }
}
```
**Response**

```json
{
  "data": {
    "kv": {
      "update": {
        "namespace": "flags",
        "key": "feature-a",
        "description": "feature flag a",
        "value": {
          "enabled": false,
          "rollout": 50,
          "owner": "risk"
        },
        "version": 2,
        "conditions": {
          "current_rollout": "document.value.rollout == 25"
        }
      }
    }
  }
}
```

## postTransaction
Write a transaction to the ledger using the predefined defaults from the `tranCode` provided.
#### Resolves to
[`Transaction!`](/docs/reference/graphql/types/object#transaction)
#### Arguments

---
* ``input`` - [`TransactionInput!`](/docs/reference/graphql/types/input#transaction-input)
* Fields to post a new Transaction.

**Request**

```graphql
mutation PostTransaction(
  $accountCustomerAliciaId: UUID!
  $accountCustomerBobbyId: UUID!
) {
  postTransaction(
    input: {
      transactionId: "6b5e47b6-60d2-49bf-8210-0e4c3dd3ec68"
      tranCode: "BOOK_TRANSFER"
      params: {
        crAccount: $accountCustomerAliciaId
        drAccount: $accountCustomerBobbyId
        amount: "1.00"
        currency: "USD"
        effective: "2022-09-08"
      }
    }
  ) {
    transactionId
  }
}
```
**Response**

```json
{
  "data": {
    "postTransaction": {
      "transactionId": "6b5e47b6-60d2-49bf-8210-0e4c3dd3ec68"
    }
  }
}
```
**Variables**

```json
{
  "accountCustomerAliciaId": "260fd651-8819-4f99-9c8a-87d27e03ee4c",
  "accountCustomerBobbyId": "ae9d36cb-dcf5-41a9-bc1e-99a1cf56ef5b"
}
```
## queries
#### Resolves to
[`Query!`](/docs/reference/graphql/types/object#query)
#### Arguments

## removeAllLimitsFromControl
Remove all limits from the velocity control.
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The control to remove from.

## removeFromAccountSet
Remove a member from a set.
#### Resolves to
[`AccountSet!`](/docs/reference/graphql/types/object#account-set)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier for set.
---
* ``member`` - [`AccountSetMemberInput!`](/docs/reference/graphql/types/input#account-set-member-input)
* Account or AccountSet to add as a member of this set.

## removeLimitFromControl
Remove a single limit from control.
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The control to remove from.
---
* ``velocityLimitId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* The velocity limit to remove.

## scheduler
Mutations in the `scheduler` namespace are used to manage scheduled jobs
### createSchedule
#### Resolves to
[`Schedule`](/docs/reference/graphql/types/object#schedule)
#### Arguments

---
* ``input`` - [`CreateScheduleInput!`](/docs/reference/graphql/types/input#create-schedule-input)
* Fields to create a new schedule.

## schema
Mutations in the `schema` namespace are used to manage custom indexes, aggregates, and historical indexes. Use the `schema` namespace to create and delete indexes and aggregates.
### createHistoricalIndex
Create a custom index for querying all versions of records' histories.

Because the Twisp FLDB is an [immutable, append-only data store](https://www.twisp.com/docs/infrastructure/ledger-database#append-only-immutability), changing the data within any record results in a new version of that record, leaving the original version intact in history.

While regular indexes (such as those created by the `schema.createIndex` mutation) will index the most recent version of records, a historical index will index every version. This allows for defining sophisticated indexes to enable queries such as:

- Retrieving account balances when the balance amount was negative.
- Finding records' state when a particular value is set in their metadata.
- Pulling time-delimited sets of balance activity.

Partitions on historical indexes will by definition be larger than their equivalent partitions for regular indexes as they will contain not just the latest version of a record but also every previous version.
#### Resolves to
[`Index!`](/docs/reference/graphql/types/object#index)
#### Arguments

---
* ``input`` - [`CreateIndexInput!`](/docs/reference/graphql/types/input#create-index-input)
*

### createIndex
Create a custom index for querying records. Currently available for indexing Account, AccountSet, Balance, Entry, Transaction, and TranCode record types.

To query the index, use the `CUSTOM` index type for the applicable resource query and supply the filter inputs specified by the index.

Custom indexes can be created using fields on the root level of the record like `Account.modified` as well as nested fields within documents like the `metadata` object.

Depending on the parameters defined, custom indexes may be structured to return a single record or a sorted list of records.

Note that due to the scaling properties of the underlying database, a single partition supports a fixed amount of read bandwidth and individual write operations per second. Beyond that threshold, throttling will occur. Visit scaling properties for more information.

When designing custom indexes, care must be taken to ensure that reads and writes are spread across a sufficient number of partitions to support peak workloads. In practice, partitioning by account is usually sufficient. Our technical support staff is available for guidance on partition design patterns at [support@twisp.com](mailto:support@twisp.com).

To learn more about indexes within the Twisp FLDB, see [Index-First Design](https://www.twisp.com/docs/infrastructure/ledger-database#index-first-design) in the docs.
#### Resolves to
[`Index!`](/docs/reference/graphql/types/object#index)
#### Arguments

---
* ``input`` - [`CreateIndexInput!`](/docs/reference/graphql/types/input#create-index-input)
*

**Request**

```graphql
mutation SchemaCreateIndex {
  schema {
    createIndex(
      input: {
        name: "Transaction.metadata.category"
        on: Transaction
        unique: false
        partition: [
          { alias: "correlation_id", value: "document.correlation_id" }
        ]
        sort: [
          {
            alias: "category"
            value: "string(document.metadata.category)"
            sort: ASC
          }
        ]
        constraints: { hasCategory: "has(document.metadata.category)" }
      }
    ) {
      range {
        alias
        value
        sort
      }
      partition {
        alias
        value
      }
      on
      constraints
      unique
    }
  }
}
```
**Response**

```json
{
  "data": {
    "schema": {
      "createIndex": {
        "range": [
          {
            "alias": "category",
            "value": "string(document.metadata.category)",
            "sort": "ASC"
          }
        ],
        "partition": [
          { "alias": "correlation_id", "value": "document.correlation_id" }
        ],
        "on": "Transaction",
        "constraints": { "hasCategory": "has(document.metadata.category)" },
        "unique": false
      }
    }
  }
}
```

### createSearchIndex
Create a search index for full text search support.

Full text search indexes are powered by opensearch. These indexes are
eventually consistent (populated by the async materializer after the source
write commits), but have the ability to execute complex queries utilizing
the opensearch indexing engine.

An explicit `opensearchSchema` is required — it declares the Opensearch field
types for the indexed documents and keeps sort/filter/cursor behavior stable.
#### Resolves to
[`Index!`](/docs/reference/graphql/types/object#index)
#### Arguments

---
* ``input`` - [`CreateSearchIndexInput!`](/docs/reference/graphql/types/input#create-search-index-input)
*

### createView
Create an view for a set of source tables.

Views are materialized views that are defined by a CEL-expression map and get triggered by changes to one or more source tables.
They allow for creating denormalized data structures that are automatically updated whenever source data changes.

Each view has:
- A document schema defined as a map of CEL expressions
- Source table(s) that trigger updates to the view
- Optional dimension(s) for partitioning and uniqueness constraints
- Optional filters that determine when the view should be updated

When source data changes, the view is automatically recalculated based on the provided CEL expressions.
#### Resolves to
[`View!`](/docs/reference/graphql/types/object#view)
#### Arguments

---
* ``input`` - [`CreateViewInput!`](/docs/reference/graphql/types/input#create-view-input)
* Input for creating a new view materialized view.

### deleteIndex
Delete an existing index. When `on: View`, `viewName` must be
supplied to identify the target view.
#### Resolves to
[`Index`](/docs/reference/graphql/types/object#index)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
---
* ``on`` - [`IndexOnEnum!`](/docs/reference/graphql/types/enum#index-on-enum)
* Record types which support custom indexes.
---
* ``viewName`` - [`String`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

**Request**

```graphql
mutation SchemaDeleteIndex {
  schema {
    deleteIndex(name: "Transaction.metadata.category", on: Transaction) {
      name
      on
    }
  }
}
```
**Response**

```json
{
  "data": {
    "schema": {
      "deleteIndex": {
        "name": "Transaction.metadata.category",
        "on": "Transaction"
      }
    }
  }
}
```

### deleteView
Delete an existing view.
#### Resolves to
[`View`](/docs/reference/graphql/types/object#view)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

### updateSearchIndex
Update a search index
#### Resolves to
[`Index`](/docs/reference/graphql/types/object#index)
#### Arguments

---
* ``name`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
---
* ``on`` - [`IndexOnEnum!`](/docs/reference/graphql/types/enum#index-on-enum)
* Record types which support custom indexes.
---
* ``opensearchSchema`` - [`OpensearchSchemaInput!`](/docs/reference/graphql/types/input#opensearch-schema-input)
*

## updateAccount
Update fields on an existing account. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Account!`](/docs/reference/graphql/types/object#account)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`AccountUpdateInput!`](/docs/reference/graphql/types/input#account-update-input)
* Fields to update.

**Request**

```graphql
mutation UpdateAccount($accountCardSettlementId: UUID!) {
  updateAccount(id: $accountCardSettlementId, input: { code: "CARD.SETTLE" }) {
    accountId
    code
    history(first: 2) {
      nodes {
        version
        code
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "updateAccount": {
      "accountId": "a9c8dde6-c0e5-407c-9d99-029c523f7ea8",
      "code": "CARD.SETTLE",
      "history": {
        "nodes": [
          { "version": 2, "code": "CARD.SETTLE" },
          { "version": 1, "code": "SETTLE.CARD" }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "accountCardSettlementId": "a9c8dde6-c0e5-407c-9d99-029c523f7ea8"
}
```
## updateAccountSet
Update fields on an existing account set. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`AccountSet!`](/docs/reference/graphql/types/object#account-set)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`AccountSetUpdateInput!`](/docs/reference/graphql/types/input#account-set-update-input)
* Fields to update.

**Request**

```graphql
mutation UpdateAccountSet($accountSetCustomersId: UUID!) {
  updateAccountSet(
    id: $accountSetCustomersId
    input: { name: "Customer Wallets", code: "CUSTOMERS.WALLETS" }
  ) {
    accountSetId
    name
    code
    history(first: 2) {
      nodes {
        version
        name
        code
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "updateAccountSet": {
      "accountSetId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8",
      "name": "Customer Wallets",
      "code": "CUSTOMERS.WALLETS",
      "history": {
        "nodes": [
          {
            "version": 3,
            "name": "Customer Wallets",
            "code": "CUSTOMERS.WALLETS"
          },
          {
            "version": 2,
            "name": "Customers",
            "code": "Ke8_GJexQNmYUifxYHtsqIIstZ_OUUg3g5Eq87el_FE"
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "accountSetCustomersId": "29ef3f18-97b1-40d9-9852-27f1607b6ca8"
}
```
## updateCalculation
Update fields on an existing calculation.
#### Resolves to
[`Calculation!`](/docs/reference/graphql/types/object#calculation)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`CalculationUpdateInput!`](/docs/reference/graphql/types/input#calculation-update-input)
* Fields to update.

**Request**

```graphql
mutation UpdateCalculation {
  updateCalculation(
    id: "5867b5dd-fc69-416c-80f5-62e8a53610d5"
    input: {
      code: "EFFECTIVE_DATE_LOCAL"
      description: "Track balances per EFFECTIVE_DATE locally in an account."
    }
  ) {
    calculationId
    code
    description
  }
}
```
**Response**

```json
{
  "data": {
    "updateCalculation": {
      "calculationId": "5867b5dd-fc69-416c-80f5-62e8a53610d5",
      "code": "EFFECTIVE_DATE_LOCAL",
      "description": "Track balances per EFFECTIVE_DATE locally in an account."
    }
  }
}
```

## updateEntry
Update an existing ledger entry. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Entry!`](/docs/reference/graphql/types/object#entry)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`EntryUpdateInput!`](/docs/reference/graphql/types/input#entry-update-input)
* Entry fields to update.

## updateJournal
Update an existing journal. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Journal!`](/docs/reference/graphql/types/object#journal)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`JournalUpdateInput!`](/docs/reference/graphql/types/input#journal-update-input)
* Journal fields to update.

**Request**

```graphql
mutation UpdateJournal($journalGLId: UUID!) {
  updateJournal(
    id: $journalGLId
    input: { description: "_The_ ledger. The only one." }
  ) {
    journalId
    description
    history(first: 2) {
      nodes {
        version
        description
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "updateJournal": {
      "journalId": "822cb59f-ce51-4837-8391-2af3b7a5fc51",
      "description": "_The_ ledger. The only one.",
      "history": {
        "nodes": [
          { "version": 2, "description": "_The_ ledger. The only one." },
          { "version": 1, "description": "General Ledger" }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "journalGLId": "822cb59f-ce51-4837-8391-2af3b7a5fc51"
}
```
## updateTranCode
Update an existing tran code. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`TranCode!`](/docs/reference/graphql/types/object#tran-code)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`TranCodeUpdateInput!`](/docs/reference/graphql/types/input#tran-code-update-input)
* TranCode fields to update.

**Request**

```graphql
mutation UpdateTranCode($tcBookTransferId: UUID!) {
  updateTranCode(
    id: $tcBookTransferId
    input: {
      description: "Book transfer between two customer wallet accounts."
      vars: { hello: "string('world')" }
      entries: [
        {
          accountId: "params.drAccount"
          units: "params.amount"
          currency: "params.currency"
          entryType: "'BOOK_TRANSFER_DR'"
          direction: "DEBIT"
          layer: "SETTLED"
          metadata: "{'first': 1}"
        }
        {
          accountId: "params.crAccount"
          units: "params.amount"
          currency: "params.currency"
          entryType: "'BOOK_TRANSFER_CR'"
          direction: "CREDIT"
          layer: "SETTLED"
          metadata: "{'second':2}"
        }
      ]
    }
  ) {
    tranCodeId
    description
    entries {
      metadata
    }
    vars
    history(first: 2) {
      nodes {
        version
        description
        vars
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "updateTranCode": {
      "tranCodeId": "e0ffa94d-ca03-4ae2-aa69-cbaaa21d3855",
      "description": "Book transfer between two customer wallet accounts.",
      "entries": [
        {
          "metadata": "{'first': 1}"
        },
        {
          "metadata": "{'second':2}"
        }
      ],
      "vars": {
        "amount2": "decimal('1.00')",
        "amount3": "this.amount2",
        "hello": "string('world')"
      },
      "history": {
        "nodes": [
          {
            "version": 2,
            "description": "Book transfer between two customer wallet accounts.",
            "vars": {
              "amount2": "decimal('1.00')",
              "amount3": "this.amount2",
              "hello": "string('world')"
            }
          },
          {
            "version": 1,
            "description": "Book transfer between two internal accounts.",
            "vars": {
              "amount2": "decimal('1.00')",
              "amount3": "this.amount2"
            }
          }
        ]
      }
    }
  }
}
```
**Variables**

```json
{
  "tcBookTransferId": "e0ffa94d-ca03-4ae2-aa69-cbaaa21d3855"
}
```
## updateTransaction
Update an existing transaction. To ensure data integrity, only a subset of fields are allowed.
#### Resolves to
[`Transaction!`](/docs/reference/graphql/types/object#transaction)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``input`` - [`TransactionUpdateInput!`](/docs/reference/graphql/types/input#transaction-update-input)
* Transaction fields to update.

**Request**

```graphql
mutation UpdateTransaction {
  updateTransaction(
    id: "6b5e47b6-60d2-49bf-8210-0e4c3dd3ec68"
    input: { metadata: { reconciled: true } }
  ) {
    transactionId
    metadata
    history(first: 2) {
      nodes {
        version
        metadata
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "updateTransaction": {
      "transactionId": "6b5e47b6-60d2-49bf-8210-0e4c3dd3ec68",
      "metadata": { "reconciled": true },
      "history": {
        "nodes": [
          { "version": 2, "metadata": { "reconciled": true } },
          { "version": 1, "metadata": {} }
        ]
      }
    }
  }
}
```

## updateVelocityControl
#### Resolves to
[`VelocityControl`](/docs/reference/graphql/types/object#velocity-control)
#### Arguments

---
* ``velocityControlId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.
---
* ``input`` - [`UpdateVelocityControlInput!`](/docs/reference/graphql/types/input#update-velocity-control-input)
*

## updateVelocityLimit
#### Resolves to
[`VelocityLimit`](/docs/reference/graphql/types/object#velocity-limit)
#### Arguments

---
* ``velocityLimitId`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* 128-bit universally unique identifier (UUID). Used for most ID fields on records.
---
* ``input`` - [`UpdateVelocityLimitInput!`](/docs/reference/graphql/types/input#update-velocity-limit-input)
*

## voidTransaction
Void an existing transaction.
#### Resolves to
[`Transaction`](/docs/reference/graphql/types/object#transaction)
#### Arguments

---
* ``id`` - [`UUID!`](/docs/reference/graphql/types/scalar#uuid)
* Unique identifier.
---
* ``properties`` - [`VoidTransactionPropertiesInput`](/docs/reference/graphql/types/input#void-transaction-properties-input)
*

**Request**

```graphql
mutation VoidTransaction($transactionId: UUID!) {
  voidTransaction(id: $transactionId) {
    transactionId
    voidOf
  }
}
```
**Response**

```json
{
  "data": {
    "voidTransaction": {
      "transactionId": "61a31b31-51d3-54e1-8420-f2c0d953adc5",
      "voidOf": "6b5e47b6-60d2-49bf-8210-0e4c3dd3ec68"
    }
  }
}
```
**Variables**

```json
{
  "transactionId": "6b5e47b6-60d2-49bf-8210-0e4c3dd3ec68"
}
```
## warehouse
Mutations in the `warehouse` namespace are used to manage the twisp data warehouse.
### batchExecuteStatement
#### Resolves to
[`BatchExecuteStatementOutput`](/docs/reference/graphql/types/object#batch-execute-statement-output)
#### Arguments

---
* ``input`` - [`BatchExecuteStatementInput!`](/docs/reference/graphql/types/input#batch-execute-statement-input)
*

### cancelStatement
#### Resolves to
[`CancelStatementOutput`](/docs/reference/graphql/types/object#cancel-statement-output)
#### Arguments

---
* ``input`` - [`CancelStatementInput!`](/docs/reference/graphql/types/input#cancel-statement-input)
*

### executeStatement
#### Resolves to
[`ExecuteStatementOutput`](/docs/reference/graphql/types/object#execute-statement-output)
#### Arguments

---
* ``input`` - [`ExecuteStatementInput!`](/docs/reference/graphql/types/input#execute-statement-input)
*

### executeStatementSync
#### Resolves to
[`ExecuteStatementSyncOutput`](/docs/reference/graphql/types/object#execute-statement-sync-output)
#### Arguments

---
* ``input`` - [`ExecuteStatementSyncInput!`](/docs/reference/graphql/types/input#execute-statement-sync-input)
*

**Request**

```graphql
mutation uuid_formatting {
  warehouse {
    executeStatementSync(
      input: {
        sql: "select accountid, from_varbyte(accountid, 'hex') as uuid from account_history limit 1"
      }
    ) {
      records {
        fields {
          value {
            str
          }
        }
      }
      columnMetadata {
        name
      }
    }
  }
}
```
**Response**

```json
{
  "data": {
    "warehouse": {
      "executeStatementSync": {
        "records": [
          {
            "fields": [
              {
                "value": {
                  "str": "6BEVvBrRTiGFH4MlyyzHTQ=="
                }
              },
              {
                "value": {
                  "str": "e81115bc1ad14e21851f8325cb2cc74d"
                }
              }
            ]
          }
        ],
        "columnMetadata": [
          {
            "name": "accountid"
          },
          {
            "name": "uuid"
          }
        ]
      }
    }
  }
}
```

### export
#### Resolves to
[`Export!`](/docs/reference/graphql/types/object#export)
#### Arguments

---
* ``input`` - [`ExportInput!`](/docs/reference/graphql/types/input#export-input)
*

## workflow
Mutations in the `workflow` namespace are used to manage and execute workflows.
### execute
Execute a workflow identified by `workflowId`.
#### Resolves to
[`WorkflowExecution!`](/docs/reference/graphql/types/object#workflow-execution)
#### Arguments

---
* ``input`` - [`WorkflowInput!`](/docs/reference/graphql/types/input#workflow-input)
* Fields to execute a new workflow.

### executeTask
Execution workflow identified by `workflowId` and `executionId` to the state identified by `task`.
#### Resolves to
[`WorkflowExecution!`](/docs/reference/graphql/types/object#workflow-execution)
#### Arguments

---
* ``input`` - [`WorkflowInput!`](/docs/reference/graphql/types/input#workflow-input)
* Fields to execute a new workflow.
