cURL
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept \
--header 'partner-api-key: <api-key>'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept"
headers = {"partner-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'partner-api-key': '<api-key>'}};
fetch('https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"partner-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true
}
}Users
Accept Terms
POST
/
api
/
partner
/
v2
/
users
/
{userId}
/
terms
/
accept
cURL
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept \
--header 'partner-api-key: <api-key>'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept"
headers = {"partner-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'partner-api-key': '<api-key>'}};
fetch('https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"partner-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/users/{userId}/terms/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true
}
}Records that you attest the end user accepted the current Terms and Conditions and Privacy Notice. Takes no request body.
Important Notes
- This is an attestation, not a document flow: you confirm the user already accepted in your own UI (a checkbox on your onboarding screen). It does not start a signature ceremony and there is no page to redirect the user to.
- Idempotent: calling this again after acceptance is a no-op — it keeps the original acceptance timestamp and still returns
200with{ "success": true, "data": { "success": true } }, so it is safe to retry. - Your API key needs the
customer:terms:acceptpermission. See Permissions. - If you send the user to a KYC or KYB verification link, you can send
termsAccepted: truein that request instead of calling this endpoint. See the User Creation and Verification guide.
Use Cases
- Onboarding checkbox: record the acceptance your own sign-up screen collected.
- Backfill: record acceptance for users you created before you started sending it.
- Before transacting: once Terms and Conditions enforcement is enabled for your account, a user with no acceptance on record can’t transact.
Error Codes
These are the errors this endpoint returns most often. Branch oncode, not message, and handle codes you don’t recognize by their HTTP status. See Error Codes for the complete list.
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 403 | PERMISSION_DENIED | ”Your role does not allow this action.” (the API key doesn’t have customer:terms:accept) |
| 429 | TOO_MANY_REQUESTS | ”ThrottlerException: Too Many Requests” (wait the number of seconds in the Retry-After header) |
User Ownership Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”Partner information is required for this operation” |
| 401 | UNAUTHORIZED | ”User is not associated with the partner” |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 404 | NOT_FOUND_ERROR | ”Requested resource was not found” |
| 500 | INTERNAL_SERVER_ERROR | ”Internal server error” (also returned when userId isn’t a valid UUID) |