> For the complete documentation index, see [llms.txt](https://developer.flash-payments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.flash-payments.com/moving-funds/senders.md).

# Senders

CRUD queries for your payment senders

We are legally obliged to collect the actual sender details. Please, do not send us the details of an intermediate organisation such as an exchange, bank or gateway.

If you want to receive funds from yourself then please provide your own details. See the DOCS in [Playground](https://api.uat.flash-payments.com.au/) for other sender details options.

* `sender` and `senders` queries - **read** your address book.
* `createSender` - **creates** a new record in the Flash Payments database.
* `updateSender` - **updates** an existing sender.
* `deleteSender` - **deletes** an existing sender.

#### Query single sender

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: "59f2733f2519e236edab0efe",
  },
  query: `
query ($input: ID) {
  sender(id: $input) {
    email firstName lastName companyName
    address {
      country
    }
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
query($input: ID) {
  sender(id: $input) {
    email
    firstName
    lastName
    companyName
    address {
      country
    }
    # there are many other properties
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "input": "59f2733f2519e236edab0efe"
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "sender": {
      "email": "john@example.com",
      "firstName": "John",
      "lastName": "Smith",
      "companyName": null,
      "address": {
        "country": "GB"
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### Query multiple senders

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: {
      email: "john@example.com",
    },
  },
  query: `
query ($input: RecipientQueryInput!) {
  senders(input: $input) {
    email firstName lastName companyName
    address {
      country
    } 
  } 
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
query($input: SenderQueryInput!) {
  senders(input: $input) {
    email
    firstName
    lastName
    companyName
    address {
      country
    }
    # there are many other properties
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "input": {
    "email": "john@example.com" 
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "senders": [
      {
        "email": "john@example.com",
        "firstName": "John",
        "lastName": "Smith",
        "companyName": null,
        "address": {
          "country": "GB"
        }
      },
      {
        "email": "john@example.com",
        "firstName": null,
        "lastName": null,
        "companyName": "Acme Inc",
        "address": {
          "country": "US"
        }
      },
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Create a sender

{% hint style="info" %}
In addresses the `suburb` field is an Australian suburb. For other countries you should put the city (e.g. Manila or London) or any other small administrative area name.

If you find it technically challenging to submit all components of the sender’s address, we would appreciate it if you could at least collect the sender’s country along with a complete address string that includes the postcode and put them into the `country` and `street` fields, respectively. In this case, you can skip the `postcode`, `suburb`, and `state` fields, and the sender record will still be created.

Please note that the `street` field is mandatory for Australian addresses.
{% endhint %}

{% hint style="info" %}
The date of birth (`dob`) is not mandatory. However, if it is not provided, your transactions may undergo additional compliance reviews, which can lead to longer processing times—potentially several hours or days instead of seconds. Please also be aware that this may result in additional fees to cover the extra effort involved.
{% endhint %}

#### Create an Individual sender

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: {
      firstName: "Malcolm",
      lastName: "Jez",
      dob: "2000-01-01",
      email: "malcolm@example.com",
      mobile: "+61 4123456789",
      address: {
        street: "1 Test St",
        suburb: "London",
        state: "TST",
        country: "GB",
        postcode: "2000",
      },
      idDoc: {
        type: "passport",
        docNumber: "GB1234321",
        issuer: "His Majesty’s Passport Office (HMPO)",
        issueDate: "1990-01-01",
        expiryDate: "2045-01-01",
        country: "GB",
      },
    },
  },
  query: `
mutation ($input: SenderInput!) {
  createSender(input: $input) {
    success code message
    sender {
      id nickName
    }
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
mutation($input: SenderInput!) {
  createSender(input: $input) {
    success code message
    sender {
      id 
      nickName
      # there are many other properties
    }
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "input": {
    "firstName": "Malcolm",
    "lastName": "Jez",
    "dob": "2000-01-01",
    "email": "malcolm@example.com",
    "mobile": "+61 4123456789", 
    "address": {
      "street": "1 Test St", 
      "suburb": "London", 
      "state": "TST", 
      "country": "GB", 
      "postcode": "2000"
    },
    "idDoc": {
      "type": "passport", 
      "docNumber": "GB1234321", 
      "issuer": "His Majesty’s Passport Office (HMPO)", 
      "issueDate": "1990-01-01", 
      "expiryDate": "2045-01-01", 
      "country": "GB"
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "createSender": {
      "success": true,
      "code": "CREATED",
      "message": "New sender created",
      "sender": {
        "id": "686393e689c1fb1b255cac5c",
        "nickName": "MalcolmJez"
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### Create a Company sender

{% hint style="info" %}
A `company` sender can also carry an optional `orgType`, its legal structure: `COMPANY`, `TRUST`, `PARTNERSHIP` or `SOLE_TRADER`. When sent, `companyName` is required. For a `SOLE_TRADER`, `companyName` is the person's own full name and `tradingAsName` the business name, if any. The value is returned on the `Sender`, including the sender copy inside a `Withdrawal` or `Payment`. The values are the same as for sub-clients.
{% endhint %}

{% hint style="info" %}
For `company` senders you can also tell us who owns and controls the business. Please see [Sender principals](/moving-funds/senders/sender-principals.md). Optional for now.&#x20;
{% endhint %}

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: {
      companyName: "Acme Pte Ltd",
      orgType: "COMPANY", 
      website: "acme.com",
      businessNumber: "12345678912",
      email: "acme@example.com",
      mobile: "+61 4123456789",
      address: {
        street: "1 Test St",
        suburb: "London",
        state: "TST",
        country: "GB",
        postcode: "2000",
      },
      idDoc: {
        type: "certificateOfRegistration",
        docNumber: "GB-REG-987654321",
        issuer: "Companies House",
        issueDate: "1990-01-01",
        expiryDate: "2100-01-01",
        country: "GB",
      },
    },
  },
  query: `
mutation ($input: SenderInput!) {
  createSender(input: $input) {
    success code message 
    sender { 
      id nickName orgType website
    }  
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
mutation($input: SenderInput!) {
  createSender(input: $input) {
    success code message
    sender {
      id 
      nickName
      orgType
      website
      # there are many other properties
    }
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "input": {
    "companyName": "Acme Pte Ltd", 
    "orgType": "COMPANY", 
    "website": "acme.com",
    "businessNumber": "12345678912", 
    "email": "acme@example.com", 
    "mobile": "+61 4123456789", 
    "address": {
      "street": "1 Test St", 
      "suburb": "London", 
      "state": "TST", 
      "country": "GB", 
      "postcode": "2000"
    },
    "idDoc": {
      "type": "certificateOfRegistration", 
      "docNumber": "GB-REG-987654321", 
      "issuer": "Companies House", 
      "issueDate": "1990-01-01", 
      "expiryDate": "2100-01-01", 
      "country": "GB"
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```
{
  "data": {
    "createSender": {
      "success": true,
      "code": "CREATED",
      "message": "New sender created",
      "sender": {
        "id": "68638e6989c1fb1b255ca9c3",
        "nickName": "Acme Pte L",
        "orgType": "COMPANY",
        "website": "acme.com"
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### Update sender

{% hint style="info" %}
To add, change or remove a company sender's principals, send the complete `principals` list together with the sender's `companyName` and `address` - see [Updating sender principals](/moving-funds/senders/sender-principals.md#updating-sender-principals).\
\
`orgType` is set or changed the same way, sent together with `companyName`. A sender updated to an individual loses it.
{% endhint %}

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: {
      firstName: "Malcolm",
      lastName: "Jez The Second",
      dob: "2000-01-01",
      email: "malcolm@example.com",
      mobile: "+61 4123456789",
      address: {
        street: "1 Test St",
        suburb: "London",
        state: "TST",
        country: "GB",
        postcode: "2000",
      },
    },
  },
  query: `
mutation ($id: ID, $input: SenderInput!) {
  updateSender(id: $id, input: $input) {
    success code message
    sender {
      id lastName
    }
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
mutation($id: ID, $input: SenderInput!) {
  updateSender(id: $id, input: $input) {
    success code message
    sender {
      id 
      lastName
      # there are many other properties
    }
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "id": "686393e689c1fb1b255cac5c",
  "input": {
    "firstName": "Malcolm",
    "lastName": "Jez The Second",
    "dob": "2000-01-01",
    "email": "malcolm@example.com",
    "mobile": "+61 4123456789", 
    "address": {
      "street": "1 Test St", 
      "suburb": "London", 
      "state": "TST", 
      "country": "GB", 
      "postcode": "2000"
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "updateSender": {
      "success": true,
      "code": "UPDATED",
      "message": "Sender 686393e689c1fb1b255cac5c updated.",
      "sender": {
        "id": "686393e689c1fb1b255cac5c",
        "lastName": "Jez The Second"
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### Delete sender

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: "686393e689c1fb1b255cac5c",
  },
  query: `
mutation ($input: ID) {
  deleteSender(id: $input) {
    success code message
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
mutation($input: ID) {
  deleteSender(id: $input) {
    success 
    code 
    message
    # there are many other properties
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```
{
  "input": "686393e689c1fb1b255cac5c"
}

```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "deleteSender": {
      "success": true,
      "code": "SUCCESS",
      "message": "Sender deleted"
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.flash-payments.com/moving-funds/senders.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
