# Deposit account tokens into a vault

`POST /v3-node-0/smartaccount/self-deposit`

Moves an asset held by a deployed smart account into its vault, authorised by a user key registered in that account

## Authorization



## Parameters



## Request body · Trading.adapter.UserSelfDepositMessage

application/json · required

Signed self-deposit intent

Schema: Trading.adapter.UserSelfDepositMessage

Type: object

Required fields: message, publicKey, signature, smartAccount

Required field types: message (string; required), publicKey (string; required), signature (string; required), smartAccount (string; required)

- message (string; required)

message example: string

message.Type: string

- publicKey (string; required)

publicKey example: string

publicKey.Type: string

- signature (string; required)

signature example: string

signature.Type: string

- smartAccount (string; required)

smartAccount example: string

smartAccount.Type: string

Example



```json
{
  "message": "string",
  "publicKey": "string",
  "signature": "string",
  "smartAccount": "string"
}
```

## Example · cURL

```bash
curl --request POST 'https://api.storm.tg/v3-node-0/smartaccount/self-deposit' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "message": "string",
  "publicKey": "string",
  "signature": "string",
  "smartAccount": "string"
}'
```

## Example · JavaScript

```javascript
const response = await fetch("https://api.storm.tg/v3-node-0/smartaccount/self-deposit", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: "{\n  \"message\": \"string\",\n  \"publicKey\": \"string\",\n  \"signature\": \"string\",\n  \"smartAccount\": \"string\"\n}",
});
console.log(response.status, await response.text());
```

## Example · Python

```python
import requests

response = requests.request(
    "POST",
    "https://api.storm.tg/v3-node-0/smartaccount/self-deposit",
    headers={"Accept":"application/json","Content-Type":"application/json"},
    data="{\n  \"message\": \"string\",\n  \"publicKey\": \"string\",\n  \"signature\": \"string\",\n  \"smartAccount\": \"string\"\n}",
    timeout=30,
)
print(response.status_code, response.text)
```

## Response 200 · Trading.api.SelfDepositResponse

**200** application/json — OK

Schema: Trading.api.SelfDepositResponse

Type: object

Required fields: none

- amount (string; optional)

amount example: string

amount.Type: string

- createdAt (integer; optional)

createdAt example: 0

createdAt.Type: integer

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

- ok (boolean; optional)

ok example: true

ok.Type: boolean

- queryId (integer; optional)

queryId example: 0

queryId.Type: integer

- replaySlot (integer; optional)

replaySlot example: 0

replaySlot.Type: integer

- txHash (string; optional)

txHash example: string

txHash.Type: string

Example



```json
{
  "amount": "string",
  "createdAt": 0,
  "externalQueryId": "string",
  "ok": true,
  "queryId": 0,
  "replaySlot": 0,
  "txHash": "string"
}
```

## Response 400 · Trading.api.PreflightErrorResponse

**400** application/json — Bad Request

Schema: Trading.api.PreflightErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- details (object; optional)

details example: {
  "key": "string"
}

details.Type: object

details.*.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

Example



```json
{
  "code": "string",
  "details": {
    "key": "string"
  },
  "error": "string",
  "externalQueryId": "string"
}
```

## Response 409 · Trading.api.PreflightErrorResponse

**409** application/json — Conflict

Schema: Trading.api.PreflightErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- details (object; optional)

details example: {
  "key": "string"
}

details.Type: object

details.*.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

Example



```json
{
  "code": "string",
  "details": {
    "key": "string"
  },
  "error": "string",
  "externalQueryId": "string"
}
```

## Response 500 · Trading.api.PreflightErrorResponse

**500** application/json — Internal Server Error

Schema: Trading.api.PreflightErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- details (object; optional)

details example: {
  "key": "string"
}

details.Type: object

details.*.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

Example



```json
{
  "code": "string",
  "details": {
    "key": "string"
  },
  "error": "string",
  "externalQueryId": "string"
}
```

## Response 502 · Trading.api.PreflightErrorResponse

**502** application/json — Bad Gateway

Schema: Trading.api.PreflightErrorResponse

Type: object

Required fields: none

- code (string; optional)

code example: string

code.Type: string

- details (object; optional)

details example: {
  "key": "string"
}

details.Type: object

details.*.Type: string

- error (string; optional)

error example: string

error.Type: string

- externalQueryId (string; optional)

externalQueryId example: string

externalQueryId.Type: string

Example



```json
{
  "code": "string",
  "details": {
    "key": "string"
  },
  "error": "string",
  "externalQueryId": "string"
}
```