> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# Confirm a P2P contact code

POST https://tenant.api.corpx.com/v1/accounts/{accountId}/p2p/profile/contact/confirm
Content-Type: application/json

Confirms the 6-digit code. Five wrong attempts lock the code until a resend. The code is valid for 10 minutes.

Reference: https://en.docs.api.corpx.com/baas/referencia/p-2-p/confirm-p-2-p-profile-contact

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `X-Acting-Document` (string, optional) — CPF of the human performing the operation. Required on cashout routes when the credential enforces a transaction PIN. On a company P2P profile contact, this CPF is the holder who signs; it is not taken from the body.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

### Body (application/json)

This endpoint expects an object.

- `channel` (enum, required)
  - Allowed values: `email`, `phone`
- `code` (string, required)

## Response

### 200

Profile, with the channel confirmed.

- `accountId` (string, optional) — Account.
- `username` (string, optional, nullable) — Username.
- `usernameChangedAt` (datetime, optional, nullable) — Last username change. `null` while the username is the one the profile was created with.
- `usernameNextChangeAt` (datetime, optional, nullable) — From when a new username is accepted (90 days after the last change). `null` when it can change now.
- `advertiserStatus` (enum, optional) — Advertiser status.
  - Allowed values: `none`, `pending`, `approved`, `refused`, `suspended`
- `advertiserNote` (string, optional) — CorpX note on refusal or suspension.
- `level` (string, optional, nullable) — Advertiser level.
- `orderCap` (string, optional, nullable) — Per-order cap for this advertiser.
- `feeBps` (integer, optional) — Fee, in basis points of the order amount, charged to this account on the orders of its own ads: the seller receives the amount minus the fee on a sell ad, the buyer pays the amount plus the fee on a buy ad. Comes from the level; without a level, the lowest level's fee applies. 0 when the market has no levels.
- `memberSince` (datetime, optional, nullable) — Profile creation.
- `reputation` (P2PReputation, optional) — Trading statistics. Values below the tenant's minimum number of orders are `null`.
- `contact` (P2PProfileContact, optional) — E-mail and phone confirmed on the P2P profile, masked. The signer document is never sent by the client: for an individual it is the account document, for a company it is the holder who confirmed the contact.

## Errors

### 422 Unprocessable Entity Error

`contact_code_invalid` or `contact_code_locked`.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

## Types

### P2PReputation

Trading statistics. Values below the tenant's minimum number of orders are `null`.

- `tradesTotal` (integer, optional) — Completed orders.
- `completionPercent` (string, optional, nullable) — Completed over taken orders, in percent.
- `deliveryMedianSeconds` (integer, optional, nullable) — Median seconds between both signing and the crypto being sent.
- `deliveryPercentile` (integer, optional, nullable) — Percentile of the delivery time within the market (higher is faster).

### P2PProfileContact

E-mail and phone confirmed on the P2P profile, masked. The signer document is never sent by the client: for an individual it is the account document, for a company it is the holder who confirmed the contact.

- `email` (string, optional, nullable) — Masked e-mail.
- `phone` (string, optional, nullable) — Masked phone.
- `emailVerified` (boolean, optional)
- `phoneVerified` (boolean, optional)
- `emailVerifiedBy` (enum, optional) — `otp`: confirmed by code on the P2P profile. `tenant`: attested by the tenant in `PUT .../contact` (`emailVerified`).
  - Allowed values: `otp`, `tenant`
- `phoneVerifiedBy` (enum, optional) — Same as `emailVerifiedBy`, for the phone.
  - Allowed values: `otp`, `tenant`
- `ready` (boolean, optional) — Both channels confirmed. Required to advertise or trade.

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

## Examples

**Request**

```json
{
  "channel": "email",
  "code": "123456"
}
```

**Response**

```json
{
  "accountId": "2e6b725b-84a0-400d-8740-22a5ba0f23e6",
  "username": "MARIA DA SILVA",
  "advertiserStatus": "none",
  "advertiserNote": "Pagamento pedido #12345",
  "level": "string",
  "orderCap": "string",
  "feeBps": 6,
  "memberSince": "2026-02-20T08:33:39Z",
  "reputation": {
    "tradesTotal": 150,
    "completionPercent": "string",
    "deliveryMedianSeconds": 1,
    "deliveryPercentile": 1
  },
  "contact": {
    "email": "maria.silva@example.com",
    "phone": "+5511999999999",
    "emailVerified": true,
    "phoneVerified": true,
    "ready": true
  }
}
```

**SDK Code**

```python P2P_confirmP2PProfileContact_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm"

payload = {
    "channel": "email",
    "code": "123456"
}
headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript P2P_confirmP2PProfileContact_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm';
const options = {
  method: 'POST',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"channel":"email","code":"123456"}'
};

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

```go P2P_confirmP2PProfileContact_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm"

	payload := strings.NewReader("{\n  \"channel\": \"email\",\n  \"code\": \"123456\"\n}")

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

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	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 P2P_confirmP2PProfileContact_example
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm")

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

request = Net::HTTP::Post.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"channel\": \"email\",\n  \"code\": \"123456\"\n}"

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

```java P2P_confirmP2PProfileContact_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"channel\": \"email\",\n  \"code\": \"123456\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm', [
  'body' => '{
  "channel": "email",
  "code": "123456"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp P2P_confirmP2PProfileContact_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"channel\": \"email\",\n  \"code\": \"123456\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift P2P_confirmP2PProfileContact_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "channel": "email",
  "code": "123456"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/profile/contact/confirm")! 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()
```