> For a complete page index, fetch https://docs.transak.com/llms.txt

# Submit MiCA Consent

POST https://api-gateway-stg.transak.com/api/v2/user/consent
Content-Type: application/json

**Submit MiCA Consent** is an **authenticated** API call that records the time an **EEA user** who completed KYC before MiCA gave the one-time MiCA consent.

Call it when the [Get Additional Requirements API](/api/whitelabel/kyc/get-additional-requirements) returns a form with `type: CONSENT`. Before calling it, show the user the consent screen described in [MiCA Changes for EEA Users](/guides/mica-eea-changes#2-collect-mica-consent-from-existing-eea-users), with their data and the two consents: data processing, and Transak's Terms of Use and Privacy Policy.

`consentedAt` is the time the user agreed, not the time of the request. It must be in ISO 8601 format with a time zone offset (for example `2026-11-26T10:15:00Z`), cannot be in the future, and cannot be earlier than Transak's MiCA go-live date.

After a `SUBMITTED` response, call the [Get KYC Requirement API](/api/whitelabel/kyc/get-kyc-requirement) again to continue the KYC flow. A `FAILED` status (still HTTP 200) means the consent was not recorded, so retry the request. Validation and authentication problems return a 4xx error.

**KYC Reliance using API:** send the consent in the `consent` object of the [Identity Details API](/api/whitelabel/kyc-reliance-api/kyc-reliance-identity-details) instead.

**Authentication:** use either **Partner Auth (Auth Reliance)**, which sends `x-access-token` and `x-user-identifier`, or **Transak Auth**, which sends the user's `authorization` token. Do not send both. See the headers below.

Reference: https://docs.transak.com/api/whitelabel/kyc/submit-mica-consent

## Request

### Headers

- `x-user-ip` (string, required) — End user's originating IP. More details [here](/guides/mandatory-security-changes#user-ip-header-in-apis)
- `x-api-key` (string, required) — Partner API Key present in Transak Dashboard.
- `x-access-token` (string, optional) — **Partner Auth (Auth Reliance).** Your Partner Access Token. Send it with `x-user-identifier`, and do not send `authorization`. See [Auth Reliance Flows](/features/auth-reliance) and [how to create a Partner Access Token](/guides/how-to-create-partner-access-token).
- `x-user-identifier` (string, optional) — **Partner Auth (Auth Reliance).** The email address of the user you authenticated. Send it with `x-access-token`.
- `authorization` (string, optional) — **Transak Auth.** The user's `accessToken` from Transak's OTP login, returned by the [Verify User OTP API](/api/whitelabel/user/verify-user-otp) (`/api/v2/auth/verify`). Do not send `x-access-token` or `x-user-identifier` with it.

### Body (application/json)

This endpoint expects an object.

- `consentedAt` (datetime, required) — The time the user agreed, in ISO 8601 format with seconds and a time zone offset: `Z` or `±HH:mm`, for example `2026-11-26T10:15:00Z`, `2026-11-26T10:15:00.000Z` or `2026-11-26T11:15:00+01:00`. Milliseconds are optional.

## Response

### 200

200 - Success

- `data` (ApiV2UserConsentPostResponsesContentApplicationJsonSchemaData, required)

## Errors

### 400 Bad Request Error

400 - Bad Request

- `error` (ApiV2UserConsentPostResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

401 - Unauthorized

- `error` (ApiV2UserConsentPostResponsesContentApplicationJsonSchemaError, required)

### 500 Internal Server Error

500 - Internal Server Error

- `error` (ApiV2UserConsentPostResponsesContentApplicationJsonSchemaError, required)

## Types

### ApiV2UserConsentPostResponsesContentApplicationJsonSchemaData

- `status` (enum, required) — `SUBMITTED` means the consent was recorded. `FAILED` means it was not; retry the call, and contact Transak if it keeps failing.
  - Allowed values: `SUBMITTED`, `FAILED`

### ApiV2UserConsentPostResponsesContentApplicationJsonSchemaError

- `statusCode` (integer, required)
- `message` (string, required)

## Examples

### Partner Auth (Auth Reliance)

**Request**

```json
{
  "consentedAt": "2026-11-26T10:15:00Z"
}
```

**Response**

```json
{
  "data": {
    "status": "SUBMITTED"
  }
}
```

**SDK Code**

```python Partner Auth (Auth Reliance)
import requests

url = "https://api-gateway-stg.transak.com/api/v2/user/consent"

payload = { "consentedAt": "2026-11-26T10:15:00Z" }
headers = {
    "x-access-token": "PARTNER_ACCESS_TOKEN",
    "x-api-key": "YOUR_API_KEY",
    "x-user-identifier": "user@example.com",
    "x-user-ip": "USER_IP_ADDRESS",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Partner Auth (Auth Reliance)
const url = 'https://api-gateway-stg.transak.com/api/v2/user/consent';
const options = {
  method: 'POST',
  headers: {
    'x-access-token': 'PARTNER_ACCESS_TOKEN',
    'x-api-key': 'YOUR_API_KEY',
    'x-user-identifier': 'user@example.com',
    'x-user-ip': 'USER_IP_ADDRESS',
    'Content-Type': 'application/json'
  },
  body: '{"consentedAt":"2026-11-26T10:15:00Z"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Partner Auth (Auth Reliance)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/user/consent"

	payload := strings.NewReader("{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-access-token", "PARTNER_ACCESS_TOKEN")
	req.Header.Add("x-api-key", "YOUR_API_KEY")
	req.Header.Add("x-user-identifier", "user@example.com")
	req.Header.Add("x-user-ip", "USER_IP_ADDRESS")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Partner Auth (Auth Reliance)
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/user/consent")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-access-token"] = 'PARTNER_ACCESS_TOKEN'
request["x-api-key"] = 'YOUR_API_KEY'
request["x-user-identifier"] = 'user@example.com'
request["x-user-ip"] = 'USER_IP_ADDRESS'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}"

response = http.request(request)
puts response.read_body
```

```java Partner Auth (Auth Reliance)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/user/consent")
  .header("x-access-token", "PARTNER_ACCESS_TOKEN")
  .header("x-api-key", "YOUR_API_KEY")
  .header("x-user-identifier", "user@example.com")
  .header("x-user-ip", "USER_IP_ADDRESS")
  .header("Content-Type", "application/json")
  .body("{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}")
  .asString();
```

```php Partner Auth (Auth Reliance)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-gateway-stg.transak.com/api/v2/user/consent', [
  'body' => '{
  "consentedAt": "2026-11-26T10:15:00Z"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-access-token' => 'PARTNER_ACCESS_TOKEN',
    'x-api-key' => 'YOUR_API_KEY',
    'x-user-identifier' => 'user@example.com',
    'x-user-ip' => 'USER_IP_ADDRESS',
  ],
]);

echo $response->getBody();
```

```csharp Partner Auth (Auth Reliance)
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/user/consent");
var request = new RestRequest(Method.POST);
request.AddHeader("x-access-token", "PARTNER_ACCESS_TOKEN");
request.AddHeader("x-api-key", "YOUR_API_KEY");
request.AddHeader("x-user-identifier", "user@example.com");
request.AddHeader("x-user-ip", "USER_IP_ADDRESS");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Partner Auth (Auth Reliance)
import Foundation

let headers = [
  "x-access-token": "PARTNER_ACCESS_TOKEN",
  "x-api-key": "YOUR_API_KEY",
  "x-user-identifier": "user@example.com",
  "x-user-ip": "USER_IP_ADDRESS",
  "Content-Type": "application/json"
]
let parameters = ["consentedAt": "2026-11-26T10:15:00Z"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/user/consent")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Transak Auth

**Request**

```json
{
  "consentedAt": "2026-11-26T10:15:00Z"
}
```

**Response**

```json
{
  "data": {
    "status": "SUBMITTED"
  }
}
```

**SDK Code**

```python Transak Auth
import requests

url = "https://api-gateway-stg.transak.com/api/v2/user/consent"

payload = { "consentedAt": "2026-11-26T10:15:00Z" }
headers = {
    "authorization": "USER_ACCESS_TOKEN",
    "x-api-key": "YOUR_API_KEY",
    "x-user-ip": "USER_IP_ADDRESS",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Transak Auth
const url = 'https://api-gateway-stg.transak.com/api/v2/user/consent';
const options = {
  method: 'POST',
  headers: {
    authorization: 'USER_ACCESS_TOKEN',
    'x-api-key': 'YOUR_API_KEY',
    'x-user-ip': 'USER_IP_ADDRESS',
    'Content-Type': 'application/json'
  },
  body: '{"consentedAt":"2026-11-26T10:15:00Z"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Transak Auth
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/user/consent"

	payload := strings.NewReader("{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "USER_ACCESS_TOKEN")
	req.Header.Add("x-api-key", "YOUR_API_KEY")
	req.Header.Add("x-user-ip", "USER_IP_ADDRESS")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Transak Auth
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/user/consent")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["authorization"] = 'USER_ACCESS_TOKEN'
request["x-api-key"] = 'YOUR_API_KEY'
request["x-user-ip"] = 'USER_IP_ADDRESS'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}"

response = http.request(request)
puts response.read_body
```

```java Transak Auth
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/user/consent")
  .header("authorization", "USER_ACCESS_TOKEN")
  .header("x-api-key", "YOUR_API_KEY")
  .header("x-user-ip", "USER_IP_ADDRESS")
  .header("Content-Type", "application/json")
  .body("{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}")
  .asString();
```

```php Transak Auth
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-gateway-stg.transak.com/api/v2/user/consent', [
  'body' => '{
  "consentedAt": "2026-11-26T10:15:00Z"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'authorization' => 'USER_ACCESS_TOKEN',
    'x-api-key' => 'YOUR_API_KEY',
    'x-user-ip' => 'USER_IP_ADDRESS',
  ],
]);

echo $response->getBody();
```

```csharp Transak Auth
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/user/consent");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "USER_ACCESS_TOKEN");
request.AddHeader("x-api-key", "YOUR_API_KEY");
request.AddHeader("x-user-ip", "USER_IP_ADDRESS");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"consentedAt\": \"2026-11-26T10:15:00Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transak Auth
import Foundation

let headers = [
  "authorization": "USER_ACCESS_TOKEN",
  "x-api-key": "YOUR_API_KEY",
  "x-user-ip": "USER_IP_ADDRESS",
  "Content-Type": "application/json"
]
let parameters = ["consentedAt": "2026-11-26T10:15:00Z"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/user/consent")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```