# Resend Confirmation Code

<mark style="color:blue;">**`POST`**</mark> `https://api.sfox.com/v1/user/withdraw/resend-confirmation`

Request a new withdrawal confirmation OTP code.

If a user does not receive an OTP code or if the code has expired, request a new code using this endpoint by including the transaction ID in the request body. Once requested, the user will receive an email with the new OTP code.

{% hint style="info" %}
**Authentication:** This endpoint requires a [User Auth Token](https://docs.sfox.com/connect/rest-api/end-users/create-user-auth-token) for authentication. Requests using your Connect API Key will be rejected.
{% endhint %}

### Body Parameters

<table><thead><tr><th width="202">Parameter</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>atx_id</code></strong> <mark style="color:red;">required</mark></td><td>number</td><td>The transaction ID of the withdrawal you are requesting a code for</td></tr></tbody></table>

### Response Body

<table><thead><tr><th width="173.33333333333331">Key</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>success</code></strong></td><td>Whether the request for a new confirmation code was successful or not</td></tr><tr><td><strong><code>atx_id</code></strong></td><td>The transaction ID of the withdrawal you are requesting a code for</td></tr><tr><td><strong><code>tx_status</code></strong></td><td>The transaction status of the withdrawal</td></tr></tbody></table>

### Responses

<details>

<summary><mark style="color:green;"><strong>200</strong></mark><strong> OK</strong></summary>

```json
{
    "data": {
        "success": true,
        "atx_id": 1525616,
        "tx_status": 1100
    }
}
```

</details>

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

```shell
curl -X POST \
  -H 'Content-type: application/json' \
  -H "Authorization: Bearer ${USER_AUTH_TOKEN}" \
  --data '{ "atx_id": 987654 }'  \
  'https://api.sfox.com/v1/user/withdraw/resend-confirmation'
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

const config = {
  method: 'post',
  url: 'https://api.sfox.com/v1/user/withdraw/resend-confirmation',
  headers: {
    "Content-Type": "application/json",
    'Authorization': `Bearer ${process.env.USER_AUTH_TOKEN}`
  },
  data: {
   atx_id: 987654
  }
}

axios(config)
  .then((response) => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch((error) => {
    console.error(error.response.status);
    console.error(error.response.data);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

data = requests.post(
  "https://api.sfox.com/v1/user/withdraw/resend-confirmation",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  },
  json={
    "atx_id": 987654
  }
)
print(data.status_code)
print(data.json())
```

{% endtab %}
{% endtabs %}
